﻿/* =========================================================
   ADGRO MEDIA - GALLERY PAGE
   Premium Responsive Gallery CSS
========================================================= */


/* =========================================================
   GLOBAL
========================================================= */

.gallery-hero,
.gallery-section,
.gallery-bottom-cta,
.gallery-lightbox {
    box-sizing: border-box;
}

    .gallery-hero *,
    .gallery-section *,
    .gallery-bottom-cta *,
    .gallery-lightbox * {
        box-sizing: border-box;
    }


/* =========================================================
   GALLERY HERO
========================================================= */

.gallery-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    background: linear-gradient( 135deg, rgba(8, 8, 8, 0.97), rgba(25, 25, 25, 0.94) );
    overflow: hidden;
}


    /* Orange decorative shape */

    .gallery-hero::before {
        content: "";
        position: absolute;
        width: 480px;
        height: 480px;
        right: -180px;
        top: -180px;
        border-radius: 50%;
        border: 80px solid rgba(233, 75, 35, 0.08);
    }


    /* Second decoration */

    .gallery-hero::after {
        content: "";
        position: absolute;
        width: 280px;
        height: 280px;
        left: -150px;
        bottom: -170px;
        border-radius: 50%;
        background: rgba(233, 75, 35, 0.10);
    }


/* Hero content */

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 90px 0;
}


/* Label */

.gallery-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    color: #e94b23;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
}


    .gallery-label::before {
        content: "";
        width: 40px;
        height: 2px;
        margin-right: 12px;
        background: #e94b23;
    }


/* Hero heading */

.gallery-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -1.5px;
}


    .gallery-hero h1 span {
        color: #e94b23;
    }


/* Hero paragraph */

.gallery-hero p {
    max-width: 720px;
    margin: 25px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    line-height: 1.8;
}


/* =========================================================
   BREADCRUMB
========================================================= */

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    font-size: 14px;
}


    .gallery-breadcrumb a {
        color: #ffffff;
        text-decoration: none;
        transition: color 0.3s ease;
    }


        .gallery-breadcrumb a:hover {
            color: #e94b23;
        }


    .gallery-breadcrumb i {
        color: #e94b23;
        font-size: 11px;
    }


    .gallery-breadcrumb span {
        color: rgba(255, 255, 255, 0.55);
    }


/* =========================================================
   GALLERY MAIN SECTION
========================================================= */

.gallery-section {
    position: relative;
    padding: 100px 0 110px;
    background: #ffffff;
    overflow: hidden;
}


    /* =========================================================
   SECTION HEADING
========================================================= */

    .gallery-section .section-heading {
        max-width: 800px;
        margin: 0 auto 45px;
    }


        .gallery-section .section-heading > span {
            display: inline-block;
            margin-bottom: 12px;
            color: #e94b23;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 3px;
            text-transform: uppercase;
        }


        .gallery-section .section-heading h2 {
            margin: 0;
            color: #151515;
            font-size: clamp(32px, 4vw, 48px);
            font-weight: 800;
            line-height: 1.15;
        }


            .gallery-section .section-heading h2 strong {
                color: #e94b23;
                font-weight: 800;
            }


        .gallery-section .section-heading p {
            max-width: 680px;
            margin: 18px auto 0;
            color: #6b6b6b;
            font-size: 16px;
            line-height: 1.8;
        }


/* =========================================================
   FILTER BUTTONS
========================================================= */

.gallery-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 45px;
}


.gallery-filter-btn {
    position: relative;
    border: 1px solid #dedede;
    background: #ffffff;
    color: #444;
    padding: 11px 22px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}


    .gallery-filter-btn:hover {
        border-color: #e94b23;
        color: #e94b23;
        transform: translateY(-2px);
    }


    .gallery-filter-btn.active {
        border-color: #e94b23;
        background: #e94b23;
        color: #ffffff;
        box-shadow: 0 8px 20px rgba(233, 75, 35, 0.20);
    }


/* =========================================================
   GALLERY GRID
========================================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.gallery-item {
    min-width: 0;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.35s ease, transform 0.35s ease;
}


    /* Hidden state controlled by JS */

    .gallery-item.hidden {
        display: none;
    }


/* =========================================================
   GALLERY CARD
========================================================= */

.gallery-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #f3f3f3;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}


    .gallery-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    }


    /* =========================================================
   GALLERY IMAGE
========================================================= */

    .gallery-card > img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
    }


    .gallery-card:hover > img {
        transform: scale(1.08);
        filter: brightness(0.72);
    }


/* =========================================================
   IMAGE OVERLAY
========================================================= */

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 35%, rgba(0, 0, 0, 0.05) 75%, transparent 100% );
    opacity: 0;
    transition: opacity 0.4s ease;
}


.gallery-card:hover .gallery-overlay {
    opacity: 1;
}


/* =========================================================
   OVERLAY TEXT
========================================================= */

.gallery-overlay > div {
    min-width: 0;
    padding-right: 15px;
    transform: translateY(15px);
    transition: transform 0.4s ease;
}


.gallery-card:hover .gallery-overlay > div {
    transform: translateY(0);
}


.gallery-overlay span {
    display: block;
    margin-bottom: 7px;
    color: #e94b23;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}


.gallery-overlay h3 {
    margin: 0;
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}


/* =========================================================
   VIEW / PLUS BUTTON
========================================================= */

.gallery-view-btn {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(15px);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s ease;
}


.gallery-card:hover .gallery-view-btn {
    transform: translateY(0);
}


.gallery-view-btn:hover {
    border-color: #e94b23;
    background: #e94b23;
    transform: translateY(0) rotate(90deg) !important;
}


.gallery-view-btn i {
    font-size: 17px;
}


/* =========================================================
   BOTTOM CTA
========================================================= */

.gallery-bottom-cta {
    position: relative;
    padding: 75px 0;
    background: linear-gradient( 120deg, #111111, #1d1d1d );
    overflow: hidden;
}


    /* CTA orange glow */

    .gallery-bottom-cta::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        right: -180px;
        top: -230px;
        border-radius: 50%;
        background: rgba(233, 75, 35, 0.12);
    }


    /* CTA decoration */

    .gallery-bottom-cta::after {
        content: "";
        position: absolute;
        width: 180px;
        height: 180px;
        left: -100px;
        bottom: -110px;
        border-radius: 50%;
        border: 35px solid rgba(233, 75, 35, 0.08);
    }


.gallery-cta-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}


    .gallery-cta-inner > div {
        max-width: 750px;
    }


    .gallery-cta-inner span {
        display: block;
        margin-bottom: 12px;
        color: #e94b23;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 2px;
    }


    .gallery-cta-inner h2 {
        margin: 0;
        color: #ffffff;
        font-size: clamp(30px, 4vw, 48px);
        font-weight: 700;
        line-height: 1.15;
    }


        .gallery-cta-inner h2 strong {
            color: #e94b23;
        }


/* =========================================================
   CTA BUTTON
========================================================= */

.gallery-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 170px;
    padding: 15px 25px;
    border: 2px solid #e94b23;
    border-radius: 6px;
    background: #e94b23;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}


    .gallery-cta-btn:hover {
        background: transparent;
        color: #ffffff;
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(233, 75, 35, 0.20);
    }


    .gallery-cta-btn i {
        transition: transform 0.3s ease;
    }


    .gallery-cta-btn:hover i {
        transform: translateX(5px);
    }


/* =========================================================
   LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    background: rgba(0, 0, 0, 0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


    .gallery-lightbox.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


/* =========================================================
   LIGHTBOX IMAGE
========================================================= */

#galleryLightboxImage {
    display: block;
    max-width: min(1100px, 92vw);
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.94);
    transition: transform 0.35s ease;
}


.gallery-lightbox.active #galleryLightboxImage {
    transform: scale(1);
}


/* =========================================================
   LIGHTBOX CLOSE
========================================================= */

.gallery-lightbox-close {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}


    .gallery-lightbox-close:hover {
        border-color: #e94b23;
        background: #e94b23;
        transform: rotate(90deg);
    }


    .gallery-lightbox-close i {
        font-size: 17px;
    }


/* =========================================================
   LIGHTBOX TITLE
========================================================= */

.gallery-lightbox-title {
    margin-top: 20px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (max-width: 1199px) {

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-hero-content {
        padding: 80px 0;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    .gallery-hero {
        min-height: 390px;
    }

    .gallery-hero-content {
        padding: 75px 0;
    }

    .gallery-hero h1 {
        font-size: 52px;
    }

    .gallery-section {
        padding: 80px 0 90px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .gallery-overlay {
        opacity: 1;
        padding: 20px;
        background: linear-gradient( to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.15) );
    }

        .gallery-overlay > div,
        .gallery-view-btn {
            transform: translateY(0);
        }

        .gallery-overlay h3 {
            font-size: 19px;
        }

    .gallery-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .gallery-hero {
        min-height: 360px;
    }

    .gallery-hero-content {
        padding: 65px 0;
    }

    .gallery-hero h1 {
        font-size: 42px;
        letter-spacing: -0.8px;
    }

    .gallery-hero p {
        margin-top: 20px;
        font-size: 15px;
        line-height: 1.7;
    }

    .gallery-breadcrumb {
        margin-top: 22px;
    }


    /* Main section */

    .gallery-section {
        padding: 65px 0 75px;
    }


        .gallery-section .section-heading {
            margin-bottom: 35px;
        }

            .gallery-section .section-heading h2 {
                font-size: 34px;
            }

            .gallery-section .section-heading p {
                font-size: 14px;
            }


    /* Filters */

    .gallery-filter {
        gap: 8px;
        margin-bottom: 30px;
    }

    .gallery-filter-btn {
        padding: 9px 16px;
        font-size: 12px;
    }


    /* Grid */

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }


    /* Cards */

    .gallery-card {
        border-radius: 10px;
    }

    .gallery-overlay {
        padding: 14px;
    }

        .gallery-overlay span {
            margin-bottom: 4px;
            font-size: 9px;
            letter-spacing: 1px;
        }

        .gallery-overlay h3 {
            font-size: 15px;
        }


    .gallery-view-btn {
        width: 38px;
        height: 38px;
    }

        .gallery-view-btn i {
            font-size: 13px;
        }


    /* CTA */

    .gallery-bottom-cta {
        padding: 60px 0;
    }

    .gallery-cta-inner {
        gap: 28px;
    }

        .gallery-cta-inner h2 {
            font-size: 32px;
        }

    .gallery-cta-btn {
        width: 100%;
    }


    /* Lightbox */

    .gallery-lightbox {
        padding: 20px;
    }

    #galleryLightboxImage {
        max-width: 94vw;
        max-height: 72vh;
    }

    .gallery-lightbox-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
    }

    .gallery-lightbox-title {
        font-size: 16px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .gallery-hero h1 {
        font-size: 36px;
    }

    .gallery-label {
        font-size: 11px;
        letter-spacing: 2px;
    }

        .gallery-label::before {
            width: 25px;
            margin-right: 8px;
        }


    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }


    .gallery-card {
        aspect-ratio: 16 / 10;
    }


    .gallery-overlay h3 {
        font-size: 18px;
    }


    .gallery-overlay span {
        font-size: 10px;
    }


    .gallery-view-btn {
        width: 42px;
        height: 42px;
    }


    .gallery-section .section-heading h2 {
        font-size: 30px;
    }
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.gallery-filter-btn:focus-visible,
.gallery-view-btn:focus-visible,
.gallery-cta-btn:focus-visible,
.gallery-lightbox-close:focus-visible {
    outline: 3px solid rgba(233, 75, 35, 0.35);
    outline-offset: 3px;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gallery-card,
    .gallery-card img,
    .gallery-overlay,
    .gallery-overlay > div,
    .gallery-view-btn,
    .gallery-item,
    .gallery-lightbox,
    #galleryLightboxImage {
        transition: none !important;
    }
}
