/* =====================================================================
   SCHOOL GALLERY — CLEAN DESIGN
   Photo gallery + video memories
===================================================================== */

:root {
    --gl-navy: #0F2340;
    --gl-navy-light: #1E3A5F;
    --gl-navy-soft: #EEF2F7;
    --gl-gold: #B8862E;
    --gl-gold-light: #D4A947;
    --gl-bg: #FAF9F6;
    --gl-card: #FFFFFF;
    --gl-charcoal: #22262E;
    --gl-muted: #6B7280;
    --gl-border: #E7E4DC;

    --gl-radius-lg: 24px;
    --gl-radius-md: 18px;
    --gl-radius-sm: 12px;

    --gl-shadow-sm: 0 2px 10px rgba(15, 35, 64, 0.06);
    --gl-shadow-md: 0 10px 30px rgba(15, 35, 64, 0.10);
    --gl-shadow-lg: 0 20px 50px rgba(15, 35, 64, 0.18);

    --gl-font-display: 'Fraunces', Georgia, serif;
    --gl-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --gl-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.gl-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.gl-section {
    padding: 64px 0;
    background: var(--gl-bg);
}

.gl-section-alt {
    background: var(--gl-navy-soft);
}

.gl-section-head {
    margin-bottom: 32px;
}

.gl-heading {
    font-family: var(--gl-font-display);
    font-weight: 600;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    color: var(--gl-navy);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.gl-subheading {
    color: var(--gl-muted);
    font-family: var(--gl-font-body);
    margin: 0;
}

.gl-eyebrow {
    display: inline-block;
    font-family: var(--gl-font-body);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gl-gold);
    margin-bottom: 12px;
}

body {
    font-family: var(--gl-font-body);
    color: var(--gl-charcoal);
    background: var(--gl-bg);
}

/* ================= HERO ================= */

.gl-hero {
    position: relative;
    min-height: 78vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    color: #fff;
}

.gl-hero-inner {
    padding: 0 24px 88px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.gl-breadcrumb {
    font-size: 0.85rem;
    display: flex;
    gap: 8px;
    opacity: 0.85;
    margin-bottom: 18px;
    font-weight: 500;
}

.gl-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.gl-breadcrumb a:hover {
    text-decoration: underline;
}

.gl-breadcrumb .is-current {
    color: var(--gl-gold-light);
}

.gl-hero-title {
    font-family: var(--gl-font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    line-height: 1.06;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

.gl-hero-text {
    font-size: 1.05rem;
    max-width: 620px;
    opacity: 0.92;
    line-height: 1.6;
    margin: 0;
}

.gl-scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ================= FEATURED ALBUM ================= */

.gl-featured {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.gl-featured-media {
    position: relative;
    width: fit-content;
    max-width: 100%;
    justify-self: center;
}

.gl-featured-cover {
    border-radius: var(--gl-radius-lg);
    overflow: hidden;
    box-shadow: var(--gl-shadow-lg);
    height: fit-content;
    width: fit-content;
    max-height: 490px;
    max-width: 100%;
    background: radial-gradient(circle, #1a3358 0%, #0c1c33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.gl-featured-cover img {
    max-height: 490px;
    max-width: 100%;
    width: auto;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    transition: opacity 0.25s var(--gl-ease);
    display: block;
}

.gl-featured-thumbs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: -42px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    width: fit-content;
}

.gl-pin-frame {
    width: 84px;
    height: 84px;
    background: #fff;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 12px;
    box-shadow: var(--gl-shadow-md);
    overflow: hidden;
    transform: none;
    transition: transform 0.3s var(--gl-ease), box-shadow 0.3s var(--gl-ease), border-color 0.3s ease;
    cursor: pointer;
    outline-offset: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gl-pin-frame:nth-child(2) {
    transform: none;
}

.gl-pin-frame:nth-child(3) {
    transform: none;
}

.gl-pin-frame:hover {
    transform: translateY(-4px);
}

.gl-pin-frame.is-active {
    border-color: var(--gl-gold-light);
    box-shadow: 0 0 0 3px var(--gl-gold-light), var(--gl-shadow-md);
    transform: translateY(-4px);
}

.gl-pin-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 6px;
}

.gl-featured-title {
    font-family: var(--gl-font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--gl-navy);
    margin: 0 0 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.gl-featured-tagline {
    color: var(--gl-muted);
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.6;
}

/* ================= ALBUM CARDS ================= */

.gl-album-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

.gl-album-card {
    background: var(--gl-card);
    border-radius: var(--gl-radius-md);
    overflow: hidden;
    box-shadow: var(--gl-shadow-sm);
    cursor: pointer;
    transition: transform 0.3s var(--gl-ease), box-shadow 0.3s var(--gl-ease);
}

.gl-album-card:focus-visible {
    outline: 3px solid var(--gl-gold-light);
    outline-offset: 3px;
}

.gl-album-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--gl-shadow-md);
}

.gl-album-cover {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gl-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--gl-ease);
}

.gl-album-card:hover .gl-album-cover img {
    transform: scale(1.06);
}

.gl-album-body {
    padding: 20px;
}

.gl-album-title {
    font-family: var(--gl-font-display);
    font-size: 1.15rem;
    color: var(--gl-navy);
    margin: 0 0 6px;
    font-weight: 600;
}

.gl-album-desc {
    color: var(--gl-muted);
    font-size: 0.88rem;
    margin: 0 0 14px;
    line-height: 1.5;
}

.gl-album-meta {
    display: flex;
    justify-content: flex-start;
    /* pehle space-between tha */
    font-size: 0.78rem;
    color: var(--gl-muted);
    margin-bottom: 0;
}

.gl-badge-onimg {
    position: absolute;
    top: 14px;
    left: 14px;
    backdrop-filter: blur(6px);
}

/* ================= VIDEO MEMORIES ================= */

.gl-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.gl-video-card {
    background: #fff;
    border-radius: var(--gl-radius-md);
    overflow: hidden;
    box-shadow: var(--gl-shadow-sm);
    cursor: pointer;
    transition: transform 0.3s var(--gl-ease), box-shadow 0.3s var(--gl-ease);
}

.gl-video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--gl-shadow-md);
}

.gl-video-card:focus-visible {
    outline: 3px solid var(--gl-gold-light);
    outline-offset: 3px;
}

.gl-video-thumb {
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gl-video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 35, 64, 0.25);
}

.gl-play-btn {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--gl-navy);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s var(--gl-ease);
    pointer-events: none;
}

.gl-play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent var(--gl-navy);
    margin-left: 4px;
    /* optical centering, triangle ka visual weight right side jyada hota hai */
}

.gl-video-card:hover .gl-play-btn {
    transform: scale(1.1);
}

.gl-video-body {
    padding: 20px;
}

.gl-video-body h3 {
    font-family: var(--gl-font-display);
    font-size: 1.1rem;
    color: var(--gl-navy);
    margin: 0 0 4px;
}

.gl-video-meta {
    font-size: 0.78rem;
    color: var(--gl-gold);
    font-weight: 600;
}

.gl-video-body p {
    color: var(--gl-muted);
    font-size: 0.88rem;
    margin: 10px 0;
    line-height: 1.5;
}

.gl-video-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gl-navy);
}

/* ================= ALBUM VIEWER MODAL ================= */

.gl-album-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gl-album-modal.is-open {
    display: flex;
}

.gl-album-modal-box {
    position: relative;
    background: #fff;
    border-radius: var(--gl-radius-lg);
    max-width: 1080px;
    width: 100%;
    max-height: 88vh;
    overflow: hidden;
    box-shadow: var(--gl-shadow-lg);
    display: grid;
    grid-template-columns: 1.3fr 1fr;
}

.gl-album-modal-media {
    background: #000;
    min-height: 320px;
    max-height: 88vh;
    overflow: hidden;
}

.gl-album-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gl-album-modal-info {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.gl-album-modal-info .gl-badge {
    align-self: flex-start;
    margin-bottom: 16px;
}

.gl-album-modal-info h3 {
    font-family: var(--gl-font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    color: var(--gl-navy);
    margin: 0 0 14px;
    font-weight: 600;
    line-height: 1.2;
}

.gl-album-modal-info p {
    color: var(--gl-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0 0 24px;
}

.gl-album-modal-meta {
    display: flex;
    gap: 24px;
    font-size: 0.85rem;
    color: var(--gl-navy);
    font-weight: 600;
    padding-top: 20px;
    border-top: 1px solid var(--gl-border);
}

.gl-album-modal-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gl-album-modal-meta i {
    color: var(--gl-gold);
}

.gl-album-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(15, 35, 64, 0.55);
    backdrop-filter: blur(6px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gl-album-modal-close:hover {
    background: rgba(15, 35, 64, 0.85);
    transform: scale(1.05);
}

.gl-album-modal-close:focus-visible {
    outline: 2px solid var(--gl-gold-light);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .gl-album-modal-box {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
    }

    .gl-album-modal-media {
        min-height: 240px;
        max-height: 320px;
    }

    .gl-album-modal-info {
        padding: 24px 20px;
    }
}

/* ================= VIDEO MODAL ================= */

.gl-video-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gl-video-modal.is-open {
    display: flex;
}

.gl-video-modal-box {
    background: #0F2340;
    border-radius: var(--gl-radius-lg);
    max-width: 1000px;
    width: min(100%, 1000px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--gl-shadow-lg);
}

.gl-video-modal-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px 12px 24px;
    background: #0F2340;
}

.gl-video-modal-header h3 {
    margin: 0;
    color: #fff;
    font-family: var(--gl-font-display);
    font-size: 1.15rem;
    line-height: 1.3;
}

.gl-video-modal-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.gl-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.05);
}

.gl-video-modal-frame {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.gl-video-modal-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 991px) {
    .gl-featured {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .gl-album-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gl-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gl-hero {
        min-height: 66vh;
    }

    .gl-hero-inner {
        padding-bottom: 56px;
    }

    .gl-section {
        padding: 44px 0;
    }

    .gl-album-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gl-album-body {
        padding: 14px;
    }

    .gl-video-grid {
        grid-template-columns: 1fr;
    }

    .gl-featured-cover {
        max-height: 350px;
    }

    .gl-featured-cover img {
        max-height: 350px;
    }

    .gl-featured-thumbs {
        margin-left: auto;
        margin-right: auto;
        margin-top: -32px;
        gap: 10px;
    }

    .gl-pin-frame {
        width: 64px;
        height: 64px;
    }

    .gl-video-modal {
        padding: 12px;
    }

    .gl-video-modal-box {
        border-radius: 16px;
    }

    .gl-video-modal-header {
        padding: 10px 12px 10px 16px;
    }

    .gl-video-modal-header h3 {
        font-size: 1rem;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    .gl-album-card,
    .gl-video-card,
    .gl-pin-frame,
    .gl-album-cover img {
        transition-duration: 0.01ms !important;
    }
}

/* Keyboard focus */

.gl-scroll-indicator:focus-visible,
.gl-video-modal-close:focus-visible,
.gl-pin-frame:focus-visible {
    outline: 2px solid var(--gl-gold-light);
    outline-offset: 2px;
}