
/* =========================================
   GALERÍA - MEXICANÍSIMO
========================================= */

.gallery-page {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: 100vh;
    padding: 155px 7% 110px;
    overflow: hidden;

    background:
        radial-gradient(
            ellipse at 8% 15%,
            rgba(8, 91, 55, .13),
            transparent 35%
        ),
        radial-gradient(
            ellipse at 92% 80%,
            rgba(153, 31, 43, .12),
            transparent 35%
        ),
        #090a09;
}

/* Textura decorativa */
.gallery-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .17;

    background-image:
        linear-gradient(
            rgba(216,184,121,.04) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(216,184,121,.04) 1px,
            transparent 1px
        );

    background-size: 75px 75px;
}

.gallery-page-container {
    position: relative;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}


/* =========================================
   HEADING
========================================= */

.gallery-page-heading {
    max-width: 790px;
    margin: 0 auto 55px;
    text-align: center;
}

.gallery-page-eyebrow {
    display: inline-block;
    margin-bottom: 22px;

    color: #d8b879;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 4px;
}

.gallery-page-heading h1 {
    margin: 0;

    color: #f4eee3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 400;
    line-height: 1.12;
}

.gallery-page-heading h1 span {
    margin-right: 12px;
}

.gallery-page-heading h1 strong {
    color: #d8b879;
    font-weight: 400;
    font-style: italic;
}

.gallery-page-heading p {
    max-width: 690px;
    margin: 24px auto 0;

    color: rgba(255,255,255,.65);
    font-size: 13px;
    line-height: 2;
}


/* =========================================
   MEXICAN ORNAMENT
========================================= */

.gallery-page-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.gallery-page-ornament span {
    width: 65px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        #d8b879
    );
}

.gallery-page-ornament span:last-child {
    transform: rotate(180deg);
}

.gallery-page-ornament i {
    color: #d8b879;
    font-size: 12px;
}


/* =========================================
   FILTERS
========================================= */

.gallery-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 42px;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 130px;
    padding: 13px 22px;

    color: rgba(255,255,255,.65);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .6px;

    border: 1px solid rgba(216,184,121,.23);
    background: rgba(255,255,255,.025);

    cursor: pointer;

    transition:
        color .3s ease,
        border-color .3s ease,
        background .3s ease,
        transform .3s ease;
}

.gallery-filter i {
    color: #d8b879;
    font-size: 13px;
}

.gallery-filter:hover {
    color: #f5e8ce;
    border-color: rgba(216,184,121,.65);
    transform: translateY(-2px);
}

.gallery-filter.active {
    color: #15130e;
    border-color: #d8b879;
    background: #d8b879;
}

.gallery-filter.active i {
    color: #15130e;
}


/* =========================================
   MEDIA GRID
========================================= */

/* =========================================
   MASONRY GALLERY - DISTRIBUCIÓN IRREGULAR
========================================= */

.gallery-media-grid {
    column-count: 3;
    column-gap: 20px;
    width: 100%;
}

.gallery-media-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;

    overflow: hidden;
    break-inside: avoid;
    vertical-align: top;

    border: 1px solid rgba(216,184,121,.22);
    background: #111310;

    cursor: zoom-in;

    transition:
        opacity .3s ease,
        transform .3s ease,
        border-color .3s ease;
}

/* Detalle tricolor */

.gallery-media-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;

    width: 100%;
    height: 3px;

    background: linear-gradient(
        90deg,
        #087b43 0 33.33%,
        #e9e0cd 33.33% 66.66%,
        #b72c3b 66.66% 100%
    );

    opacity: .9;
}

/* Fotografías */

.gallery-media-item img {
    display: block;
    width: 100%;
    height: auto;

    object-fit: contain;

    transition: transform .6s ease;
}

/* Videos */

.gallery-media-item video {
    display: block;
    width: 100%;
    height: auto;

    object-fit: contain;
}

/* Efecto al pasar el mouse */

@media (hover: hover) {

    .gallery-media-item:hover {
        border-color: rgba(216,184,121,.75);
        transform: translateY(-4px);
    }

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

}

/* Tarjetas de muestra mientras no hay fotografías */

.gallery-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;

    width: 100%;
    min-height: 230px;
    padding: 35px 15px;

    color: rgba(255,255,255,.55);

    background:
        radial-gradient(
            circle at center,
            rgba(216,184,121,.08),
            transparent 70%
        ),
        #111310;
}

.gallery-media-placeholder i {
    color: #d8b879;
    font-size: 28px;
}

.gallery-media-placeholder span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Ocultar elementos filtrados */

.gallery-media-item.is-hidden {
    display: none;
}

/* =========================================
   FOOTER DETAIL
========================================= */

.gallery-page-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 65px;
    text-align: center;
}

.gallery-page-footer-line {
    width: 70px;
    height: 1px;
    background: #d8b879;
}

.gallery-page-footer p {
    margin: 18px 0;
    color: rgba(255,255,255,.55);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-style: italic;
}

.gallery-tricolor {
    display: flex;
    width: 55px;
    height: 3px;
}

.gallery-tricolor span {
    flex: 1;
}

.gallery-tricolor span:nth-child(1) {
    background: #087b43;
}

.gallery-tricolor span:nth-child(2) {
    background: #e9e0cd;
}

.gallery-tricolor span:nth-child(3) {
    background: #b72c3b;
}


/* =========================================
   REVEAL
========================================= */

#galleryPage .reveal {
    opacity: 0;
    transform: translateY(28px);

    transition:
        opacity .8s ease,
        transform .8s ease;
}

#galleryPage .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   TABLET
========================================= */


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .gallery-media-grid {
        column-count: 2;
        column-gap: 15px;
    }

    .gallery-media-item {
        margin-bottom: 15px;
    }

}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .gallery-media-grid {
        column-count: 2;
        column-gap: 10px;
    }

    .gallery-media-item {
        margin-bottom: 10px;
    }

    .gallery-media-placeholder {
        min-height: 170px;
        padding: 25px 8px;
    }

    .gallery-media-placeholder i {
        font-size: 22px;
    }

    .gallery-media-placeholder span {
        font-size: 8px;
        letter-spacing: 1px;
    }

}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {

    .gallery-media-grid {
        column-count: 1;
    }

}


/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    #galleryPage .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .gallery-filter {
        transition: none;
    }

}






/*zoom fotos*/


/* =====================================
   LIGHTBOX - FOTOGRAFÍAS Y VIDEOS
===================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px 25px;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .3s ease, visibility .3s ease;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 85vh;
}

.gallery-lightbox-content img,
.gallery-lightbox-content video {
    display: block;
    max-width: 100%;
    max-height: 85vh;

    width: auto;
    height: auto;

    object-fit: contain;
    border-radius: 8px;

    box-shadow: 0 0 40px rgba(0, 0, 0, .55);
    animation: lightboxZoom .35s ease;
}

.gallery-lightbox-close {
    position: absolute;
    top: 22px;
    right: 30px;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(212, 175, 55, .5);
    border-radius: 50%;

    background: rgba(0, 0, 0, .6);
    color: #d4af37;

    font-size: 27px;
    cursor: pointer;

    transition: .3s ease;
}

.gallery-lightbox-close:hover {
    background: #d4af37;
    color: #080808;
    transform: rotate(90deg);
}

@keyframes lightboxZoom {
    from {
        opacity: 0;
        transform: scale(.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cursor de ampliación */

.gallery-media-item {
    cursor: zoom-in;
}

.gallery-media-item img,
.gallery-media-item video {
    cursor: zoom-in;
}

/* MÓVILES */

@media (max-width: 600px) {

    .gallery-lightbox {
        padding: 55px 12px;
    }

    .gallery-lightbox-content {
        max-height: 80vh;
    }

    .gallery-lightbox-content img,
    .gallery-lightbox-content video {
        max-width: 100%;
        max-height: 78vh;
        border-radius: 5px;
    }

    .gallery-lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
