/* ============================================================
   Gallery.css — Gallery Page Stylesheet
   Extends: style.css (Site Master Theme)
   Theme: Red + Deep Blue + White | Luxury Academic
   ============================================================ */

/* ==============================
   MINI HERO SECTION (Same as LLB)
   ============================== */
.gallery-mini-hero {
    position: relative;
    height: clamp(260px, 30vh, 380px);
    min-height: 260px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: url('../Assets/Images/mini-hero.png') center center / cover no-repeat;
    background-attachment: fixed;
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Left decorative arc element */
.hero-deco-left {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.07);
    z-index: 2;
    pointer-events: none;
}

    .hero-deco-left::before {
        content: '';
        position: absolute;
        inset: 25px;
        border-radius: 50%;
        border: 1px solid rgba(198, 40, 40, 0.25);
    }

.hero-deco-right {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 2;
    pointer-events: none;
}

/* Content sits above overlay */
.gallery-mini-hero .container {
    position: relative;
    z-index: 3;
    height: 100%;
}

/* Breadcrumb */
.ballb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

    .ballb-breadcrumb a {
        color: rgba(255, 255, 255, 0.65);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .ballb-breadcrumb a:hover {
            color: #ffffff;
        }

.bc-sep {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}

.ballb-breadcrumb > span:last-child {
    color: var(--primary-red);
    font-weight: 600;
}

/* Hero Badge pill */
.ballb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(198, 40, 40, 0.18);
    border: 1px solid rgba(198, 40, 40, 0.45);
    color: #ffb3b3;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
    backdrop-filter: blur(6px);
    animation: heroBadgePulse 3s ease-in-out infinite;
}

@keyframes heroBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); }
}

/* Hero Title */
.ballb-hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(26px, 3.5vw, 46px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: heroFadeUp 0.9s ease both;
}

    .ballb-hero-title span {
        color: var(--primary-red);
        font-style: italic;
    }

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Bottom wave */
.gallery-hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    line-height: 0;
}

    .gallery-hero-wave svg {
        display: block;
        width: 100%;
        height: 60px;
    }


/* ==============================
   GALLERY SECTION
   ============================== */
.gallery-section {
    background: #F8FAFC;
    padding: 70px 0 80px;
}

/* Section Header */
.gallery-section .section-label {
    display: inline-block;
    background: rgba(198, 40, 40, 0.08);
    color: var(--primary-red);
    border: 1px solid rgba(198, 40, 40, 0.22);
    border-radius: 50px;
    padding: 5px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.gallery-section .section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(26px, 3vw, 40px);
    color: var(--primary-blue);
    font-weight: 800;
    margin-bottom: 10px;
}

    .gallery-section .section-title span {
        color: var(--primary-red);
    }

.gallery-section .section-subtitle {
    font-size: 15px;
    color: #64748b;
    max-width: 560px;
    line-height: 1.7;
}

/* ==============================
   MASONRY / COLLAGE GRID
   ============================== */
.gallery-collage {
    columns: 3;
    column-gap: 16px;
    margin-top: 48px;
}

.gallery-collage-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: block;
    box-shadow: 0 6px 24px rgba(11, 31, 58, 0.09);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .gallery-collage-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 50px rgba(11, 31, 58, 0.18);
    }

    .gallery-collage-item img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
        transition: transform 0.55s ease;
    }

    .gallery-collage-item:hover img {
        transform: scale(1.06);
    }

/* Hover Overlay on each image */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 22, 54, 0.80) 0%, rgba(4, 22, 54, 0.10) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px 18px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-collage-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay .expand-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
    backdrop-filter: blur(6px);
    transition: background 0.3s ease;
}

.gallery-collage-item:hover .expand-icon {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.gallery-item-overlay .img-caption {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    letter-spacing: 0.5px;
}


/* ==============================
   LIGHTBOX MODAL
   ============================== */
#galleryLightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(4, 22, 54, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: lbFadeIn 0.3s ease;
}

    #galleryLightbox.lb-open {
        display: flex;
    }

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lb-inner {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbZoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes lbZoomIn {
    from { opacity: 0; transform: scale(0.82); }
    to   { opacity: 1; transform: scale(1); }
}

#lbImage {
    max-width: 88vw;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.55);
    object-fit: contain;
    display: block;
    border: 3px solid rgba(255,255,255,0.10);
}

/* Close Button */
.lb-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.45);
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

    .lb-close:hover {
        background: #b71c1c;
        transform: rotate(90deg) scale(1.1);
    }

/* Prev / Next Navigation Buttons */
.lb-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255,255,255,0.20);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(6px);
    z-index: 10001;
}

    .lb-nav-btn:hover {
        background: var(--primary-red);
        border-color: var(--primary-red);
        transform: translateY(-50%) scale(1.1);
    }

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Counter */
.lb-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: rgba(255,255,255,0.60);
    letter-spacing: 2px;
    z-index: 10001;
}

/* Caption bar */
.lb-caption {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.5px;
    text-align: center;
    font-weight: 600;
    z-index: 10001;
    white-space: nowrap;
}


/* ==============================
   SCROLL ANIMATIONS
   ============================== */
[data-animate].pre-animate {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate].pre-animate[data-delay="100"] { transition-delay: 0.10s; }
[data-animate].pre-animate[data-delay="150"] { transition-delay: 0.15s; }
[data-animate].pre-animate[data-delay="200"] { transition-delay: 0.20s; }
[data-animate].pre-animate[data-delay="300"] { transition-delay: 0.30s; }
[data-animate].pre-animate[data-delay="400"] { transition-delay: 0.40s; }
[data-animate].pre-animate[data-delay="500"] { transition-delay: 0.50s; }

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}


/* ==============================
   RESPONSIVE — TABLET
   ============================== */
@media (max-width: 991px) {
    .gallery-mini-hero {
        min-height: auto;
        padding: 70px 0 60px;
        text-align: center;
    }

    .gallery-collage {
        columns: 2;
    }

    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

/* ==============================
   RESPONSIVE — MOBILE
   ============================== */
@media (max-width: 576px) {
    .gallery-collage {
        columns: 1;
    }

    #lbImage {
        max-width: 96vw;
        max-height: 80vh;
    }

    .lb-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .lb-caption {
        font-size: 12px;
        bottom: 55px;
    }
}
