/* ================================
   MÓDULO: GALLERY
   Estilos exclusivos de galería
   ================================ */

/* Reset específico del módulo */
.gallery,
.gallery * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container principal */
.gallery {
    width: 100%;
    padding: 5rem 0;
    background: #FAF8F5;
}

.gallery__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Título de la sección */
.gallery__title {
    font-family: 'Georgia', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #3E2723;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

/* Descripción */
.gallery__description {
    font-family: 'Arial', sans-serif;
    font-size: 1.1rem;
    color: #6B5B52;
    text-align: center;
    margin-bottom: 3.5rem;
    font-style: italic;
}

/* Grid de galería (masonry style) */
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ================================
   GALLERY ITEM
   ================================ */

.gallery__item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Altura variable para efecto masonry */
.gallery__item:nth-child(1) {
    grid-row: span 2;
}

.gallery__item:nth-child(4) {
    grid-row: span 2;
}

/* Hover en item */
.gallery__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(62, 39, 35, 0.15);
}

/* Imagen de la galería */
.gallery__image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.4s ease;
}

/* Imágenes específicas */
.gallery__item:nth-child(1) .gallery__image {
    background-image: url('../images/galeria1.jpg');
    border: 3px solid #A67B5B;
}

.gallery__item:nth-child(2) .gallery__image {
    background-image: url('../images/galeria2.jpg');
    border: 3px solid #E07856;
}

.gallery__item:nth-child(3) .gallery__image {
    background-image: url('../images/galeria3.jpg');
    border: 3px solid #91A68A;
}

.gallery__item:nth-child(4) .gallery__image {
    background-image: url('../images/galeria4.jpg');
    border: 3px solid #A67B5B;
}

.gallery__item:nth-child(5) .gallery__image {
    background-image: url('../images/galeria5.jpg');
    border: 3px solid #E07856;
}

.gallery__item:nth-child(6) .gallery__image {
    background-image: url('../images/galeria6.jpg');
    border: 3px solid #91A68A;
}

/* Overlay transparente */
.gallery__image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(62, 39, 35, 0);
    transition: all 0.4s ease;
}

.gallery__item:hover .gallery__image::before {
    background: rgba(62, 39, 35, 0.2);
}

/* Zoom en imagen */
.gallery__item:hover .gallery__image {
    transform: scale(1.08);
}

/* ================================
   BOTÓN INSTAGRAM
   ================================ */

.gallery__instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 2.5rem;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(188, 24, 136, 0.3);
    display: flex;
    width: fit-content;
}

.gallery__instagram svg {
    width: 20px;
    height: 20px;
}

.gallery__instagram:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(188, 24, 136, 0.4);
}

/* ================================
   RESPONSIVE: TABLET
   ================================ */
@media screen and (max-width: 968px) {
    .gallery {
        padding: 4rem 0;
    }

    .gallery__title {
        font-size: 2.5rem;
    }

    .gallery__description {
        font-size: 1rem;
        margin-bottom: 3rem;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .gallery__image {
        min-height: 220px;
    }

    .gallery__instagram {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

/* ================================
   RESPONSIVE: MÓVIL
   ================================ */
@media screen and (max-width: 768px) {
    .gallery {
        padding: 3.5rem 0;
    }

    .gallery__container {
        padding: 0 1.5rem;
    }

    .gallery__title {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }

    .gallery__description {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
    }

    .gallery__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }

    /* Quitar masonry en móvil */
    .gallery__item:nth-child(1),
    .gallery__item:nth-child(4) {
        grid-row: span 1;
    }

    .gallery__image {
        min-height: 280px;
    }

    .gallery__instagram {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 480px) {
    .gallery {
        padding: 3rem 0;
    }

    .gallery__container {
        padding: 0 1rem;
    }

    .gallery__title {
        font-size: 1.8rem;
    }

    .gallery__description {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .gallery__grid {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .gallery__image {
        min-height: 240px;
        border-width: 2px;
    }

    .gallery__instagram {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}