
/* =========================================================
   Indian Pride FOUNDATION
   GALLERY PAGE
========================================================= */


/* =========================================================
   GALLERY PAGE BACKGROUND
========================================================= */

.gallery-page {

    position: relative;

    min-height:
        calc(100vh - 78px);

    padding:
        70px 0 80px;

    overflow:
        hidden;

    background:
        linear-gradient(
            rgba(15, 42, 34, 0.78),
            rgba(15, 42, 34, 0.78)
        ),
        url("common.jpg");

    background-size:
        cover;

    background-position:
        center;

    background-attachment:
        fixed;

}


/* Soft overlay */

.gallery-page::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.08);

    pointer-events:
        none;

}


/* =========================================================
   MAIN CONTAINER
========================================================= */

.gallery-container {

    position: relative;

    z-index: 2;

    max-width:
        1200px;

    margin:
        0 auto;

    padding:
        0 20px;

}


/* =========================================================
   INTRODUCTION
========================================================= */

.gallery-intro {

    max-width:
        800px;

    margin:
        0 auto 40px;

    text-align:
        center;

    color:
        white;

}


.gallery-label {

    display:
        inline-block;

    color:
        var(--orange);

    font-size:
        12px;

    font-weight:
        700;

    letter-spacing:
        2.5px;

    margin-bottom:
        10px;

}


.gallery-intro h1 {

    font-family:
        "Playfair Display",
        serif;

    font-size:
        clamp(40px, 6vw, 58px);

    line-height:
        1.1;

    margin-bottom:
        18px;

}


.gallery-intro h1 span {

    color: red;

}


.gallery-intro p {

    max-width:
        650px;

    margin:
        0 auto;

    color:
        rgba(255,255,255,.82);

    font-size:
        15px;

    line-height:
        1.8;

}


/* =========================================================
   YEAR NAVIGATION
========================================================= */

.year-navigation {

    display:
        flex;

    justify-content:
        center;

    flex-wrap:
        wrap;

    gap:
        10px;

    margin-bottom:
        45px;

}


.year-navigation a {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-width:
        80px;

    padding:
        10px 20px;

    color:
        white;

    text-decoration:
        none;

    font-size:
        13px;

    font-weight:
        600;

    border:
        1px solid
        rgba(255,255,255,.35);

    border-radius:
        30px;

    background:
        rgba(255,255,255,.08);

    transition:
        all .25s ease;

}


.year-navigation a:hover {

    color:
        var(--dark);

    background:
        var(--orange);

    border-color:
        var(--orange);

    transform:
        translateY(-2px);

}


/* =========================================================
   YEAR SECTION
========================================================= */

.gallery-year {

    position:
        relative;

    background:
        rgba(255,255,255,.95);

    padding:
        45px;

    margin-bottom:
        30px;

    border-radius:
        10px;

    box-shadow:
        0 20px 60px
        rgba(0,0,0,.20);

    backdrop-filter:
        blur(5px);

    -webkit-backdrop-filter:
        blur(5px);

}


.gallery-year:last-child {

    margin-bottom:
        0;

}


/* =========================================================
   YEAR HEADING
========================================================= */

.year-heading {

    display:
        flex;

    align-items:
        center;

    gap:
        15px;

    margin-bottom:
        30px;

}


.year-heading > span {

    color:
        var(--orange);

    font-size:
        10px;

    font-weight:
        700;

    letter-spacing:
        2px;

}


.year-heading h2 {

    flex-shrink:
        0;

    font-family:
        "Playfair Display",
        serif;

    color:
        var(--dark);

    font-size:
        36px;

    line-height:
        1;

}


.year-line {

    height:
        1px;

    flex:
        1;

    background:
        var(--border);

}


/* =========================================================
   PHOTO GRID
========================================================= */

.photo-grid {

    display:
        grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap:
        22px;

}


/* =========================================================
   PHOTO CARD
========================================================= */

.gallery-photo {

    position:
        relative;

    margin:
        0;

    overflow:
        hidden;

    border-radius:
        8px;

    background:
        #eee;

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.08);

    cursor:
        pointer;

}


.gallery-photo::after {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.65),
            rgba(0,0,0,0) 45%
        );

    opacity:
        0;

    transition:
        opacity .3s ease;

    pointer-events:
        none;

}


.gallery-photo img {

    display:
        block;

    width:
        100%;

    aspect-ratio:
        4 / 3;

    object-fit:
        cover;

    transition:
        transform .45s ease;

}


.gallery-photo:hover img {

    transform:
        scale(1.06);

}


.gallery-photo:hover::after {

    opacity:
        1;

}


/* =========================================================
   PHOTO CAPTION
========================================================= */

.gallery-photo figcaption {

    position:
        absolute;

    left:
        18px;

    right:
        18px;

    bottom:
        15px;

    z-index:
        2;

    color:
        white;

    font-size:
        12px;

    font-weight:
        600;

    letter-spacing:
        .3px;

    opacity:
        0;

    transform:
        translateY(8px);

    transition:
        all .3s ease;

}


.gallery-photo:hover figcaption {

    opacity:
        1;

    transform:
        translateY(0);

}


/* =========================================================
   LIGHTBOX
========================================================= */

.lightbox {

    position:
        fixed;

    inset:
        0;

    z-index:
        9999;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        30px;

    background:
        rgba(7, 20, 16, .94);

    opacity:
        0;

    visibility:
        hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;

}


.lightbox.show {

    opacity:
        1;

    visibility:
        visible;

}


.lightbox-content {

    position:
        relative;

    max-width:
        90vw;

    max-height:
        90vh;

    text-align:
        center;

}


.lightbox-content img {

    display:
        block;

    max-width:
        90vw;

    max-height:
        78vh;

    width:
        auto;

    height:
        auto;

    object-fit:
        contain;

    border-radius:
        5px;

    box-shadow:
        0 20px 80px
        rgba(0,0,0,.5);

}


#lightbox-caption {

    margin-top:
        15px;

    color:
        rgba(255,255,255,.85);

    font-size:
        13px;

}


/* =========================================================
   LIGHTBOX BUTTONS
========================================================= */

.lightbox-close,
.lightbox-prev,
.lightbox-next {

    position:
        absolute;

    z-index:
        5;

    display:
        grid;

    place-items:
        center;

    width:
        48px;

    height:
        48px;

    border:
        none;

    border-radius:
        50%;

    color:
        white;

    background:
        rgba(255,255,255,.12);

    font-size:
        25px;

    cursor:
        pointer;

    transition:
        background .25s ease,
        transform .25s ease;

}


.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {

    background:
        var(--orange);

}


.lightbox-close {

    top:
        25px;

    right:
        25px;

    font-size:
        30px;

}


.lightbox-prev {

    left:
        25px;

    top:
        50%;

    transform:
        translateY(-50%);

}


.lightbox-prev:hover {

    transform:
        translateY(-50%)
        scale(1.05);

}


.lightbox-next {

    right:
        25px;

    top:
        50%;

    transform:
        translateY(-50%);

}


.lightbox-next:hover {

    transform:
        translateY(-50%)
        scale(1.05);

}


/* Prevent page scrolling */

body.lightbox-open {

    overflow:
        hidden;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .gallery-page {

        padding:
            55px 0 65px;

    }


    .gallery-container {

        padding:
            0 25px;

    }


    .gallery-year {

        padding:
            35px;

    }


    .photo-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .gallery-page {

        min-height:
            auto;

        padding:
            40px 0 50px;

        background-attachment:
            scroll;

    }


    .gallery-container {

        padding:
            0 18px;

    }


    .gallery-intro {

        margin-bottom:
            30px;

    }


    .gallery-intro h1 {

        font-size:
            40px;

    }


    .gallery-intro p {

        font-size:
            14px;

    }


    .year-navigation {

        margin-bottom:
            30px;

    }


    .year-navigation a {

        min-width:
            70px;

        padding:
            9px 15px;

    }


    .gallery-year {

        padding:
            28px 20px;

        margin-bottom:
            18px;

        border-radius:
            7px;

    }


    .year-heading {

        margin-bottom:
            22px;

    }


    .year-heading h2 {

        font-size:
            30px;

    }


    .photo-grid {

        grid-template-columns:
            1fr;

        gap:
            16px;

    }


    .gallery-photo img {

        aspect-ratio:
            16 / 10;

    }


    .gallery-photo figcaption {

        opacity:
            1;

        transform:
            translateY(0);

        bottom:
            12px;

    }


    .gallery-photo::after {

        opacity:
            1;

    }


    .lightbox {

        padding:
            20px;

    }


    .lightbox-content img {

        max-width:
            88vw;

        max-height:
            75vh;

    }


    .lightbox-prev,
    .lightbox-next {

        width:
            42px;

        height:
            42px;

        font-size:
            20px;

    }


    .lightbox-prev {

        left:
            10px;

    }


    .lightbox-next {

        right:
            10px;

    }


    .lightbox-close {

        top:
            15px;

        right:
            15px;

        width:
            42px;

        height:
            42px;

    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 480px) {

    .gallery-page {

        padding:
            30px 0 40px;

    }


    .gallery-container {

        padding:
            0 14px;

    }


    .gallery-intro h1 {

        font-size:
            34px;

    }


    .gallery-intro p {

        font-size:
            13px;

    }


    .year-navigation {

        gap:
            7px;

    }


    .year-navigation a {

        min-width:
            62px;

        padding:
            8px 12px;

        font-size:
            12px;

    }


    .gallery-year {

        padding:
            24px 16px;

    }


    .year-heading {

        gap:
            10px;

    }


    .year-heading h2 {

        font-size:
            27px;

    }


    .year-heading > span {

        font-size:
            9px;

    }

}

