@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --orange: #c35406;
    --orange-2: #fd7c47;
    --orange-soft: #fff1e9;
    --paper: #f7f2ee;
    --white: #ffffff;
    --text: #151515;
    --muted: #6f7a83;
    --line: #eadbd2;
    --shadow: 0 22px 55px rgba(0, 0, 0, 0.12);
    --font-main: "Urbanist", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-main);
}

button { font-family: inherit; }

.gallery-page {
    min-height: 100vh;
    background:
            radial-gradient(circle at top left, rgba(253, 124, 71, 0.18), transparent 34%),
            radial-gradient(circle at bottom right, rgba(195, 84, 6, 0.12), transparent 32%),
            var(--paper);
}

.gallery-container {
    width: min(1480px, calc(100% - 80px));
    margin: 0 auto;
}


.gallery-hero {
    position: relative;
    padding: clamp(60px, 7vw, 100px) 0 clamp(45px, 6vw, 75px);
}

.gallery-hero::before {
    content: "";
    position: absolute;
    top: -170px;
    right: -120px;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    background: rgba(253, 124, 71, 0.18);
    filter: blur(10px);
}

.gallery-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(35px, 4vw, 56px);
}

.gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 18px;
    border: 1px solid rgba(195, 84, 6, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(195, 84, 6, 0.08);
}

.gallery-tag i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange-2);
    display: inline-block;
}

.gallery-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(42px, 5vw, 76px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.5px;
}

.gallery-hero h1 span { color: var(--orange-2); }

.gallery-hero p {
    max-width: 660px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.75;
    letter-spacing: 0.2px;
}

.gallery-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.gallery-stat {
    min-width: 145px;
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
}

.gallery-stat strong {
    display: block;
    color: var(--orange);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.gallery-stat span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.hero-collage {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: 540px;
    justify-self: end;
}

.collage-card {
    position: absolute;
    overflow: hidden;
    border: 8px solid var(--white);
    border-radius: 34px;
    background: linear-gradient(135deg, #fff, #fff3ed);
    box-shadow: var(--shadow);
}

.collage-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.collage-card.big {
    right: 0;
    top: 20px;
    width: 68%;
    height: 420px;
}

.collage-card.small {
    left: 0;
    bottom: 20px;
    width: 42%;
    height: 285px;
}

.collage-badge {
    position: absolute;
    left: 25%;
    top: 150px;
    z-index: 5;
    width: 176px;
    height: 176px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    text-align: center;
    box-shadow: 0 22px 40px rgba(195, 84, 6, 0.34);
}

.collage-badge span {
    max-width: 110px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.22;
}


.gallery-work { padding: 30px 0 105px; }

.gallery-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 35px;
}

.gallery-title h2 {
    margin: 0 0 10px;
    color: var(--orange-2);
    font-size: 36px;
    font-weight: 900;
    line-height: 1.15;
}

.gallery-title p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    max-width: 620px;
}

.filter-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--orange);
    background: var(--orange);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(195, 84, 6, 0.24);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 105px;
    gap: 20px;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #fff3ed);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    isolation: isolate;
}

.gallery-card.feature { grid-column: span 2; grid-row: span 4; }
.gallery-card.tall { grid-row: span 3; }
.gallery-card.normal { grid-row: span 2; }
.gallery-card.wide { grid-column: span 2; grid-row: span 2; }

.gallery-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.55s ease;
}

.gallery-card:hover img { transform: scale(1.1); }

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.18), transparent);
    opacity: 0;
    transition: 0.35s ease;
}

.gallery-card:hover::after { opacity: 1; }

.gallery-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: 0.35s ease;
}

.gallery-card:hover .gallery-info {
    transform: translateY(0);
    opacity: 1;
}

.gallery-info span {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--orange-2);
    color: var(--white);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gallery-info h3 {
    margin: 0;
    color: var(--white);
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: 900;
    line-height: 1.15;
}

.gallery-empty {
    grid-column: 1 / -1;
    padding: 50px;
    border-radius: 28px;
    background: var(--white);
    color: var(--muted);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}


.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(10px);
}

.lightbox.active { display: flex; }

.lightbox-box {
    position: relative;
    width: min(1050px, 94vw);
    animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-box img {
    width: 100%;
    max-height: 86vh;
    object-fit: contain;
    display: block;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.lightbox-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(195, 84, 6, 0.34);
}


@media (max-width: 1200px) {
    .gallery-container { width: calc(100% - 54px); }
    .gallery-hero-grid { grid-template-columns: 1fr; }
    .hero-collage { justify-self: center; max-width: 760px; height: 470px; }
    .collage-card.big { height: 390px; }
    .collage-card.small { height: 270px; }
    .gallery-toolbar { flex-direction: column; align-items: flex-start; }
    .gallery-filters { justify-content: flex-start; max-width: 100%; }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 105px; }
    .gallery-card.feature, .gallery-card.wide { grid-column: span 2; }
}

@media (max-width: 900px) {
    .gallery-container { width: calc(100% - 40px); }
    .gallery-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
    .gallery-stat { min-width: 0; }
    .hero-collage { height: 420px; }
    .collage-card.big { height: 350px; }
    .collage-card.small { height: 250px; }
    .collage-badge { width: 140px; height: 140px; left: 38%; }
    .collage-badge span { font-size: 15px; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 115px; }
    .gallery-card.feature, .gallery-card.wide { grid-column: span 2; }
}

@media (max-width: 620px) {
    .gallery-container { width: calc(100% - 28px); }
    .gallery-hero { padding: 58px 0 40px; }
    .gallery-tag { padding: 9px 14px; font-size: 11px; letter-spacing: 1.5px; }
    .gallery-hero h1 { font-size: 39px; letter-spacing: -0.7px; }
    .gallery-hero p { margin-top: 20px; font-size: 15.5px; line-height: 1.65; }
    .gallery-stats { grid-template-columns: 1fr; gap: 12px; margin-top: 26px; }
    .gallery-stat { padding: 16px 18px; border-radius: 18px; }
    .gallery-stat strong { font-size: 24px; }
    .hero-collage { height: auto; display: grid; gap: 16px; margin-top: 10px; }
    .collage-card { position: relative; inset: auto !important; width: 100% !important; height: 270px !important; border-width: 5px; border-radius: 22px; }
    .collage-badge { display: none; }
    .gallery-work { padding: 35px 0 70px; }
    .gallery-title h2 { font-size: 30px; }
    .gallery-title p { font-size: 15px; }
    .gallery-filters { width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; gap: 10px; scrollbar-width: none; }
    .gallery-filters::-webkit-scrollbar { display: none; }
    .filter-btn { flex: 0 0 auto; padding: 10px 16px; font-size: 13px; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 18px; }
    .gallery-card, .gallery-card.feature, .gallery-card.wide, .gallery-card.tall, .gallery-card.normal { grid-column: auto; grid-row: auto; height: 310px; border-radius: 22px; }
    .gallery-info { left: 18px; right: 18px; bottom: 18px; opacity: 1; transform: none; }
    .gallery-card::after { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.58), rgba(0,0,0,.12), transparent); }
    .gallery-info h3 { font-size: 20px; }
    .lightbox { padding: 16px; }
    .lightbox-box img { border-radius: 18px; }
    .lightbox-close { top: -14px; right: -8px; width: 42px; height: 42px; }
}

@media (max-width: 390px) {
    .gallery-hero h1 { font-size: 34px; }
    .gallery-card, .gallery-card.feature, .gallery-card.wide, .gallery-card.tall, .gallery-card.normal { height: 280px; }
    .collage-card { height: 240px !important; }
}


/* ==============================
   GALLERY RESPONSIVE FIX
   Same pattern as header/footer
   ============================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* Desktop container same style */
.gallery-container {
    width: min(1500px, calc(100% - 110px));
    max-width: 100%;
    margin: 0 auto;
}

/* Image stretch fix */
.gallery-card img,
.collage-card img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center;
}

/* Tablet / small laptop */
@media (max-width: 1180px) {
    .gallery-container {
        width: calc(100% - 48px);
    }

    .gallery-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-collage {
        justify-self: start;
        width: 100%;
        max-width: 620px;
        height: 430px;
    }

    .collage-card.big {
        height: 350px;
    }

    .collage-card.small {
        height: 240px;
    }

    .gallery-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .gallery-filters {
        justify-content: flex-start;
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 105px;
    }
}

/* Mobile header breakpoint jaisa */
@media (max-width: 860px) {
    .gallery-container {
        width: calc(100% - 48px);
    }

    .gallery-hero {
        padding: 48px 0 45px;
    }

    .gallery-hero h1 {
        font-size: 38px;
        line-height: 1.08;
        letter-spacing: -0.4px;
    }

    .gallery-hero p {
        font-size: 16px;
        line-height: 1.6;
        margin-top: 18px;
    }

    .gallery-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 26px;
    }

    .gallery-stat {
        width: 100%;
        min-width: 0;
    }

    .hero-collage {
        height: auto;
        display: grid;
        gap: 16px;
        max-width: 100%;
        margin-top: 10px;
    }

    .collage-card {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: 260px !important;
        border-width: 5px;
        border-radius: 22px;
    }

    .collage-badge {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        gap: 18px;
    }

    .gallery-card,
    .gallery-card.feature,
    .gallery-card.wide,
    .gallery-card.tall,
    .gallery-card.normal {
        grid-column: auto !important;
        grid-row: auto !important;
        height: 280px;
        border-radius: 22px;
    }
}

/* Phone */
@media (max-width: 620px) {
    .gallery-container {
        width: calc(100% - 32px);
    }

    .gallery-page {
        width: 100%;
        overflow-x: hidden;
    }

    .gallery-hero {
        padding: 42px 0 34px;
    }

    .gallery-tag {
        padding: 9px 14px;
        font-size: 11px;
        letter-spacing: 1.4px;
    }

    .gallery-hero h1 {
        font-size: 32px;
        line-height: 1.08;
        letter-spacing: 0;
    }

    .gallery-hero p {
        font-size: 15px;
        line-height: 1.58;
    }

    .gallery-work {
        padding: 28px 0 70px;
    }

    .gallery-title h2 {
        font-size: 28px;
        line-height: 1.14;
    }

    .gallery-title p {
        font-size: 15px;
        line-height: 1.55;
    }

    .gallery-filters {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex: 0 0 auto;
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-card,
    .gallery-card.feature,
    .gallery-card.wide,
    .gallery-card.tall,
    .gallery-card.normal {
        width: 100%;
        height: 260px;
    }

    .gallery-info {
        left: 18px;
        right: 18px;
        bottom: 18px;
        opacity: 1;
        transform: none;
    }

    .gallery-card::after {
        opacity: 1;
        background: linear-gradient(
                to top,
                rgba(0, 0, 0, 0.58),
                rgba(0, 0, 0, 0.12),
                transparent
        );
    }

    .gallery-info h3 {
        font-size: 20px;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox-box {
        width: 100%;
    }

    .lightbox-box img {
        max-height: 80vh;
        border-radius: 18px;
    }

    .lightbox-close {
        top: -12px;
        right: -4px;
        width: 40px;
        height: 40px;
    }
}

/* Small phone */
@media (max-width: 390px) {
    .gallery-container {
        width: calc(100% - 26px);
    }

    .gallery-hero h1 {
        font-size: 29px;
    }

    .gallery-card,
    .gallery-card.feature,
    .gallery-card.wide,
    .gallery-card.tall,
    .gallery-card.normal,
    .collage-card {
        height: 230px !important;
    }
}

/* Final mobile containment: keep gallery page and shared header inside viewport. */
.gallery-page,
.gallery-hero,
.gallery-work,
.gallery-toolbar,
.gallery-grid {
    max-width: 100%;
}

@media (max-width: 860px) {
    .site-header,
    .gallery-page {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    .nav-shell {
        width: calc(100% - 32px) !important;
        max-width: 100% !important;
        min-width: 0;
    }

    .brand {
        min-width: 0;
        max-width: calc(100vw - 92px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .primary-nav {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 74px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .dropdown-panel {
        max-width: 100%;
    }

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

    .gallery-copy,
    .gallery-title,
    .gallery-toolbar,
    .gallery-filters,
    .gallery-grid {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 430px) {
    .nav-shell,
    .gallery-container {
        width: calc(100% - 20px) !important;
    }

    .brand {
        max-width: calc(100vw - 82px);
        font-size: 18px;
    }

    .gallery-tag {
        max-width: 100%;
        letter-spacing: 1px;
        white-space: normal;
    }
}
