/* ===== GALLERY PAGE ===== */

.page-gallery{
    position:relative;
}

/* HERO */
.hero-gallery{
    position:relative;
    padding:380px 0 54px;
    background-image:url("../../images/aut-hero.jpg");
    background-size:cover;
    background-position:center 25%;
}

.hero-gallery::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 18% 42%, rgba(255,140,50,0.24) 0%, rgba(255,140,50,0.10) 18%, rgba(255,140,50,0.02) 34%, transparent 48%),
        linear-gradient(
            90deg,
            rgba(7,10,16,0.96) 0%,
            rgba(8,12,18,0.88) 34%,
            rgba(8,12,18,0.52) 58%,
            rgba(8,12,18,0.18) 78%,
            rgba(8,12,18,0.08) 100%
        );
}

.hero-gallery .hero-content{
    position:relative;
    max-width:720px;
    margin-top:-120px;
    padding:0;
}

.hero-gallery h1{
    font-size:64px;
    line-height:0.96;
    font-weight:800;
    letter-spacing:-1.2px;
    margin-bottom:12px;
}

.hero-gallery p{
    max-width:620px;
    opacity:0.88;
    color:rgba(255,255,255,0.88);
    margin-bottom:0;
    line-height:1.55;
}

/* SECTION */
.gallery-section{
    padding:16px 0 32px;
}

.gallery-section .container{
    padding:20px 22px 18px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(3,5,8,0.78) 0%, rgba(2,4,7,0.94) 100%);
    border:1px solid rgba(255,255,255,0.06);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.04), 0 20px 40px rgba(0,0,0,0.45), 0 0 22px rgba(255,140,50,0.05);
    backdrop-filter:blur(16px) saturate(120%);
    -webkit-backdrop-filter:blur(16px) saturate(120%);
}

.gallery-grid{
    display:grid;
    grid-template-columns:repeat(8,1fr);
    gap:10px;
}

.gallery-card,
.gallery-empty-card{
    position:relative;
    overflow:hidden;
    border-radius:12px;
    background:linear-gradient(180deg, rgba(20,24,34,0.58) 0%, rgba(15,20,30,0.72) 100%);
    backdrop-filter:blur(16px) saturate(118%);
    -webkit-backdrop-filter:blur(16px) saturate(118%);
    border:1px solid rgba(255,255,255,0.10);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 26px rgba(0,0,0,0.22);
    transition:all .35s ease;
}

.gallery-card{
    min-height:90px;
}

.gallery-card img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.gallery-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(4,7,12,0.04) 0%, rgba(4,7,12,0.12) 40%, rgba(4,7,12,0.82) 100%);
    z-index:1;
    pointer-events:none;
}

.gallery-card-body{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:2;
    padding:12px 12px 10px;
}

.gallery-card-body h3{
    font-size:10px;
    line-height:1.18;
    color:#ffffff;
    margin:0 0 4px;
    text-shadow:0 2px 10px rgba(0,0,0,0.35);
}

.gallery-card-location{
    margin:0;
    font-size:8px;
    line-height:1.35;
    color:rgba(255,255,255,0.82);
    text-shadow:0 2px 10px rgba(0,0,0,0.30);
}

.gallery-empty-card{
    padding:26px 22px;
    text-align:center;
}

.gallery-empty-card h2{
    font-size:28px;
    line-height:1.15;
    margin:0 0 10px;
    background:linear-gradient(90deg, #ffb14a 0%, #ffffff 100%);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.gallery-empty-card p{
    margin:0;
    font-size:14px;
    line-height:1.6;
    color:rgba(230,237,243,0.82);
}

/* RESPONSIVE */
@media (max-width:1100px){
    .gallery-grid{
        grid-template-columns:repeat(4,1fr);
    }
}

@media (max-width:700px){
    .hero-gallery{
        padding:270px 0 18px;
        background-position:center 20%;
    }

    .hero-gallery .hero-content{
        margin-top:-100px;
    }

    .hero-gallery h1{
        font-size:34px;
        line-height:0.98;
        letter-spacing:-0.8px;
        margin-bottom:10px;
        margin-top:-20px;
    }

    .hero-gallery p{
        max-width:100%;
        font-size:13px;
        line-height:1.5;
        opacity:0.86;
        margin-top:-6px;
    }

    .gallery-section{
        padding:10px 0 16px;
    }

    .gallery-section .container{
        padding:14px 12px 12px;
        border-radius:14px;
    }

    .gallery-grid{
        display:grid !important;
        grid-auto-flow:row !important;
        grid-auto-columns:unset !important;
        grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
        gap:8px !important;
        overflow-x:visible !important;
        overflow-y:visible !important;
        padding-bottom:0 !important;
        scroll-snap-type:none !important;
        -webkit-overflow-scrolling:auto !important;
    }

    .gallery-card{
        scroll-snap-align:none !important;
        min-height:95px;
        aspect-ratio:1 / 1;
        display:block;
        width:100%;
    }

    .gallery-card img{
        position:absolute;
        inset:0;
        width:100%;
        height:100%;
    }

    .gallery-card-body{
        left:0;
        right:0;
        bottom:0;
        padding:10px 10px 9px;
    }

    .gallery-card-body h3{
        font-size:12px;
        margin-bottom:2px;
    }

    .gallery-card-location{
        font-size:10px;
        line-height:1.25;
    }

    .gallery-empty-card{
        padding:20px 16px;
        border-radius:12px;
    }

    .gallery-empty-card h2{
        font-size:20px;
        margin-bottom:8px;
    }

    .gallery-empty-card p{
        font-size:12px;
        line-height:1.5;
    }
}

@media (min-width:1025px){
    .page-gallery .container{
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
        margin-left: auto;
        margin-right: auto;
    }

    .gallery-section .container{
        width: calc(100% - 48px) !important;
        max-width: calc(100% - 48px) !important;
    }
}

/* ===== GALLERY MODAL FINAL ===== */
.gallery-modal{
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:rgba(2,6,12,0.94);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .28s ease, visibility .28s ease;
    z-index:2147483647 !important;
}

.gallery-modal.is-open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}

.gallery-modal-inner{
    position:relative;
    display:inline-block;
    max-width:92vw;
    max-height:88vh;
    z-index:2147483647 !important;
}

.gallery-modal-img{
    width:auto;
    height:auto;
    max-width:100%;
    max-height:88vh;
    display:block;
    border-radius:14px;
    box-shadow:0 24px 60px rgba(0,0,0,0.45);
    object-fit:contain;
}

.gallery-modal-close{
    position:fixed;
    top:20px;
    right:20px;
    width:46px;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:999px;
    background:#ffffff;
    color:#000000;
    font-size:24px;
    font-weight:700;
    cursor:pointer;
    z-index:2147483647 !important;
    box-shadow:0 10px 30px rgba(0,0,0,0.45);
    transition:.2s;
}

.gallery-modal-close:hover{
    transform:scale(1.08);
    background:rgba(255,140,50,0.25);
}

.gallery-modal-trigger{
    cursor:pointer;
}

@media (max-width:700px){
    .gallery-modal{
        padding:14px;
    }

    .gallery-modal-inner{
        max-width:100%;
        max-height:82vh;
    }

    .gallery-modal-img{
        max-height:82vh;
        border-radius:10px;
    }

    .gallery-modal-close{
        top:14px;
        right:14px;
        width:40px;
        height:40px;
        font-size:20px;
    }
}
/* CAROUSEL */
.gallery-carousel-section{
    padding:32px 0 14px;
}

.gallery-carousel-section .container{
    padding:0;
    background:none;
    border:none;
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
}

.gallery-carousel-track{
    display:grid;
    grid-auto-flow:column;
    grid-auto-columns:minmax(110px, 110px);
    gap:14px;
    overflow-x:auto;
    overflow-y:hidden;
    padding:4px 2px 10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
}

.gallery-carousel-track::-webkit-scrollbar{
    height:8px;
}

.gallery-carousel-track::-webkit-scrollbar-thumb{
    background:rgba(255,140,50,0.35);
    border-radius:999px;
}

.gallery-carousel-card{
    position:relative;
    min-height:120px;
    border-radius:18px;
    overflow:hidden;
    scroll-snap-align:start;
    border:1px solid rgba(255,255,255,0.10);
    box-shadow:0 18px 40px rgba(0,0,0,0.28);
}

.gallery-carousel-card img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.gallery-carousel-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(180deg, rgba(4,7,12,0.02) 0%, rgba(4,7,12,0.10) 38%, rgba(4,7,12,0.84) 100%);
    z-index:1;
    pointer-events:none;
}

.gallery-carousel-card-body{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:2;
    padding:18px 16px 16px;
    background:linear-gradient(180deg, rgba(7,10,16,0.00) 0%, rgba(7,10,16,0.18) 12%, rgba(7,10,16,0.66) 58%, rgba(7,10,16,0.92) 100%);
}

.gallery-carousel-card-body h3{
    margin:0 0 6px;
    font-size:10px;
    line-height:1.2;
    color:#ffffff;
    text-shadow:0 2px 10px rgba(0,0,0,0.35);
}

.gallery-carousel-card-body p{
    margin:0;
    font-size:8px;
    line-height:1.45;
    color:rgba(255,255,255,0.82);
    text-shadow:0 2px 10px rgba(0,0,0,0.30);
}
    .gallery-carousel-section{
        padding:10px 0 10px;
    }

    .gallery-carousel-track{
        grid-auto-columns:minmax(100px, 100px);
        gap:10px;
        padding-bottom:6px;
    }

    .gallery-carousel-card{
        min-height:110px;
        border-radius:14px;
    }

    .gallery-carousel-card-body{
        padding:12px 12px 12px;
    }

    .gallery-carousel-card-body h3{
        font-size:11px;
        margin-bottom:3px;
    }

    .gallery-carousel-card-body p{
        font-size:9px;
        line-height:1.35;
    }



@media (max-width:700px){
    .gallery-section .gallery-grid{
        display:grid !important;
        grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
        grid-auto-flow:row !important;
        grid-auto-columns:unset !important;
        overflow:visible !important;
        padding-bottom:0 !important;
        scroll-snap-type:none !important;
    }

    .gallery-section .gallery-card{
        width:100% !important;
        min-height:95px !important;
        aspect-ratio:1 / 1;
    }
}
.gallery-filter{
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    margin-top:22px;
    margin-bottom:18px;
}

.gallery-filter button{
    padding:10px 18px;
    border-radius:999px;
    border:1px solid rgba(255,140,50,0.35);
    background:linear-gradient(180deg, #0b1734 0%, #060f24 100%);
    color:#ffffff;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:all .25s ease;
    box-shadow:
        0 10px 22px rgba(0,0,0,0.65),
        0 0 0 1px rgba(255,140,50,0.25),
        0 0 12px rgba(255,140,50,0.15);
}

.gallery-filter button:hover{
    transform:translateY(-2px);
    background:linear-gradient(180deg, #13225a 0%, #0b183f 100%);
    border-color:rgba(255,140,50,0.55);
    box-shadow:
        0 12px 26px rgba(0,0,0,0.55),
        0 0 0 1px rgba(255,140,50,0.45),
        0 0 16px rgba(255,140,50,0.25);
}

.gallery-filter button.active{
    background:linear-gradient(180deg, #ffb347 0%, #ff8c32 100%);
    color:#ffffff;
    border-color:#ff8c32;
    box-shadow:
        0 10px 24px rgba(255,140,50,0.45),
        0 0 0 1px rgba(255,140,50,0.85),
        0 0 18px rgba(255,140,50,0.45);
}

@media (max-width:700px){
    .gallery-filter{
        gap:8px;
        margin-top:16px;
        margin-bottom:12px;
    }

    .gallery-filter button{
        padding:8px 14px;
        font-size:12px;
    }
}