/**
 * ============================================================
 * FILE: gallery.css
 * PROJECT: Rudra Holidays
 * ============================================================
 * Purpose:  Styles for the Gallery page. Includes hero
 *           section, filter buttons, responsive gallery grid,
 *           gallery item hover overlays, lightbox, and
 *           collage section.
 *
 * Used By:  html/gallery.html
 *
 * Depends On:
 *   theme.css       → dark mode overrides
 *   responsive.css  → media queries
 *
 * Contains:
 *   - CSS variables (:root)
 *   - Header & navigation
 *   - Gallery hero section
 *   - Filter button bar (.filter-btn)
 *   - Gallery grid (.gallery-item, .overlay)
 *   - Hide animation for filtered items
 *   - Lightbox overlay (#lightbox)
 *   - Collage section
 *   - Footer strip
 * ============================================================
 */
:root {
    --primary-color: #b91c1c;
    --primary-hover: #991b1b;
    --primary-dark: #7f1d1d;
    --accent-color: #f59e0b;

    --bg-main: #faf7f0;
    --bg-card: #ffffff;
    --bg-soft: #fffaf5;

    --text-color: #1f2937;
    --text-muted: #6b7280;
    --text-light: #ffffff;

    --border-color: rgba(127, 29, 29, 0.12);
    --border-strong: rgba(127, 29, 29, 0.20);

    --shadow-sm: 0 6px 18px rgba(31, 41, 55, 0.06);
    --shadow-md: 0 14px 34px rgba(31, 41, 55, 0.10);
    --shadow-lg: 0 24px 60px rgba(31, 41, 55, 0.14);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background:
        radial-gradient(circle at top left, rgba(185, 28, 28, 0.05), transparent 24%),
        radial-gradient(circle at 85% 12%, rgba(245, 158, 11, 0.10), transparent 20%),
        linear-gradient(180deg, #fffdf8 0%, var(--bg-main) 100%);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1400px, calc(100% - clamp(24px, 4vw, 32px)));
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    padding: 13px 22px;
    border-radius: 14px;
    transition: 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn i {
    font-size: 1.15rem;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    box-shadow: 0 10px 28px rgba(185, 28, 28, 0.18);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(185, 28, 28, 0.24);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.76);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: #fff;
    border-color: rgba(185, 28, 28, 0.18);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    padding: 16px 0;
    background: rgba(250, 247, 240, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(127, 29, 29, 0.08);
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo img {
    height: 72px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-list a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    transition: 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-dark);
    font-size: 1.7rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 150;
}

.mobile-nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particles span {
    position: absolute;
    border-radius: 50%;
    background: rgba(185, 28, 28, 0.50);
    box-shadow: 0 0 18px rgba(185, 28, 28, 0.24);
    animation: floatParticle linear infinite;
    opacity: 0.75;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.75;
    }
    50% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(-120px) translateX(30px) scale(0.9);
        opacity: 0;
    }
}

.gallery-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 130px 0 60px;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.7;
}

.hero-orb-1 {
    width: 320px;
    height: 320px;
    top: 6%;
    left: -8%;
    background: rgba(185, 28, 28, 0.16);
}

.hero-orb-2 {
    width: 260px;
    height: 260px;
    right: 4%;
    bottom: 10%;
    background: rgba(245, 158, 11, 0.12);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    gap: 34px;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
}

.subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-size: 0.82rem;
    letter-spacing: 3px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.subtitle::before,
.subtitle::after {
    content: "";
    display: inline-block;
    width: 30px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-color);
}

.hero-copy h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
    color: #111827;
}

.hero-copy h1 span {
    color: var(--primary-color);
}

.hero-description {
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
    max-width: 640px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(127, 29, 29, 0.10);
    border-radius: 22px;
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.stat-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.hero-visual {
    position: relative;
    min-height: 540px;
    display: grid;
    place-items: center;
}


/* ============================================ */
/* GALLERY HERO SLIDER */
/* ============================================ */
.gallery-hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 400px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: rgba(0,0,0,0.05);
}
.gh-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gh-slide {
    flex: 0 0 100%;
    height: 100%;
}
.gh-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gh-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}
.gh-btn {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}
.gh-btn:hover {
    background: #fff;
    transform: scale(1.1);
    color: var(--primary-color);
}
.gh-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.gh-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.gh-dot.active {
    background: #fff;
    width: 24px;
}
.gallery-section {
    padding: 30px 0 80px;
    position: relative;
    z-index: 2;
}

.section-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 28px;
}

.section-head h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    margin-bottom: 12px;
    color: #111827;
}

.section-head p:last-child {
    color: var(--text-muted);
    line-height: 1.75;
}

.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-btn {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.75);
    color: var(--primary-dark);
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s ease;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    display: block;
    width: 100%;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    isolation: isolate;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    z-index: 10;
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.25);
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.74));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 16px;
    opacity: 0;
    transition: 0.3s ease;
    color: #fff;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay span {
    font-weight: 800;
    font-size: 0.95rem;
}

.gallery-item .overlay i {
    font-size: 1.4rem;
    color: #fff;
}

.gallery-item.hide {
    display: none;
}



.cta-section {
    padding: 20px 0 34px;
    position: relative;
    z-index: 2;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(185, 28, 28, 0.12), transparent 35%),
        linear-gradient(180deg, #fff 0%, #fffaf4 100%);
    border: 1px solid rgba(127, 29, 29, 0.10);
    box-shadow: var(--shadow-lg);
}

.cta-inner h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    margin: 10px 0;
    color: #111827;
}

.cta-inner p:last-child {
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 560px;
}

.cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
    flex-direction: column;
    gap: 14px;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: min(1100px, 96vw);
    max-height: 80vh;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    object-fit: contain;
    background: #111;
}

.lightbox p {
    color: #eaeaea;
    font-size: 1rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.lightbox-close:hover {
    background: rgba(185, 28, 28, 0.20);
}

.footer-strip {
    background: linear-gradient(180deg, #8f1f1f 0%, #7f1d1d 100%);
    min-height: 88px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.footer-strip-inner {
    display: flex;
    align-items: center;
    min-height: 88px;
}

.footer-strip p {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 460px;
        order: -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-item.wide,
    .gallery-item.tall,
    .gallery-item:not(.wide):not(.tall) {
        grid-column: span 1;
        min-height: 260px;
    }

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .nav-list {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .btn-nav {
        display: none;
    }

    .nav-list.open {
        display: flex;
        position: fixed;
        top: 96px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, 0.97);
        border: 1px solid rgba(127, 29, 29, 0.10);
        border-radius: 22px;
        padding: 12px;
        box-shadow: var(--shadow-lg);
        z-index: 250;
    }

    .nav-list.open li {
        width: 100%;
    }

    .nav-list.open a {
        display: block;
        padding: 14px;
        border-radius: 14px;
    }

    .nav-list.open a:hover,
    .nav-list.open a.active {
        background: rgba(185, 28, 28, 0.08);
    }

    .nav-list.open a::after {
        display: none;
    }
}

@media (max-width: 900px) {
    .hero-copy h1 {
        font-size: clamp(2.6rem, 10vw, 4.4rem);
    }
}

@media (max-width: 768px) {
    .container {
        width: min(1400px, calc(100% - 20px));
    }

    .gallery-hero {
        padding-top: 116px;
        min-height: auto;
    }

    .hero-actions,
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: auto;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
    }

    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-bottom: 8px;
        gap: 8px;
    }

    .filter-btn {
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    .cta-inner {
        padding: 18px;
        border-radius: 22px;
    }

    .stat-card {
        padding: 14px 12px;
    }

    .lightbox img {
        border-radius: 16px;
    }
}
