/* Estilos específicos para la página de destino */
.destination-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

/* Cabecera del destino */
.destination-header {
    margin-bottom: 30px;
}

.back-link {
    margin-bottom: 20px;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    color: var(--color-dark);
    font-weight: 500;
    transition: var(--transition-standard);
}

.back-link a i {
    margin-right: 8px;
}

.back-link a:hover {
    color: var(--color-accent);
}

.destination-meta {
    position: relative;
}

.destination-region {
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.destination-region::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 15px;
    height: 2px;
    background-color: var(--color-accent);
}

.destination-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Contenido principal */
.destination-content {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.destination-description {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
}

.destination-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.destination-actions button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-standard);
}

.bookmark-btn {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.bookmark-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.bookmark-btn.bookmarked {
    background-color: var(--color-accent);
}

.share-btn {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.share-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Galería de fotos */
.destination-gallery {
    margin: 50px 0;
}

.destination-gallery h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 600;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    box-shadow: var(--shadow-standard);
    transition: var(--transition-standard);
    grid-row: span 1;
    grid-column: span 1;
}

/* Variaciones de tamaño para el estilo masonry */
.gallery-item-large {
    grid-row: span 2;
    grid-column: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}

.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: var(--color-white);
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: var(--transition-standard);
    opacity: 0;
}

.gallery-item:hover .gallery-item-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Modal de foto */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.photo-modal.active {
    display: flex;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-white);
    font-size: 40px;
    cursor: pointer;
    z-index: 2010;
    transition: var(--transition-standard);
}

.close-modal:hover {
    color: var(--color-accent);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.modal-navigation {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
}

.modal-prev, .modal-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-standard);
    border: none;
    cursor: pointer;
    z-index: 2010;
}

.modal-prev:hover, .modal-next:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

.modal-caption {
    text-align: center;
    color: var(--color-white);
    padding: 20px 0;
    max-width: 80%;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .destination-title {
        font-size: 2.8rem;
    }
    
    .destination-content {
        flex-direction: column;
    }
    
    .destination-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .destination-page {
        padding: 80px 15px 30px;
    }
    
    .destination-title {
        font-size: 2rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-item {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .destination-page {
        padding: 80px 10px 20px;
    }
    
    .destination-title {
        font-size: 1.8rem;
    }
    
    /* Simplificar completamente el diseño de la galería en móviles */
    .gallery-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    /* Anular las clases especiales de masonry en móvil */
    .gallery-item,
    .gallery-item-large,
    .gallery-item-wide,
    .gallery-item-tall {
        width: 100%;
        height: auto;
        margin-bottom: 0;
    }
    
    .gallery-item img {
        width: 100%;
        aspect-ratio: 1/1;
        object-fit: cover;
    }
    
    /* Asegurarse de que las imágenes más importantes mantengan una proporción adecuada */
    .gallery-item-large img {
        aspect-ratio: 3/2;
    }
    
    .modal-prev, .modal-next {
        width: 40px;
        height: 40px;
    }
}
