/* =============================================
   AVASA — GALLERY PAGE STYLES  (23-gallery-page.css)
   ============================================= */

/* ── Shared Page Hero (used by Gallery + About) ── */
.pg-hero,
.about-pg-hero {
    position: relative;
    height: 68vh;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 60%, #0d0d0d 100%);
}

.pg-hero::before,
.about-pg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(212, 175, 55, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.pg-hero-overlay,
.about-pg-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(212,175,55,0.05)'/%3E%3C/svg%3E") repeat;
    z-index: 0;
}

.pg-hero-content,
.about-pg-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.pg-label {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--avasa-font-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--avasa-gold);
    margin-bottom: 20px;
    animation: fadeInDown 0.7s ease both;
}

.pg-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--avasa-white);
    margin-bottom: var(--avasa-space-lg);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease 0.15s both;
}

.pg-desc {
    font-size: var(--avasa-font-lg);
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Decorative floating dots */
.pg-hero-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.pg-dot {
    position: absolute;
    width: var(--size);
    height: var(--size);
    top: var(--top);
    left: var(--left);
    border-radius: 50%;
    background: var(--avasa-gold);
    opacity: 0.25;
    animation: pulse 3s ease-in-out var(--delay) infinite;
}

/* ── Gallery Stats Strip ── */
.gallery-stats-strip {
    padding: 40px 0;
}

.gallery-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--avasa-space-xl);
}

.gallery-stat {
    text-align: center;
}

.gallery-stat-num {
    display: block;
    font-family: var(--avasa-font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--avasa-gold);
    line-height: 1;
}

.gallery-stat-lbl {
    display: block;
    font-family: var(--avasa-font-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--avasa-gray-400);
    margin-top: 8px;
}

/* ── Gallery Filter Tabs ── */
.gallery-page-section {
    background: var(--avasa-gray-100);
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 3rem;
}

.gf-btn {
    padding: 10px 22px;
    font-family: var(--avasa-font-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--avasa-white);
    color: var(--avasa-gray-700);
    border: 1.5px solid var(--avasa-gray-200);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gf-btn:hover,
.gf-btn.active {
    background: var(--avasa-gold);
    color: var(--avasa-white);
    border-color: var(--avasa-gold);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.gf-count {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 0.7rem;
}

.gf-btn.active .gf-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Gallery Masonry Grid ── */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 12px;
}

/* Spanning for visual interest */
.gal-item:nth-child(5n+1) {
    grid-row: span 2;
}

.gal-item:nth-child(7n+3) {
    grid-column: span 2;
}

.gal-item {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.gal-item:hover {
    transform: scale(0.98);
}

/* Hidden items (for filter) */
.gal-item.is-hidden {
    display: none;
}

.gal-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--avasa-gray-200);
}

.gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.gal-item:hover img {
    transform: scale(1.08);
}

.gal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    gap: 10px;
}

/* Hover overlay */
.gal-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gal-item:hover .gal-overlay {
    opacity: 1;
}

.gal-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.gal-item:hover .gal-overlay-content {
    transform: translateY(0);
}

.gal-zoom {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.9);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
}

.gal-zoom:hover {
    background: var(--avasa-gold);
    transform: scale(1.15);
}

.gal-overlay h4 {
    font-size: 1rem;
    color: white;
    margin-bottom: 6px;
}

.gal-cat {
    font-size: 0.72rem;
    font-family: var(--avasa-font-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--avasa-gold);
}

/* ── LIGHTBOX MODAL ── */
.avasa-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.avasa-lightbox-modal.lb-open {
    opacity: 1;
    visibility: visible;
}

.lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(6px);
}

.lb-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lb-image-wrap {
    position: relative;
    max-width: 80vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 200px;
}

.lb-img {
    max-width: 80vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lb-img.lb-loaded {
    opacity: 1;
}

.lb-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--avasa-gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lb-close:hover {
    background: var(--avasa-gold);
    border-color: var(--avasa-gold);
    transform: rotate(90deg);
}

.lb-prev,
.lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lb-prev {
    left: 24px;
}

.lb-next {
    right: 24px;
}

.lb-prev:hover,
.lb-next:hover {
    background: var(--avasa-gold);
    border-color: var(--avasa-gold);
    transform: translateY(-50%) scale(1.1);
}

.lb-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    text-align: center;
    margin-top: 16px;
    font-family: var(--avasa-font-primary);
}

.lb-counter {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-family: var(--avasa-font-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 6px;
}

/* ── Responsive Gallery ── */
@media (max-width: 1200px) {
    .gal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gal-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .gal-item:nth-child(5n+1) {
        grid-row: span 1;
    }

    .gal-item:nth-child(7n+3) {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .gal-grid {
        grid-template-columns: 1fr;
    }
}