/* ============================================================
   DERMIIZ — GALLERY PAGE STYLES
   - Hero Banner with gallery_hero_banner.png
   - Filter Tabs
   - Masonry / Responsive Grid Layout
   - Lightbox Overlay
   - CTA Section
   - Responsive Layouts
   ============================================================ */

/* Base Page Overrides */
body.gallery-page {
    background-color: #F8F2EB;
    color: #302522;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   1. HERO BANNER
   ============================================================ */
.gallery-hero-banner {
    position: relative;
    background-color: #241B19;
    background-image:
        linear-gradient(to right,
            rgba(28, 20, 18, 0.92) 0%,
            rgba(28, 20, 18, 0.55) 40%,
            rgba(28, 20, 18, 0.18) 80%),
        url('../assets/gallery/gallery_hero_banner.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #FFFFFF;
    min-height: 590px;
    border-radius: 0 0 28px 28px;
    padding: 10rem 3.5rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.gallery-hero-content {
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.gallery-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #E8DFD7;
    margin-bottom: 0.85rem;
}

.gallery-hero-eyebrow .eyebrow-line {
    display: inline-block;
    width: 32px;
    height: 1.5px;
    background: #CEE944;
}

.gallery-hero-heading {
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.13;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    margin: 0 0 1.4rem 0;
}

.gallery-hero-desc {
    font-size: 1.1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.80);
    max-width: 560px;
    margin-bottom: 1.85rem;
}

.gallery-hero-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(45, 35, 32, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gallery-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.70);
    text-decoration: none;
    transition: color 0.2s;
}

.gallery-hero-breadcrumb a:hover,
.gallery-hero-breadcrumb a.current {
    color: #FFFFFF;
}

.gallery-hero-breadcrumb .separator {
    opacity: 0.45;
    font-size: 0.75rem;
}

/* ============================================================
   2. GALLERY FILTER TABS
   ============================================================ */
.gallery-filter-section {
    padding: 3.5rem 0 0;
}

.gallery-filter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #302522;
    opacity: 0.55;
    margin-bottom: 0.85rem;
}

.gallery-section-eyebrow .eyebrow-line {
    display: inline-block;
    width: 28px;
    height: 1.5px;
    background: #302522;
    opacity: 0.4;
}

.gallery-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #302522;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.gallery-section-subtitle {
    font-size: 1.05rem;
    color: rgba(48, 37, 34, 0.6);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

.gallery-filter-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.6rem;
    border-radius: 999px;
    border: 1.5px solid rgba(48, 37, 34, 0.18);
    background: transparent;
    color: rgba(48, 37, 34, 0.7);
    font-family: 'Onest', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-filter-btn:hover {
    border-color: rgba(48, 37, 34, 0.45);
    color: #302522;
    background: rgba(48, 37, 34, 0.05);
}

.gallery-filter-btn.active {
    background: #302522;
    border-color: #302522;
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(48, 37, 34, 0.18);
}

.gallery-filter-btn .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(48, 37, 34, 0.12);
    color: inherit;
    transition: background 0.25s;
}

.gallery-filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
}

/* ============================================================
   3. GALLERY GRID
   ============================================================ */
.gallery-grid-section {
    padding: 0 0 5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

/* Gallery Card — matches reference image design exactly */
.gallery-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #302522;
    border: 2.5px solid #302522;
    box-shadow: 0 4px 18px rgba(48, 37, 34, 0.09);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

/* Remove tall card spanning — all cards are uniform */
.gallery-card.tall {
    grid-row: span 1;
    aspect-ratio: unset;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(48, 37, 34, 0.18);
}

/* Image wrapper — fixed height, object-fit cover */
.gallery-card img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    display: block;
    border-radius: 11px 11px 0 0;
    flex-shrink: 0;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Bottom text bar — always visible, dark brown background */
.gallery-card-overlay {
    position: static;
    background: #302522;
    padding: 0.85rem 1rem 0.95rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    flex: 1;
    min-height: 66px;
    border-radius: 0 0 11px 11px;
}

/* Title text — always visible, white, bold */
.gallery-card-label {
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
    transform: none;
    transition: none;
    line-height: 1.25;
    text-align: left;
}

/* Subtitle text — always visible, lighter white */
.gallery-card-sublabel {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
    transform: none;
    transition: none;
    line-height: 1.2;
    text-align: left;
}

/* Prevent hover animation on text since it's always visible */
.gallery-card:hover .gallery-card-label,
.gallery-card:hover .gallery-card-sublabel {
    transform: none;
}

/* Zoom icon removed for clean look matching reference image */
.gallery-card-zoom-icon {
    display: none;
}

/* Hidden filter state */
.gallery-card.hidden {
    display: none;
}

/* ============================================================
   4. LIGHTBOX
   ============================================================ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 14, 12, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 2rem;
}

.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-inner {
    position: relative;
    max-width: 1100px;
    max-height: 88vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-lightbox.open img {
    transform: scale(1);
}

/* Lightbox Caption */
.gallery-lightbox-caption {
    position: absolute;
    bottom: -2.75rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Close Button */
.gallery-lightbox-close {
    position: absolute;
    top: -1rem;
    right: -1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

.gallery-lightbox-close svg {
    width: 18px;
    height: 18px;
    stroke: #FFFFFF;
    stroke-width: 2;
}

/* Prev / Next Arrows */
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.gallery-lightbox-prev {
    left: -4rem;
}

.gallery-lightbox-next {
    right: -4rem;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-prev svg,
.gallery-lightbox-next svg {
    width: 20px;
    height: 20px;
    stroke: #FFFFFF;
    stroke-width: 2;
}

/* Lightbox Counter */
.gallery-lightbox-counter {
    position: absolute;
    bottom: -2.25rem;
    right: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

/* ============================================================
   5. GALLERY CTA SECTION
   ============================================================ */
.gallery-cta-section {
    padding: 4rem 0 5.5rem;
}

.gallery-cta-card {
    background: #302522;
    border-radius: 24px;
    padding: 4rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.gallery-cta-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(206, 233, 68, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.gallery-cta-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(248, 227, 203, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.gallery-cta-text {
    position: relative;
    z-index: 2;
}



.gallery-cta-heading {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    line-height: 1.22;
    margin: 0 0 0.6rem;
}

.gallery-cta-subtext {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.6;
    max-width: 420px;
}

.gallery-cta-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 999px;
    background: #CEE944;
    color: #1E1A18;
    font-family: 'Onest', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 6px 20px rgba(206, 233, 68, 0.3);
    white-space: nowrap;
}

.btn-cta-primary:hover {
    background: #ddf73f;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(206, 233, 68, 0.4);
}

.btn-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-family: 'Onest', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
}

.btn-cta-ghost:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.07);
}

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

    .gallery-card img {
        height: 180px;
    }

    .gallery-lightbox-prev {
        left: -2.5rem;
    }

    .gallery-lightbox-next {
        right: -2.5rem;
    }
}

@media (max-width: 900px) {
    .gallery-hero-heading {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }

    .gallery-card img {
        height: 160px;
    }

    .gallery-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 2.5rem 2rem;
    }

    .gallery-cta-heading {
        font-size: 1.85rem;
    }

    .gallery-section-title {
        font-size: 2rem;
    }

    .gallery-lightbox-prev {
        left: 0.5rem;
    }

    .gallery-lightbox-next {
        right: 0.5rem;
    }
}

@media (max-width: 600px) {
    .gallery-hero-banner {
        min-height: 460px;
        padding: 7rem 1.5rem 3.5rem;
    }

    .gallery-hero-heading {
        font-size: 1.9rem;
    }

    .gallery-hero-desc {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .gallery-card img {
        height: 140px;
    }

    .gallery-section-title {
        font-size: 1.75rem;
    }

    .gallery-filter-btn {
        font-size: 0.82rem;
        padding: 0.42rem 1rem;
    }

    .gallery-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cta-primary,
    .btn-cta-ghost {
        width: 100%;
        justify-content: center;
    }

    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        display: none;
    }
}