/* ==========================================================================
   Global Color Variables & Tokens
   ========================================================================== */
:root {
    /* Brand Palettes */
    --navy-blue: #09203f;
    --royal-blue: #1b4965;
    --deep-green: #1b6338;
    --gold-accent: #cfa144;
    --accent-emerald: #10b981;
    --brand-fb: #1877f2;

    /* Aliases for Inter-Page Compatibility */
    --brand-navy: var(--navy-blue);
    --brand-blue: var(--royal-blue);
    --brand-green: var(--deep-green);
    --brand-gold: var(--gold-accent);
    --brand-navy-gradient: linear-gradient(135deg, #09203f 0%, #1b4965 100%);

    /* Surfaces & Backgrounds */
    --surface-bg: #f4f7fa;
    --surface-light: #f8fafc;
    --surface-white: #ffffff;
    --card-bg: #ffffff;
    --card-surface: #ffffff;

    /* Text & Typography */
    --text-primary: #1e293b;
    --text-muted: #64748b;

    /* Borders & Outlines */
    --border-color: #cbd5e1;
    --soft-border: #e2e8f0;

    /* Elevation Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 24px -4px rgba(9, 32, 63, 0.08);
    --shadow-lg: 0 20px 30px -6px rgba(9, 32, 63, 0.14);
}

/* ==========================================================================
   CSS Reset & Base Rules
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--surface-bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ==========================================================================
   Top Utility Bar & Header
   ========================================================================== */
.top-bar {
    background: var(--navy-blue);
    color: #e2e8f0;
    font-size: 0.84rem;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.top-bar a {
    color: var(--gold-accent);
    text-decoration: none;
    margin-left: 12px;
}

header {
    background: #fff;
    border-bottom: 3px solid var(--deep-green);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.school-brand {
    text-decoration: none;
}

.school-brand h1 {
    font-size: 1.25rem;
    color: var(--navy-blue);
    font-weight: 800;
}

.school-brand span {
    font-size: 0.8rem;
    color: var(--deep-green);
    font-weight: 600;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    gap: 16px;
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
    color: var(--deep-green);
}

/* ==========================================================================
   Standard Container & Grid System
   ========================================================================== */
.page-hero {
    background: linear-gradient(rgba(9, 32, 63, 0.9), rgba(27, 73, 101, 0.9)),
                url('https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=1200&q=80') center/cover;
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.page-hero h2 {
    font-size: 2.1rem;
    margin-bottom: 10px;
}

.page-hero p {
    color: #cbd5e1;
    max-width: 760px;
    margin: auto;
    font-size: 1.05rem;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 6px;
    border-top: 4px solid var(--deep-green);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card h3 {
    color: var(--navy-blue);
    margin-bottom: 10px;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.badge-success {
    background: #def7ec;
    color: #03543f;
}

.badge-warning {
    background: #fef08a;
    color: #713f12;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================================================
   Table Styling for Census & Administrative Records
   ========================================================================== */
.table-census {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
}

.table-census th,
.table-census td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    font-size: 0.92rem;
}

.table-census th {
    background-color: var(--surface-bg);
    color: var(--navy-blue);
    text-align: left;
    width: 40%;
}

/* ==========================================================================
   Facebook Updates Component
   ========================================================================== */
.fb-embed-section {
    margin-bottom: 50px;
}

.fb-embed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.fb-embed-header h3 {
    font-size: 1.6rem;
    color: var(--brand-navy);
    font-weight: 800;
    margin: 0;
}

.fb-embed-header p {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin: 4px 0 0;
}

.fb-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1877f2;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fb-link-btn:hover {
    background: #1464cc;
    transform: translateY(-2px);
}

.fb-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.fb-iframe-frame {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--soft-border);
    box-shadow: var(--shadow-sm);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-profile-cta {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 12px;
    padding: 32px 28px;
    border: 1px solid #bfdbfe;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fb-cta-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.fb-badge-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.fb-cta-head h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--brand-navy);
}

.fb-cta-head span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.fb-cta-desc {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 20px;
}

.fb-activity-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.fb-activity-list li {
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 10px;
    font-weight: 600;
}

.fb-btn-full {
    background: #1877f2;
    color: #ffffff;
    font-weight: 700;
    padding: 13px;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.fb-btn-full:hover {
    background: #1464cc;
    transform: translateY(-2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: var(--navy-blue);
    color: #cbd5e1;
    padding: 40px 20px 20px;
    margin-top: 50px;
    font-size: 0.88rem;
}

.footer-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid h4 {
    color: var(--gold-accent);
    margin-bottom: 12px;
}

.footer-grid a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--gold-accent);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: #94a3b8;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
    .fb-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 40px 16px;
    }

    .page-hero h2 {
        font-size: 1.7rem;
    }

    .table-census th,
    .table-census td {
        padding: 8px 10px;
        font-size: 0.86rem;
    }
}