:root {
    --navy: #0a2e5d;
    --royal: #184e8a;
    --gold: #c9a227;
    --white: #ffffff;
    --ink: #17283d;
    --muted: #5f738b;
    --surface: #f3f6fa;
    --line: #dce6f0;
    --danger: #b3261e;
    --warning: #b57800;
    --success: #0a7a3f;
    --shadow: 0 10px 28px rgba(10, 46, 93, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Public Sans", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, #f6f9fc 0%, #f7fbff 35%, #f2f6fa 100%),
        repeating-linear-gradient(135deg, transparent 0 34px, rgba(10, 46, 93, 0.03) 34px 35px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3, h4 {
    font-family: "Libre Baskerville", serif;
    margin-top: 0;
    color: #0f2d50;
}
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, 92%); margin: 0 auto; }

.top-strip {
    background: #081f3e;
    color: #d6e3f5;
    font-size: 0.77rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid #12345f;
}
.strip-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0a2e5d, #0d3b75 58%, #204f8f);
    box-shadow: var(--shadow);
}
.nav-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.72rem 0;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    min-width: 220px;
}
.logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #d7e6f7;
}
.logo strong { display: block; font-size: 1rem; line-height: 1.1; }
.logo small { font-size: 0.76rem; color: #c9dcf2; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    flex: 1;
}
.main-nav a {
    color: #d8e7f8;
    font-weight: 600;
    font-size: 0.94rem;
}
.main-nav a:hover { color: #ffffff; text-decoration: none; }
.auth-links { display: flex; align-items: center; gap: 0.55rem; }
.user-chip {
    color: #f3f8ff;
    border: 1px solid #7ea0cc;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
}
.menu-toggle { display: none; }

.btn {
    border: 0;
    border-radius: 8px;
    padding: 0.58rem 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
}
.btn-primary {
    background: linear-gradient(180deg, #c9a227, #b18c1a);
    color: #091f3c;
}
.btn-secondary {
    background: #e7f0fb;
    border: 1px solid #c7d9ef;
    color: #0e3867;
}
.btn-light {
    background: #f7fbff;
    color: #0d3a6c;
}
.btn-danger { background: var(--danger); color: #fff; }

main {
    position: relative;
    flex: 1 0 auto;
}
main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 5%, rgba(10, 46, 93, 0.07), transparent 33%);
    pointer-events: none;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #eaf2fc;
    padding: 3.2rem 0;
    background:
        linear-gradient(120deg, rgba(8, 33, 66, 0.93), rgba(14, 66, 119, 0.82)),
        linear-gradient(180deg, #406a9d 0%, #103158 100%);
}
.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -30px;
    width: 480px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.25), transparent 70%);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 45px),
        linear-gradient(180deg, transparent, rgba(5, 24, 47, 0.35));
}
.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 1.2rem;
}
.eyebrow {
    display: inline-block;
    color: #eacb62;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.74rem;
}
.hero h1 {
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    color: #fff;
    margin: 0.6rem 0;
}
.hero-content p { color: #d6e5f8; max-width: 68ch; }
.search-bar {
    display: flex;
    gap: 0.55rem;
    margin-top: 1rem;
}
.search-bar input {
    flex: 1;
    background: #f8fbff;
}
.hero-panel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(213, 229, 248, 0.35);
    border-radius: 14px;
    padding: 0.95rem;
    backdrop-filter: blur(4px);
}
.hero-panel h3 { color: #fff; font-family: "Public Sans", sans-serif; }
.announcement {
    border-left: 4px solid #c7d9f0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.72rem 0;
}
.announcement h4 { color: #fff; font-family: "Public Sans", sans-serif; }
.announcement p { color: #e2eefb; margin-bottom: 0; }
.announcement.high { border-left-color: #f2c14c; }

.suggestions {
    display: none;
    margin-top: 0.4rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.suggestion-item {
    display: block;
    padding: 0.72rem 0.82rem;
    border-bottom: 1px solid #ebf1f8;
}
.suggestion-item:last-child { border-bottom: none; }

.section {
    padding: 2.2rem 0;
    position: relative;
}
.section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c6d7eb, transparent);
}
.compact-top { padding-top: 1.4rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.card, .panel, .detail-card, .auth-form, .form-wrap {
    background: #fff;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid #e4edf6;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 0.24rem 0.56rem;
    background: #e9f1fb;
    color: #0d447a;
    font-size: 0.76rem;
    font-weight: 700;
}

.service-title-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    margin: 0.55rem 0;
}
.service-title-row h3 {
    font-family: "Public Sans", sans-serif;
    margin-bottom: 0;
    font-size: 1.05rem;
}
.service-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff5fc;
    border: 1px solid #d3e2f2;
}
.service-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #0e4176;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.service-card small { display: block; color: var(--muted); margin: 0.4rem 0; }

.leadership-section {
    background: linear-gradient(180deg, #f7fbff, #edf4fb);
}
.leadership-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    gap: 1rem;
    align-items: stretch;
}
.leader-photo,
.leader-message {
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.leader-photo {
    overflow: hidden;
    padding: 0.5rem;
}
.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.leader-message {
    padding: 1.15rem;
}
.leader-message h3 {
    font-family: "Public Sans", sans-serif;
    margin-bottom: 0.2rem;
}
.leader-title {
    color: #46617f;
    margin-top: 0;
    font-weight: 600;
}
.signature {
    font-family: "Libre Baskerville", serif;
    font-style: italic;
    color: #1b3f6f;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}
.stat {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #dde8f4;
    box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 1.55rem; color: var(--navy); }
.stat span { color: var(--muted); }

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.news-card {
    display: grid;
    grid-template-rows: 130px 1fr;
    padding: 0;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(10, 46, 93, 0.2);
}
.news-thumb {
    background:
        linear-gradient(160deg, rgba(10, 46, 93, 0.75), rgba(34, 97, 170, 0.45)),
        linear-gradient(60deg, #90aaca, #bacde2);
}
.news-body { padding: 0.95rem; }
.news-body h3 {
    font-size: 1.06rem;
    margin: 0.4rem 0;
    font-family: "Public Sans", sans-serif;
}
.news-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}
.date-pill {
    font-size: 0.73rem;
    color: #294f7b;
    background: #edf4fb;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #d5e3f3;
}
.news-item small, .meta { color: var(--muted); }

.departments-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.department-card {
    position: relative;
    padding-top: 1.3rem;
}
.dept-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #0a2e5d, #1d5a9b, #c9a227);
}
.dept-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4fb;
    border: 1px solid #d5e4f4;
    margin-bottom: 0.5rem;
}
.dept-icon svg {
    width: 22px;
    height: 22px;
    stroke: #0e4279;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.department-card small {
    display: block;
    margin-top: 0.35rem;
    color: #5b6f86;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.news-filter { grid-template-columns: 1fr auto; max-width: 420px; }

input, textarea, select {
    width: 100%;
    border: 1px solid #cfdceb;
    border-radius: 8px;
    padding: 0.64rem 0.74rem;
    font: inherit;
    background: #fff;
}
label { font-weight: 700; margin-top: 0.6rem; display: block; }

.auth-form, .form-wrap { width: min(580px, 100%); }
.auth-form form, .form-wrap form { display: grid; gap: 0.5rem; }

.pagination {
    margin-top: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9f0f7;
    padding: 0.5rem 0;
}
.message-item {
    background: #f8fbff;
    border: 1px solid #e3ecf6;
    border-radius: 8px;
    padding: 0.65rem;
    margin-bottom: 0.6rem;
}

.flash-wrap { margin-top: 0.8rem; }
.flash {
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
}
.flash-success { background: #eaf8ef; color: var(--success); }
.flash-danger { background: #fdeceb; color: var(--danger); }
.flash-warning { background: #fff6e6; color: var(--warning); }
.flash-info { background: #eaf2fb; color: var(--royal); }

.site-footer {
    margin-top: 2rem;
    background: linear-gradient(180deg, #071d3a, #081a33);
    color: #e4eef8;
    flex-shrink: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1rem;
    padding: 1.35rem 0;
}
.footer-brand {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: #fff;
}
.footer-brand img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}
.footer-brand small { color: #b9cbe0; display: block; }
.footer-grid h5 { margin-bottom: 0.5rem; color: #fff; }
.footer-grid a {
    display: block;
    color: #d0dff0;
    margin-bottom: 0.3rem;
}
.footer-copy { color: #b8c9dd; }
.social-row {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.35rem;
}
.social-row a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #11345f;
    border: 1px solid #2f537f;
    color: #f5f9ff;
    font-size: 0.74rem;
    font-weight: 700;
}
.footer-legal {
    border-top: 1px solid #223f63;
    color: #9fb5cf;
    font-size: 0.78rem;
    padding: 0.68rem 0 0.9rem;
}

.center { text-align: center; }

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .strip-inner { justify-content: center; }
    .strip-inner span:last-child { display: none; }

    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem;
        background: #0d396c;
        border-top: 1px solid #295483;
    }
    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
        border-radius: 8px;
        border: 1px solid #6f93bf;
        background: #f7fbff1f;
        color: #fff;
        padding: 0.4rem 0.65rem;
    }
    .auth-links { display: none; }

    .hero-grid,
    .leadership-grid {
        grid-template-columns: 1fr;
    }

    .filter-row { grid-template-columns: 1fr; }
    .news-filter { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------
   Base Layout Redesign (Visual Only)
---------------------------------- */
.app-shell {
    background:
        radial-gradient(circle at 10% 10%, rgba(16, 76, 140, 0.12), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(201, 162, 39, 0.1), transparent 30%),
        linear-gradient(180deg, #f4f8fd 0%, #edf3f9 100%);
}

.site-header {
    border-bottom: 1px solid rgba(169, 191, 218, 0.35);
    backdrop-filter: blur(6px);
    animation: headerSlide 0.55s ease-out both;
}

.top-strip {
    background: linear-gradient(90deg, #061a35 0%, #0a2e5d 55%, #0f3f77 100%);
}

.strip-inner {
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: clamp(12px, 2.4vw, 34px);
    padding-right: clamp(12px, 2.4vw, 34px);
}

.header-glow {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.9), transparent);
    animation: glowMove 3s ease-in-out infinite;
}

.logo {
    transition: transform 0.25s ease;
    margin-right: 0;
    flex: 0 0 auto;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo img {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 8px 18px rgba(7, 27, 51, 0.3);
}

.nav-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(180, 206, 235, 0.35);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    gap: 0.3rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-nav a {
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    transition: all 0.22s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.auth-links .btn {
    box-shadow: 0 6px 14px rgba(6, 26, 53, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-links {
    margin-left: 0;
    flex: 0 0 auto;
}

.auth-links .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(6, 26, 53, 0.32);
}

main {
    animation: fadeInPage 0.45s ease-out both;
}

.site-footer {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, #06192f 0%, #082647 45%, #0a2f57 100%);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 28%, rgba(201, 162, 39, 0.14), transparent 28%),
        radial-gradient(circle at 84% 74%, rgba(76, 129, 191, 0.16), transparent 36%);
}

.footer-grid, .footer-legal {
    position: relative;
    z-index: 1;
}

.footer-brand {
    transition: transform 0.22s ease;
}

.footer-brand:hover {
    transform: translateY(-1px);
}

.social-row a {
    transition: transform 0.2s ease, background 0.2s ease;
}

.social-row a:hover {
    background: #1a4a80;
    transform: translateY(-1px);
    text-decoration: none;
}

@keyframes headerSlide {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInPage {
    from {
        opacity: 0.92;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowMove {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@media (max-width: 980px) {
    .nav-wrap {
        gap: 0.7rem;
    }

    .logo {
        min-width: 0;
        flex: 1;
    }

    .logo strong {
        font-size: 0.9rem;
    }

    .logo small {
        font-size: 0.68rem;
    }

    .main-nav.open.nav-pill {
        border-radius: 16px;
        padding: 0.7rem;
        margin: 0.5rem 0.75rem 0.75rem;
        background: rgba(12, 50, 93, 0.98);
        border: 1px solid rgba(128, 168, 212, 0.45);
        animation: menuDrop 0.2s ease-out both;
        left: 0;
        right: 0;
        transform: none;
    }

    .main-nav.open a {
        width: 100%;
        padding: 0.65rem 0.75rem;
    }

    .site-footer {
        margin-top: 1.2rem;
    }
}

@media (max-width: 560px) {
    .top-strip {
        font-size: 0.67rem;
    }

    .strip-inner {
        padding: 0.34rem 0;
    }

    .logo img {
        width: 38px;
        height: 38px;
    }

    .menu-toggle {
        padding: 0.36rem 0.55rem;
        font-size: 0.95rem;
    }

    .footer-grid {
        padding: 1.1rem 0;
        gap: 0.8rem;
    }
}

@keyframes menuDrop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Dashboard */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 12px;
    margin-top: 12px;
}
.admin-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
}
.admin-sidebar a {
    display: block;
    padding: 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: #eef5fd;
    border: 1px solid #d5e4f4;
    color: #163e6d;
    font-weight: 700;
}
.admin-main {
    min-width: 0;
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
    }
}
