/* ==========================================================================
   HOTEL DARSHAN - LUXURY MASONRY GALLERY & LIGHTBOX ARCHITECTURE
   ========================================================================== */

/* Outer Section Layout */
.darshan-gallery-section {
    position: relative;
    width: 100%;
    background-color: var(--color-bg-primary, #F7F3EC);
    color: var(--color-text-primary, #342A22);
    padding: 9rem 0;
    z-index: 10;
}

.gallery-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Editorial Section Header */
.gallery-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 4.5rem auto;
}

.gallery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.gallery-badge .badge-line {
    width: 30px;
    height: 1.5px;
    background-color: var(--color-gold-accent, #C79A3B);
}

.gallery-badge .badge-text {
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--color-gold-accent, #C79A3B);
    text-transform: uppercase;
}

.gallery-title {
    font-family: var(--font-heading, "Cormorant Garamond", serif);
    font-size: clamp(2.75rem, 4.2vw, 4.25rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--color-text-primary, #342A22);
    margin: 0 0 1.5rem 0;
}

.gallery-title .title-line {
    display: block;
}

.gallery-title .italic-gold {
    font-style: italic;
    font-weight: 400;
    color: var(--color-gold-accent, #C79A3B);
}

.gallery-description {
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text-secondary, #6B625A);
    margin-bottom: 2.75rem;
}

/* Category Filter Bar */
.gallery-filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-pill {
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    background: var(--color-bg-secondary, #F1EBE1);
    border: 1px solid var(--color-border, #E4DBCF);
    color: var(--color-text-primary, #342A22);
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.filter-pill:hover,
.filter-pill.is-active {
    background: var(--color-gold-accent, #C79A3B);
    border-color: var(--color-gold-accent, #C79A3B);
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(199, 154, 59, 0.25);
}

/* Asymmetrical Masonry Grid System */
.gallery-masonry-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 280px;
    gap: 1.75rem;
}

.gallery-item {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--color-border, #E4DBCF);
    box-shadow: 0 10px 30px var(--color-shadow, rgba(55, 45, 35, 0.06));
    transition: 
        opacity 0.5s ease,
        transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.gallery-item.is-hidden {
    display: none;
}

/* Aspect Spans */
.gallery-item.masonry-standard {
    grid-column: span 4;
    grid-row: span 1;
}

.gallery-item.masonry-tall {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery-item.masonry-wide {
    grid-column: span 8;
    grid-row: span 1;
}

.gallery-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

/* Hover Glass Overlay */
.gallery-glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(30, 24, 18, 0) 0%,
        rgba(30, 24, 18, 0.4) 40%,
        rgba(30, 24, 18, 0.88) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item:hover .gallery-glass-overlay {
    opacity: 1;
}

.gallery-tag {
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold-accent, #C79A3B);
    margin-bottom: 0.4rem;
}

.gallery-item-title {
    font-family: var(--font-heading, "Cormorant Garamond", serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: #FFFDF8;
    margin: 0;
    line-height: 1.2;
}

.gallery-view-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.35s ease, transform 0.35s ease;
}

.view-svg {
    width: 18px;
    height: 18px;
    stroke: #FFFDF8;
}

.gallery-item:hover .gallery-view-btn {
    background: var(--color-gold-accent, #C79A3B);
    transform: scale(1.08);
}

/* ==========================================================================
   FULLSCREEN LIGHTBOX MODAL
   ========================================================================== */

.darshan-lightbox-modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.5s ease;
}

.darshan-lightbox-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 14, 10, 0.94);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.lightbox-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.lightbox-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #FFFDF8;
    font-family: var(--font-body, "Manrope", sans-serif);
}

.lightbox-counter {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-gold-accent, #C79A3B);
}

.lightbox-caption {
    font-family: var(--font-heading, "Cormorant Garamond", serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: #FFFDF8;
}

.lightbox-close-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.35s ease, transform 0.35s ease;
}

.lightbox-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #FFFDF8;
}

.lightbox-close-btn:hover {
    background: var(--color-gold-accent, #C79A3B);
    transform: rotate(90deg);
}

.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
}

.lightbox-image-wrap {
    max-width: 80%;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-active-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.lightbox-nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.35s ease, transform 0.35s ease;
}

.lightbox-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke: #FFFDF8;
}

.lightbox-nav-btn:hover {
    background: var(--color-gold-accent, #C79A3B);
    transform: scale(1.1);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1200px) {
    .gallery-masonry-grid {
        grid-auto-rows: 240px;
    }

    .gallery-item.masonry-wide {
        grid-column: span 12;
    }

    .gallery-item.masonry-tall,
    .gallery-item.masonry-standard {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .darshan-gallery-section {
        padding: 5rem 0;
    }

    .gallery-header {
        margin-bottom: 3rem;
    }

    .gallery-filter-bar {
        gap: 0.5rem;
    }

    .filter-pill {
        padding: 0.5rem 1.1rem;
        font-size: 0.75rem;
    }

    .gallery-masonry-grid {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .gallery-item {
        height: 280px !important;
    }

    .lightbox-dialog {
        padding: 1.5rem;
    }

    .lightbox-caption {
        font-size: 1.2rem;
    }

    .lightbox-nav-btn {
        width: 44px;
        height: 44px;
    }
}