/* ==========================================================================
   OFFICIAL PICTURE GALLERY STYLES — i-Kingdom International Academy
   2026/2027 Academic Session • 81+ High-Definition Curated Moments
   ========================================================================== */

/* Breadcrumb Strip */
.gallery-breadcrumb-strip {
    background: #f8f5fc;
    border-bottom: 1px solid rgba(76, 0, 130, 0.08);
    padding: 14px 0;
    font-size: 13.5px;
}

.gallery-breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gallery-breadcrumb-inner a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.gallery-breadcrumb-inner a:hover {
    color: var(--gold-dark);
    text-decoration: underline;
}

.gallery-breadcrumb-sep {
    color: #999;
    font-size: 12px;
}

.gallery-breadcrumb-current {
    color: #4e4a5e;
    font-weight: 500;
}

/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    background: linear-gradient(135deg, #0d001a 0%, #1e0036 45%, #3c0066 85%, #580099 100%);
    color: #ffffff;
    padding: 70px 0 60px;
    overflow: hidden;
}

.gallery-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.16) 0%, rgba(245, 166, 35, 0) 70%);
    pointer-events: none;
}

.gallery-hero::after {
    content: "";
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 17, 176, 0.3) 0%, rgba(106, 17, 176, 0) 70%);
    pointer-events: none;
}

.gallery-hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 980px;
    margin: 0 auto;
}

.gallery-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 166, 35, 0.45);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(30px, 4.5vw, 50px);
    font-weight: 850;
    line-height: 1.15;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.gallery-hero-title .gold-accent {
    background: linear-gradient(135deg, #ffc453 0%, #f5a623 50%, #e09418 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gallery-hero-desc {
    font-size: clamp(15px, 2vw, 17.5px);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.90);
    max-width: 820px;
    margin: 0 auto 32px;
}

/* Hero Stats Chips */
.gallery-hero-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.gallery-stat-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 13px;
    color: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-stat-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.gallery-stat-chip strong {
    color: var(--gold-light);
    font-size: 15px;
}

/* Sticky Filter & Search Control Bar */
.gallery-controls-section {
    position: sticky;
    top: 72px; /* below navbar */
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(76, 0, 130, 0.12);
    box-shadow: 0 8px 24px rgba(42, 0, 74, 0.06);
    padding: 16px 0;
    transition: all 0.3s ease;
}

.gallery-controls-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Category Filter Tabs (Horizontal Scrollable on Mobile) */
.gallery-tabs-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gallery-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(76, 0, 130, 0.15);
    background: #ffffff;
    color: var(--primary-dark);
    font-family: var(--font-main);
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.gallery-tab-btn:hover {
    background: #f8f0ff;
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.gallery-tab-btn.active {
    background: linear-gradient(135deg, #2a004a 0%, #4c0082 60%, #6a11b0 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(76, 0, 130, 0.28);
}

.gallery-tab-btn .tab-count {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(76, 0, 130, 0.08);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 800;
}

.gallery-tab-btn.active .tab-count {
    background: rgba(245, 166, 35, 0.25);
    color: var(--gold-light);
}

/* Secondary Sub-Filter Row (Classes / Search) */
.gallery-secondary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

/* Sub-filter pills for Classes */
.gallery-subfilters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.subfilter-label {
    font-size: 12px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.gallery-subfilter-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f9f9fb;
    color: #4e4a5e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-subfilter-btn:hover {
    background: #ede3f7;
    color: var(--primary);
}

.gallery-subfilter-btn.active {
    background: var(--gold-gradient);
    color: #120f1f;
    border-color: transparent;
    font-weight: 800;
}

/* Live Search Box */
.gallery-search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 260px;
    max-width: 380px;
    flex: 1;
}

.gallery-search-icon {
    position: absolute;
    left: 12px;
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

.gallery-search-input {
    width: 100%;
    padding: 9px 34px 9px 34px;
    border: 1px solid rgba(76, 0, 130, 0.18);
    border-radius: 999px;
    background: #ffffff;
    font-family: var(--font-main);
    font-size: 13.5px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 0, 130, 0.12);
}

.gallery-search-clear {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    display: none;
}

.gallery-search-clear:hover {
    color: var(--primary);
}

/* Counter & Active Filter Status */
.gallery-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px 0;
    font-size: 13px;
    color: #666;
}

.gallery-reset-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    display: none;
}

.gallery-reset-link:hover {
    color: var(--gold-dark);
}

/* Main Gallery Showcase Section */
.gallery-showcase-section {
    padding: 40px 0 80px;
    background: #faf8fc;
    min-height: 600px;
}

/* Responsive Grid / Masonry Columns */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Individual Gallery Item Card */
.gallery-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(76, 0, 130, 0.08);
    box-shadow: 0 8px 24px rgba(42, 0, 74, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(42, 0, 74, 0.14);
    border-color: rgba(245, 166, 35, 0.45);
}

/* Media Area */
.gallery-card-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #eee;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.05);
}

/* Badges on Card Media */
.gallery-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(13, 0, 26, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(245, 166, 35, 0.4);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-card-tier {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f5a623 0%, #c9820a 100%);
    color: #120f1f;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Hover Action Overlay */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(29, 0, 51, 0.75) 0%, rgba(29, 0, 51, 0.2) 60%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-zoom-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: scale(0.85);
    transition: transform 0.25s ease;
}

.gallery-card:hover .gallery-zoom-btn {
    transform: scale(1);
}

/* Card Body Content */
.gallery-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card-title {
    font-family: var(--font-heading);
    font-size: 16.5px;
    font-weight: 750;
    line-height: 1.35;
    color: var(--primary-dark);
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.gallery-card:hover .gallery-card-title {
    color: var(--primary-light);
}

.gallery-card-desc {
    font-size: 13.5px;
    color: #555566;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.gallery-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(76, 0, 130, 0.07);
    font-size: 12px;
}

.gallery-card-tag {
    font-weight: 700;
    color: var(--primary);
    background: #f4ebff;
    padding: 3px 9px;
    border-radius: 6px;
}

.gallery-card-viewlink {
    color: var(--gold-dark);
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty State */
.gallery-empty-state {
    text-align: center;
    padding: 70px 20px;
    grid-column: 1 / -1;
    background: #ffffff;
    border-radius: 20px;
    border: 2px dashed rgba(76, 0, 130, 0.15);
}

.gallery-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.gallery-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.gallery-empty-state p {
    color: #666;
    font-size: 14.5px;
    margin-bottom: 18px;
}

/* Reassurance & Admissions CTA Banner */
.gallery-cta-section {
    background: linear-gradient(135deg, #1d0033 0%, #2a004a 50%, #4c0082 100%);
    color: #ffffff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.gallery-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    flex-wrap: wrap;
}

.gallery-cta-text {
    flex: 1;
    min-width: 300px;
}

.gallery-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(245, 166, 35, 0.16);
    border: 1px solid rgba(245, 166, 35, 0.4);
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.gallery-cta-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.25;
}

.gallery-cta-text h2 span {
    color: var(--gold-light);
}

.gallery-cta-text p {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    max-width: 680px;
}

.gallery-cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.gallery-btn-admit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    background: var(--gold-gradient);
    color: #120f1f !important;
    font-weight: 800;
    font-size: 14.5px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    white-space: nowrap;
}

.gallery-btn-admit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(245, 166, 35, 0.5);
}

.gallery-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    font-weight: 750;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.gallery-btn-wa:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
}

/* ==========================================================================
   INTERACTIVE FULLSCREEN LIGHTBOX MODAL
   ========================================================================== */
.gallery-lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 4, 18, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.gallery-lightbox-modal.open {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Header Bar */
.lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    z-index: 10;
}

.lightbox-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lightbox-counter-badge {
    background: rgba(245, 166, 35, 0.22);
    color: var(--gold-light);
    border: 1px solid rgba(245, 166, 35, 0.4);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.lightbox-category-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 650;
}

.lightbox-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-action-btn {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.05);
}

.lightbox-close-btn {
    background: rgba(220, 53, 69, 0.25);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ff6b6b;
    font-size: 18px;
}

.lightbox-close-btn:hover {
    background: rgba(220, 53, 69, 0.6);
    color: #ffffff;
}

/* Lightbox Stage */
.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 60px;
    overflow: hidden;
}

.lightbox-media-wrap {
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 166, 35, 0.25);
    transition: transform 0.3s ease;
    user-select: none;
}

/* Lightbox Navigation Arrow Buttons */
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
}

.lightbox-nav-btn:hover {
    background: rgba(245, 166, 35, 0.85);
    color: #120f1f;
    border-color: transparent;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev-btn {
    left: 18px;
}

.lightbox-next-btn {
    right: 18px;
}

/* Lightbox Bottom Caption Drawer */
.lightbox-caption-bar {
    background: rgba(13, 0, 26, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    text-align: center;
    z-index: 10;
}

.lightbox-caption-inner {
    max-width: 820px;
    margin: 0 auto;
}

.lightbox-caption-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 750;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.lightbox-caption-desc {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR GALLERY
   ========================================================================== */
@media (max-width: 991px) {
    .gallery-controls-section {
        top: 64px;
    }

    .gallery-hero {
        padding: 50px 0 45px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .lightbox-stage {
        padding: 10px 20px;
    }

    .lightbox-nav-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .lightbox-prev-btn {
        left: 8px;
    }

    .lightbox-next-btn {
        right: 8px;
    }

    .gallery-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-cta-actions {
        width: 100%;
    }

    .gallery-btn-admit,
    .gallery-btn-wa {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .gallery-hero {
        padding: 40px 0 35px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .gallery-secondary-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .gallery-search-box {
        max-width: 100%;
    }

    .gallery-stat-chip {
        padding: 8px 14px;
        font-size: 12px;
    }

    .lightbox-topbar {
        padding: 12px 16px;
    }

    .lightbox-caption-bar {
        padding: 14px 16px;
    }

    .lightbox-caption-title {
        font-size: 16px;
    }

    .lightbox-caption-desc {
        font-size: 13px;
    }

    .lightbox-media-wrap {
        max-height: 55vh;
    }

    .lightbox-img {
        max-height: 55vh;
    }
}
