/* ============================================================
   FGGC Alumni — Warm Glass Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
    /* Core palette */
    --navy: #0D2B4E;
    --sky: #5BAACC;
    --cream: #F7F3ED;
    --cream-deep: #EDE5D8;
    --pearl: #FEFCF8;
    --green: #2E8B57;
    --danger: #D9534F;
    --text-dark: #3D3D3D;
    --text-mid: #7A7A8C;
    --text-body: #5A5A6A;

    /* Legacy aliases — kept because JS-injected HTML uses var(--primary-navy) etc. */
    --primary-navy: #0D2B4E;
    --secondary-skyblue: #5BAACC;
    --accent-green: #2E8B57;
    --danger-red: #D9534F;
    --text-muted: #7A7A8C;
    --text-light: #FFFFFF;
    --bg-cream: #F7F3ED;
    --bg-pearl: #FEFCF8;
    --bg-white: #FEFCF8;
    --bg-light: #F7F3ED;
    --border-color: #E5DDD3;

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-pill: 50px;

    /* Shadows */
    --shadow-card: 0 8px 40px rgba(13, 43, 78, 0.09);
    --shadow-raised: 0 16px 56px rgba(0, 0, 0, 0.20);
    --shadow-nav: 0 4px 24px rgba(13, 43, 78, 0.10);
    --shadow-modal: 0 16px 56px rgba(13, 43, 78, 0.16);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
    --cream: #0D1B2E;
    --cream-deep: #091520;
    --pearl: #112338;
    --navy: #E8E4DC;
    --text-dark: #E8E4DC;
    --text-mid: #9AADBE;
    --text-body: #B8C8D8;
    --border-color: rgba(91, 170, 204, 0.15);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-raised: 0 16px 56px rgba(0, 0, 0, 0.55);
    --shadow-nav: 0 4px 24px rgba(0, 0, 0, 0.40);
    /* Legacy aliases */
    --primary-navy: #E8E4DC;
    --bg-cream: #0D1B2E;
    --bg-pearl: #112338;
    --bg-white: #112338;
    --bg-light: #0D1B2E;
}

[data-theme="dark"] .glass-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(91, 170, 204, 0.15);
}

[data-theme="dark"] .glass-card--dark {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(91, 170, 204, 0.12);
}

[data-theme="dark"] .nav-pill--light {
    background: rgba(17, 35, 56, 0.9);
    border-color: rgba(91, 170, 204, 0.15);
}

[data-theme="dark"] .nav-pill--dark {
    background: rgba(17, 35, 56, 0.9);
}

[data-theme="dark"] table {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .news-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(91, 170, 204, 0.12);
}

[data-theme="dark"] .form-container {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .news-tab:not(.active) {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] tbody tr:hover {
    background: rgba(91, 170, 204, 0.08);
}

[data-theme="dark"] th {
    background: rgba(13, 43, 78, 0.8);
}

/* ── Theme Toggle Button ── */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--navy);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-raised);
}

.theme-icon-moon { display: block; }
.theme-icon-sun  { display: none; }

[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun  { display: block; }

[data-theme="dark"] .theme-toggle {
    background: #5BAACC;
    color: #0D1B2E;
}

@media (max-width: 768px) {
    /* On mobile the toggle lives inside the bottom nav bar (.theme-nav-tab,
       injected by theme.js), so the floating FAB is hidden here. It remains
       the theme control on desktop, where there is no bottom nav bar. */
    .theme-toggle {
        display: none !important;
    }
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Base ── */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    line-height: 1.65;
    min-height: 100vh;
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

p {
    margin-bottom: 0.75rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    text-decoration: none;
    color: var(--navy);
    transition: color 0.2s;
}

a:hover {
    color: var(--sky);
}

/* ══════════════════════════════════
   MOBILE BOTTOM NAV
══════════════════════════════════ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 300;
        background: rgba(13, 43, 78, 0.97);
        border-top: 1px solid rgba(91, 170, 204, 0.2);
        height: calc(60px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        align-items: stretch;
    }

    .mobile-nav-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255, 255, 255, 0.45);
        text-decoration: none;
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        transition: color 0.2s;
        padding: 6px 0;
    }

    .mobile-nav-tab.active,
    .mobile-nav-tab:hover {
        color: var(--sky);
    }

    .mobile-nav-tab svg {
        stroke: currentColor;
    }

    /* Theme toggle rendered as a nav tab (a <button>, so reset its chrome).
       Only inherit font-family — the size/weight come from .mobile-nav-tab. */
    .theme-nav-tab {
        background: none;
        border: none;
        font-family: inherit;
        -webkit-appearance: none;
        appearance: none;
    }
}

/* ══════════════════════════════════
   FLOATING GLASS PILL NAV
══════════════════════════════════ */
.nav-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.5rem;
    border-radius: var(--r-pill);
    margin: 1.25rem 1.75rem 0;
    position: sticky;
    top: 1rem;
    z-index: 200;
    gap: 1.5rem;
}

.nav-pill--light {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-nav);
}

.nav-pill--dark {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* Logo */
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-pill--light .nav-logo {
    color: var(--navy);
}

.nav-pill--dark .nav-logo {
    color: var(--sky);
}

.nav-logo-img {
    height: 48px;
    width: auto;
    border-radius: 4px;
}

/* Nav links list */
.nav-links-list {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.38rem 0.85rem;
    border-radius: var(--r-pill);
    transition: background 0.2s, color 0.2s;
}

.nav-pill--light .nav-link {
    color: var(--text-mid);
}

.nav-pill--light .nav-link:hover,
.nav-pill--light .nav-link.active {
    color: var(--navy);
    background: rgba(91, 170, 204, 0.12);
}

.nav-pill--dark .nav-link {
    color: rgba(255, 255, 255, 0.6);
}

.nav-pill--dark .nav-link:hover,
.nav-pill--dark .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Auth-links container inside nav */
.nav-pill .auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Badge chips (PRO / FINANCE) */
.nav-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 8px;
}

.nav-badge--pro {
    background: var(--navy);
    color: var(--sky);
}

.nav-badge--finance {
    background: rgba(91, 170, 204, 0.2);
    color: var(--sky);
    border: 1px solid rgba(91, 170, 204, 0.3);
}

/* ══════════════════════════════════
   BUTTONS
══════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--r-lg);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    letter-spacing: 0.01em;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-raised);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--sky);
    color: var(--navy);
}

.btn-primary:hover {
    background: #76C2DF;
    color: var(--navy);
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    color: var(--text-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
}

/* Secondary btn on light pages */
main .btn-secondary,
.modal-content .btn-secondary {
    border-color: var(--navy);
    color: var(--navy);
}

main .btn-secondary:hover,
.modal-content .btn-secondary:hover {
    background: rgba(13, 43, 78, 0.07);
}

/* Buttons inside nav pill — override to match nav context */
.nav-pill--light .auth-buttons .btn-secondary {
    border: 1.5px solid var(--navy);
    color: var(--navy);
    background: transparent;
    font-size: 0.8rem;
    padding: 0.38rem 0.9rem;
}

.nav-pill--light .auth-buttons .btn-primary {
    background: var(--navy);
    color: var(--sky);
    font-size: 0.8rem;
    padding: 0.38rem 0.9rem;
    border-radius: var(--r-pill);
}

.nav-pill--dark .auth-buttons .btn-secondary {
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    font-size: 0.8rem;
    padding: 0.38rem 0.9rem;
}

.nav-pill--dark .auth-buttons .btn-primary {
    background: var(--sky);
    color: var(--navy);
    font-size: 0.8rem;
    padding: 0.38rem 0.9rem;
    border-radius: var(--r-pill);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* Log-out button — danger outline that reads on both navy and light cards.
   Used on the dashboards so mobile users (nav pill hidden) can still sign out. */
.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-logout svg {
    width: 16px;
    height: 16px;
}

.btn-navy {
    background: var(--navy);
    color: var(--sky);
}

/* ══════════════════════════════════
   GLASS CARDS
══════════════════════════════════ */
.glass-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}

.glass-card--dark {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-raised);
}

/* Legacy .card kept — JS-injected event cards use class="card" */
.card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-2px);
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.85rem;
}

/* ── Ambient blobs ── */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

/* ══════════════════════════════════
   PAGE HEROES (dark navy sections)
══════════════════════════════════ */
.page-hero {
    background: linear-gradient(160deg, #0D2B4E 0%, #112f57 60%, #0a2540 100%);
    position: relative;
    overflow: hidden;
    padding-bottom: 3rem;
}

.page-hero .blob-1 {
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: rgba(91, 170, 204, 0.13);
}

.page-hero .blob-2 {
    bottom: -60px;
    left: -30px;
    width: 260px;
    height: 260px;
    background: rgba(91, 170, 204, 0.07);
}

/* ── Hero glass card (homepage / login / signup centred card) ── */
.hero-card-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 2.5rem 2rem 0.5rem;
}

.hero-card {
    text-align: center;
    padding: 2.25rem 2.75rem;
    max-width: 520px;
    width: 100%;
}

.hero-pill-badge {
    display: inline-block;
    background: rgba(91, 170, 204, 0.18);
    color: var(--sky);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    border: 1px solid rgba(91, 170, 204, 0.3);
}

.hero-card h1 {
    color: var(--pearl);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.85rem;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 380px;
    margin: 0 auto 1.5rem;
}

/* ══════════════════════════════════
   BELOW-FOLD (warm cream sections)
══════════════════════════════════ */
.page-below {
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 2rem;
}

.page-below .blob-3 {
    top: -40px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: rgba(91, 170, 204, 0.11);
}

.page-below .blob-4 {
    bottom: -50px;
    left: -30px;
    width: 220px;
    height: 220px;
    background: rgba(13, 43, 78, 0.05);
}

/* ══════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════ */
main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    width: 100%;
}

.page-heading {
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    margin-bottom: 0.25rem;
}

.page-heading p {
    color: var(--text-mid);
    font-size: 0.9rem;
}

/* Section label with ruled line */
.section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-label h2 {
    margin-bottom: 0;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(13, 43, 78, 0.12);
}

/* ══════════════════════════════════
   BENTO GRID (homepage)
══════════════════════════════════ */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    gap: 1.25rem;
}

.bento-story {
    grid-column: 1;
    grid-row: 1;
}

.bento-events {
    grid-column: 2;
    grid-row: 1;
}

.bento-sidebar {
    grid-column: 3;
    grid-row: 1;
}

.story-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--r-md);
    margin-bottom: 1rem;
    display: block;
}

/* Event cards */
.event-card {
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    margin-bottom: 0.75rem;
    border-top: 2.5px solid var(--sky);
}

.event-date-label {
    color: var(--sky);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

/* Sidebar game widget */
.game-widget {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--r-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

/* ══════════════════════════════════
   NEWS PAGE
══════════════════════════════════ */
/* Pill tab switcher */
.pill-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Keep .news-tab class since JS uses querySelectorAll('.news-tab') */
.news-tab {
    padding: 0.4rem 1.1rem;
    border-radius: var(--r-pill);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, color 0.2s;
}

.news-tab.active {
    background: var(--navy);
    color: var(--sky);
}

.news-tab:not(.active) {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text-mid);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

/* News items — JS injects class="news-item" into #news-container */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* JS-injected: class="news-item" */
.news-item {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 1rem 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
}

.news-item:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-2px);
}

.news-item img {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--r-md);
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-date {
    font-size: 0.78rem;
    color: var(--text-mid);
    margin-bottom: 0.4rem;
}

/* ══════════════════════════════════
   GALLERY
══════════════════════════════════ */
/* Keep .gallery-grid since JS references container with this class */
.gallery-grid {
    columns: 3;
    column-gap: 1rem;
}

/* Keep .gallery-item since JS adds event listeners via this class */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gallery-item:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    display: block;
    max-height: 280px;
    object-fit: cover;
}

.gallery-item .gal-caption {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Lightbox — keep all IDs intact */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 43, 78, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

#lightbox.open {
    display: flex;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--r-md);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#lightbox-caption {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.4rem 1.2rem;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

#lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.6rem;
    line-height: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ══════════════════════════════════
   FORMS (login, signup)
══════════════════════════════════ */
.form-container {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 2.5rem;
    max-width: 420px;
    margin: 2.5rem auto;
}

/* Dark glass form (login / signup page) */
.form-container--dark {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-raised);
    padding: 2.25rem 2rem;
    max-width: 360px;
    width: 100%;
    border-radius: var(--r-lg);
}

.form-container--dark h2 {
    color: var(--pearl);
}

.form-container--dark label {
    color: rgba(255, 255, 255, 0.65) !important;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--r-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(91, 170, 204, 0.18);
}

/* Dark form inputs */
.form-container--dark .form-group input,
.form-container--dark .form-group select {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
}

.form-container--dark .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-container--dark .form-group input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(91, 170, 204, 0.2);
}

/* ══════════════════════════════════
   DASHBOARD — stat cards & months
══════════════════════════════════ */
.dashboard-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Keep .badge, .badge-paid, .badge-unpaid — dashboard.js injects these */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--r-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-paid {
    background: rgba(46, 139, 87, 0.15);
    color: var(--green);
    border: 1px solid rgba(46, 139, 87, 0.3);
}

.badge-unpaid {
    background: rgba(91, 170, 204, 0.15);
    color: var(--navy);
    border: 1px solid rgba(91, 170, 204, 0.3);
}

/* Keep .user-month-grid, .month-box, .month-box.paid, .month-box.unpaid — dashboard.js writes these */
.user-month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.month-box {
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: var(--r-sm);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid var(--border-color);
}

.month-box.paid {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.month-box.unpaid {
    background: rgba(13, 43, 78, 0.05);
    color: var(--text-mid);
}

/* ══════════════════════════════════
   ADMIN TABLE
══════════════════════════════════ */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.62);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

th,
td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

th {
    background: var(--navy);
    color: var(--sky);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(91, 170, 204, 0.06);
}

/* Keep .status-badge + variants — admin-dashboard.js injects these */
.status-badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-paid {
    background: rgba(46, 139, 87, 0.14);
    color: var(--green);
}

.status-pending {
    background: rgba(91, 170, 204, 0.15);
    color: var(--navy);
}

.status-overdue {
    background: rgba(217, 83, 79, 0.12);
    color: var(--danger);
}

/* Filter controls */
.filter-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.status-select {
    padding: 0.45rem 0.75rem;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text-dark);
}

/* ══════════════════════════════════
   PAYMENT MODAL
══════════════════════════════════ */
/* Keep .modal-overlay — JS sets display:flex / none directly */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 43, 78, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--pearl);
    border-radius: var(--r-lg);
    padding: 2rem;
    width: 90%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-mid);
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(217, 83, 79, 0.08);
}

/* Preset buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.preset-buttons .btn {
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-pill);
}

/* Month checkboxes grid */
.months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.month-checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, border-color 0.2s;
}

.month-checkbox-group:hover {
    background: rgba(91, 170, 204, 0.12);
    border-color: var(--sky);
}

.month-checkbox-group input[type="checkbox"] {
    accent-color: var(--navy);
    cursor: pointer;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 1.5rem 2rem;
    font-size: 0.85rem;
}

footer a {
    color: var(--sky);
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 960px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-story,
    .bento-events,
    .bento-sidebar {
        grid-column: 1;
        grid-row: auto;
    }

    .stat-card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .nav-pill {
        display: none;
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    /* Hide decorative blobs on mobile — they clip and overflow */
    .blob {
        display: none;
    }

    /* Bento grid: ensure sidebar is full-width at 768px */
    .bento-sidebar {
        width: 100%;
    }

    /* Hero card: tighten for small screens */
    .hero-card-wrap {
        padding: 1rem;
    }

    /* Monthly dues: horizontal scroll strip instead of 4-column grid */
    .user-month-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.6rem;
        padding-bottom: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .user-month-grid::-webkit-scrollbar {
        display: none;
    }

    .month-box {
        flex-shrink: 0;
        width: 80px;
        padding: 0.65rem 0.25rem;
    }

    /* Pill tabs: full-width equal tabs */
    .pill-tabs {
        gap: 0.35rem;
    }

    .news-tab {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.5rem;
    }

    /* News items: stack image above text */
    .news-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .news-item img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: var(--r-md);
    }

    /* Admin table: enforce min-width so columns stay readable inside the existing overflow-x wrapper */
    .admin-table-wrap table {
        min-width: 620px;
    }

    .page-below {
        padding: 1.5rem 1rem;
    }

    .hero-card {
        padding: 1.5rem 1.25rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .stat-card-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        columns: 1;
    }

    .form-container,
    .form-container--dark {
        padding: 1.75rem 1.25rem;
        width: calc(100% - 32px);
        max-width: 100%;
        margin-left: 16px;
        margin-right: 16px;
        box-sizing: border-box;
    }

    .dashboard-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    button,
    .btn,
    input,
    select,
    a {
        /* NOTE: no inflated z-index here. A previous `z-index: 9999` lifted
           every button/link above the fixed bottom nav (z-index 300), so page
           buttons painted on top of the nav bar while scrolling past it. The
           nav sits above page content via its own stacking context; these
           elements only need positioning + a pointer cursor. */
        position: relative !important;
        cursor: pointer !important;
    }
}

@media (max-width: 480px) {
    /* Tighten padding on cards and main content areas */
    .glass-card {
        padding: 1.1rem !important;
    }

    main {
        padding: 1rem 0.75rem;
    }

    .page-below {
        padding: 1rem 0.75rem;
    }

    /* Prevent any horizontal overflow */
    body {
        overflow-x: hidden;
    }

    /* Stat grid stays single column on very small phones */
    .stat-card-grid {
        grid-template-columns: 1fr;
    }

    /* Hero card: minimal padding */
    .hero-card {
        padding: 1.25rem 1rem;
    }
}

/* Gallery video thumbnails */
.gallery-video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a1e30;
    border-radius: inherit;
    overflow: hidden;
}

.gallery-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.gallery-video-badge {
    position: absolute;
    bottom: 6px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* ╔══════════════════════════════════════════════════════════╗
   ║   NEW-AGE ANIMATIONS  —  design layer, CSS + JS hooks   ║
   ╚══════════════════════════════════════════════════════════╝ */

/* ── Keyframes ─────────────────────────────────────────────────── */

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.93)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes heroCardIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes shimmerSweep {
    0% {
        left: -80%
    }

    100% {
        left: 130%
    }
}

@keyframes pulseBadge {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(91, 170, 204, 0)
    }

    50% {
        box-shadow: 0 0 0 10px rgba(91, 170, 204, 0.22)
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.6)
    }

    70% {
        opacity: 1;
        transform: scale(1.09)
    }

    100% {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes drawLine {
    from {
        transform: scaleX(0)
    }

    to {
        transform: scaleX(1)
    }
}

@keyframes gradientText {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes heroGradient {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: var(--shadow-raised)
    }

    50% {
        box-shadow: var(--shadow-raised), 0 0 60px rgba(91, 170, 204, 0.25)
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(255, 255, 255, 0.92)
    }

    50% {
        border-color: rgba(91, 170, 204, 0.6)
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-36px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(22px, -28px) scale(1.1)
    }

    66% {
        transform: translate(-18px, 20px) scale(0.94)
    }

    100% {
        transform: translate(0, 0) scale(1)
    }
}

@keyframes morphBlob {
    0% {
        border-radius: 50%
    }

    25% {
        border-radius: 62% 38% 55% 45%/50% 60% 40% 50%
    }

    50% {
        border-radius: 40% 60% 45% 55%/60% 40% 60% 40%
    }

    75% {
        border-radius: 55% 45% 62% 38%/42% 58% 42% 58%
    }

    100% {
        border-radius: 50%
    }
}


/* ── Page enter ────────────────────────────────────────────────── */
body {
    animation: fadeIn 0.4s ease both;
}


/* ── Nav: spring drop ──────────────────────────────────────────── */
.nav-pill {
    animation: navDrop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.nav-logo {
    transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo:hover {
    opacity: 0.82;
    transform: scale(1.05);
}

.nav-link {
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.nav-link:hover:not(.active) {
    transform: scale(1.08);
}


/* ── Hero: animated gradient background ────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, #0D2B4E 0%, #0f3460 30%, #0d3a6b 60%, #091e38 100%);
    background-size: 300% 300%;
    animation: heroGradient 18s ease infinite;
}

/* Particles canvas (injected by animations.js) */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Cursor spotlight (injected by animations.js) */
.cursor-spotlight {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 170, 204, 0.14) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1;
}

/* Blobs: float + morph */
.blob {
    animation: floatBlob 9s ease-in-out infinite, morphBlob 14s ease-in-out infinite;
}

.page-hero .blob-1 {
    animation-duration: 8s, 13s;
}

.page-hero .blob-2 {
    animation-duration: 12s, 17s;
    animation-direction: reverse, reverse;
    animation-delay: -4s, -7s;
}

.page-below .blob-3 {
    animation-duration: 10s, 16s;
    animation-delay: -3s, -5s;
}

.page-below .blob-4 {
    animation-duration: 14s, 20s;
    animation-direction: reverse, normal;
    animation-delay: -6s, -2s;
}


/* ── Hero card: dramatic spring entrance ────────────────────────── */
.hero-card {
    animation: heroCardIn 0.85s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero-pill-badge {
    animation: pulseBadge 3.8s ease-in-out infinite, fadeUp 0.6s 0.35s both;
}

.hero-card>p {
    animation: fadeUp 0.7s 0.6s both;
}

.hero-card .btn {
    animation: popIn 0.6s 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Animated gradient heading */
.hero-card h1 {
    background: linear-gradient(90deg, #FEFCF8 0%, #5BAACC 40%, #FEFCF8 70%, #5BAACC 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.7s 0.45s both, gradientText 6s ease infinite 1.2s;
}


/* ── Scroll-reveal system (driven by animations.js) ────────────── */
.will-reveal {
    opacity: 0;
    transform: translateY(44px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.will-reveal.from-left {
    transform: translateX(-44px);
}

.will-reveal.from-right {
    transform: translateX(44px);
}

.will-reveal.scale-in {
    transform: scale(0.86);
}

.will-reveal.revealed {
    opacity: 1 !important;
    transform: none !important;
}


/* ── Glass cards: hover tilt + glow ─────────────────────────────── */
.glass-card {
    transition: box-shadow 0.35s ease,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.35s ease;
    transform-style: preserve-3d;
}

.glass-card:hover {
    box-shadow: 0 28px 70px rgba(13, 43, 78, 0.18), 0 0 0 1.5px rgba(255, 255, 255, 0.98);
    animation: borderGlow 2s ease-in-out infinite;
}

/* Dark card: perpetual glow */
.glass-card--dark {
    animation: glowPulse 4.5s ease-in-out infinite;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
}

.glass-card--dark:hover {
    box-shadow: var(--shadow-raised), 0 0 70px rgba(91, 170, 204, 0.3);
    animation-play-state: paused;
}


/* ── Buttons: shimmer + spring ──────────────────────────────────── */
.btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease, background 0.2s, color 0.2s !important;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -90%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
}

.btn:hover::before {
    animation: shimmerSweep 0.5s ease-out forwards;
}

.btn:hover {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 12px 32px rgba(13, 43, 78, 0.22) !important;
}

.btn:active {
    transform: translateY(1px) scale(0.97) !important;
    box-shadow: none !important;
    transition-duration: 0.08s !important;
}


/* ── Section label line draw ────────────────────────────────────── */
.section-label::after {
    transform: scaleX(0);
    transform-origin: left;
    animation: drawLine 1s 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}


/* ── Page heading ───────────────────────────────────────────────── */
.page-heading {
    animation: fadeUp 0.55s 0.08s both;
}


/* ── Gallery hover: spring scale ────────────────────────────────── */
.gallery-item {
    transition: box-shadow 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.gallery-item:hover {
    transform: scale(1.05) translateY(-6px) !important;
    box-shadow: var(--shadow-raised) !important;
}


/* ── Month box hover ─────────────────────────────────────────────── */
.month-box {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}

.month-box:hover {
    transform: scale(1.13);
}


/* ── Input focus: lift + glow ───────────────────────────────────── */
.form-group input,
.form-group select,
.form-group textarea {
    transition: border-color 0.25s, box-shadow 0.25s,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: scale(1.015) !important;
}


/* ── Pill tabs ──────────────────────────────────────────────────── */
.news-tab {
    transition: background 0.25s, color 0.25s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s !important;
}

.news-tab:hover:not(.active) {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 6px 18px rgba(13, 43, 78, 0.12);
}


/* ── Nav badge pop ──────────────────────────────────────────────── */
.nav-badge {
    animation: popIn 0.55s 0.55s both;
}


/* ── Modal spring ───────────────────────────────────────────────── */
.modal-content {
    animation: heroCardIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}


/* ── Lightbox ───────────────────────────────────────────────────── */
#lightbox.open #lightbox-img {
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}


/* ── Row / card hovers ──────────────────────────────────────────── */
tbody tr {
    transition: background 0.2s ease;
}

.news-item {
    transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.news-item:hover {
    transform: translateX(6px) scale(1.01);
    box-shadow: var(--shadow-raised);
}

.event-card,
.game-widget {
    transition: box-shadow 0.28s, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.event-card:hover,
.game-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(13, 43, 78, 0.12);
}


/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
