/* ==========================================================
   GALLERY PAGE STYLES — Gaj Niwas Kesari
   Uses root variables defined in style.css
========================================================== */

.gal-wrapper {
    background: var(--bg-body);
    overflow-x: hidden;
}

/* ---------------------------------------------------------
   1. HERO BANNER
---------------------------------------------------------- */
.gal-hero {
    position: relative;
    /* Gradient ko transparent kiya hai taaki gallery banner image sahi se visible ho */
    background: linear-gradient(135deg, rgb(15 23 42 / 30%) 0%, rgb(30 41 59 / 71%) 60%, rgb(15 23 42 / 51%) 100%), url(../img/gall-banner.jpg) no-repeat center center;
    background-size: cover; /*  */
    padding: 150px 24px 90px;
    text-align: center;
    overflow: hidden;
}

.gal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(204, 163, 35, 0.10), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(219, 32, 10, 0.10), transparent 45%);
    pointer-events: none;
}

.gal-hero-container {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.gal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--logo-gold-border);
    border-radius: 50px;
    color: var(--logo-gold-rich);
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(204, 163, 35, 0.08);
    margin-bottom: 22px;
}

.gal-hero-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 18px;
}

.gal-hero-title span {
    color: var(--logo-gold-rich);
    font-style: italic;
}

.gal-hero-desc {
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
    max-width: 620px;
    margin: 0 auto;
}

/* ---------------------------------------------------------
   2. FEATURED SLIDER
---------------------------------------------------------- */
.gal-slider-section {
    padding: 60px 24px 20px;
    display: flex;
    justify-content: center;
}

.gal-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 8;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--dark-royal);
    margin-top: -110px;
}

.gal-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.gal-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition: opacity 1s ease, transform 8s ease, visibility 1s;
}

.gal-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.gal-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gal-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 11, 10, 0.55) 0%, rgba(18, 11, 10, 0) 40%);
}

/* Arrows */
.gal-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(26, 18, 17, 0.35);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--transition);
}

.gal-slider-arrow:hover {
    background: var(--logo-gold-rich);
    border-color: var(--logo-gold-rich);
    color: var(--dark-royal);
    transform: translateY(-50%) scale(1.08);
}

.gal-prev { left: 20px; }
.gal-next { right: 20px; }

/* Slide counter */
.gal-slide-counter {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 5;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    background: rgba(18, 11, 10, 0.45);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gal-slide-counter #galCurrentSlide {
    color: var(--logo-gold-rich);
    font-weight: 700;
}

/* Dots */
.gal-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 9px;
    z-index: 5;
}

.gal-slider-dots .gal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.gal-slider-dots .gal-dot.active {
    background: var(--logo-gold-rich);
    width: 26px;
    border-radius: 6px;
}

/* ---------------------------------------------------------
   3. GRID SECTION
---------------------------------------------------------- */
.gal-grid-section {
    padding: 50px 24px 50px;
}

.gal-container {
    max-width: 1280px;
    margin: 0 auto;
}

.gal-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 40px;
}

.gal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--logo-red);
    font-family: "Montserrat", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.gal-section-head h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.gal-section-head h2 span {
    color: var(--logo-red);
    font-style: italic;
}

.gal-section-head p {
    font-family: "Montserrat", sans-serif;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

/* Filter Tabs */
.gal-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 44px;
}

.gal-tab-btn {
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.gal-tab-btn:hover {
    border-color: var(--logo-gold-rich);
    color: var(--logo-gold-hover);
}

.gal-tab-btn.active {
    background: var(--logo-red);
    border-color: var(--logo-red);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* Photo Grid (masonry-style via CSS columns) */
.gal-photo-grid {
    columns: 4 260px;
    column-gap: 18px;
}

.gal-photo-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3;
    background: #1A1211;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.gal-photo-item:hover {
    box-shadow: var(--shadow-lg);
}

.gal-photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 1s ease-in-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.gal-photo-item img.img-primary {
    opacity: 1;
    z-index: 1;
}

.gal-photo-item img.img-secondary {
    opacity: 0;
    z-index: 2;
}

/* Hover OR active-alt auto-switch class for 3-second cycle */
.gal-photo-item:hover img.img-primary,
.gal-photo-item.active-alt img.img-primary {
    opacity: 0;
    transform: scale(1.08);
}

.gal-photo-item:hover img.img-secondary,
.gal-photo-item.active-alt img.img-secondary {
    opacity: 1;
    transform: scale(1.08);
}

.gal-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 11, 10, 0.65) 0%, rgba(18, 11, 10, 0) 55%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: var(--transition);
    z-index: 3;
}

.gal-photo-item:hover .gal-photo-overlay {
    opacity: 1;
}

.gal-photo-overlay i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--logo-gold-rich);
    color: var(--dark-royal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Hidden by filter */
.gal-photo-item.gal-hide {
    display: none;
}

/* CTA */
.gal-cta-wrap {
    text-align: center;
    margin-top: 56px;
}

.gal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--logo-red);
    padding: 15px 34px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gal-cta-btn:hover {
    background: var(--logo-red-hover);
    transform: translateY(-3px);
}

/* ---------------------------------------------------------
   4. LIGHTBOX MODAL
---------------------------------------------------------- */
.gal-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 5, 0.94);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gal-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gal-lb-content {
    position: relative;
    max-width: 90vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gal-lb-content img {
    max-width: 90vw;
    max-height: 78vh;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.gal-lightbox.active .gal-lb-content img {
    transform: scale(1);
    opacity: 1;
}

.gal-lb-counter {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.75);
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.gal-lb-counter #galLbCurrent {
    color: var(--logo-gold-rich);
    font-weight: 700;
}

.gal-lb-close {
    position: absolute;
    top: 26px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.gal-lb-close:hover {
    background: var(--logo-red);
    border-color: var(--logo-red);
    transform: rotate(90deg);
}

.gal-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.gal-lb-arrow:hover {
    background: var(--logo-gold-rich);
    border-color: var(--logo-gold-rich);
    color: var(--dark-royal);
}

.gal-lb-prev { left: 26px; }
.gal-lb-next { right: 26px; }

/* ---------------------------------------------------------
   5. RESPONSIVE
---------------------------------------------------------- */
@media (max-width: 992px) {
    .gal-photo-grid { columns: 3 220px; }
    .gal-slider { aspect-ratio: 16 / 10; margin-top: -80px; }
}

@media (max-width: 768px) {
    .gal-hero { padding: 130px 20px 100px; }
    .gal-photo-grid { columns: 2 160px; column-gap: 12px; }
    .gal-photo-item { margin-bottom: 12px; border-radius: 10px; }
    .gal-slider { aspect-ratio: 4 / 5; margin-top: -70px; border-radius: 14px; }
    .gal-slider-arrow { width: 40px; height: 40px; font-size: 0.85rem; }
    .gal-lb-arrow { width: 42px; height: 42px; }
    .gal-lb-prev { left: 10px; }
    .gal-lb-next { right: 10px; }
    .gal-lb-close { top: 16px; right: 16px; }
}

@media (max-width: 480px) {
    .gal-photo-grid { columns: 2 140px; }
    .gal-filter-tabs { gap: 8px; }
    .gal-tab-btn { padding: 8px 16px; font-size: 0.78rem; }
}