/* =========================================================
   Global Public CSS
   Use location: includes/global.css
   Purpose: shared public layout, navigation, forms, cards, and text scale
========================================================= */

:root {
    --theme-color: #123b7a;
    --theme-soft: color-mix(in srgb, var(--theme-color) 10%, white 90%);
    --theme-line: rgba(18, 59, 122, .10);
    --theme-dark: #10233f;
    --muted: #607086;

    --font-ui: Arial, Helvetica, sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
    --font-number: Georgia, "Times New Roman", serif;
    --fs-xs: clamp(11px, .70vw, 12px);
    --fs-sm: clamp(12px, .78vw, 14px);
    --fs-base: clamp(14px, .95vw, 16px);
    --fs-md: clamp(15px, 1.05vw, 17px);
    --fs-lg: clamp(17px, 1.35vw, 20px);
    --fs-xl: clamp(20px, 2vw, 28px);
    --fs-page-title: clamp(26px, 3vw, 42px);
    --fs-brand: clamp(20px, 1.8vw, 24px);
    --fs-hero-title: clamp(32px, 4vw, 42px);
    --fs-button: clamp(14px, .90vw, 16px);
    --fs-table: clamp(13px, .90vw, 15px);
    --fs-home-hero-title: clamp(38px, 5vw, 62px);
    --fs-home-section-title: clamp(24px, 2vw, 28px);
    --fs-home-button: clamp(13px, .82vw, 14px);
    --fs-home-link: clamp(13px, .82vw, 14px);
    --fs-home-arrow: clamp(28px, 2.1vw, 30px);
    --fs-home-quote: clamp(16px, 1.2vw, 18px);
    --fs-home-card-title: clamp(17px, 1.2vw, 18px);
    --fs-home-featured-title: clamp(19px, 1.45vw, 21px);
    --fs-home-date-day: clamp(22px, 1.8vw, 24px);
    --fs-home-event-day: clamp(24px, 2vw, 27px);
    --fs-home-stat-value: clamp(24px, 2vw, 26px);
    --fs-home-quote-mark: clamp(34px, 3vw, 38px);

    --radius-sm: 12px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-card: 0 20px 48px rgba(0, 0, 0, .06);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(18, 59, 122, .08), transparent 20%),
        linear-gradient(180deg, #f8fbff 0%, #f6f8fc 100%);
    color: #1f2937;
}

a {
    text-decoration: none;
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

.container {
    width: min(1150px, 92%);
    margin: 0 auto;
}

.topbar {
    background: var(--theme-color);
    color: #fff;
    font-size: var(--fs-sm);
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.topbar-email,
.topbar-phone {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-phone {
    text-align: right;
}

.navbar {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(18, 59, 122, .09);
    position: relative;
    z-index: 50;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    position: relative;
}

.brand {
    max-width: min(62vw, 520px);
    color: var(--theme-color);
    font-family: var(--font-display);
    font-size: var(--fs-brand);
    font-weight: 700;
    line-height: 1.15;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 42px;
    padding: 0 11px;
    border: 1px solid rgba(18, 59, 122, .16);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f2f6fb);
    color: var(--theme-dark);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(18, 59, 122, .09);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
    background: linear-gradient(180deg, var(--theme-color), #0e2f62);
    border-color: var(--theme-color);
    color: #fff;
    box-shadow: 0 14px 28px rgba(18, 59, 122, .24);
}

.hamburger {
    width: 22px;
    height: 18px;
    display: inline-block;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: top .2s ease, transform .2s ease, opacity .16s ease;
}

.hamburger span:nth-child(1) {
    top: 2px;
    width: 100%;
}

.hamburger span:nth-child(2) {
    top: 8px;
    width: 74%;
}

.hamburger span:nth-child(3) {
    top: 14px;
    width: 48%;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    top: 8px;
    width: 100%;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    top: 8px;
    width: 100%;
    transform: rotate(-45deg);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: var(--fs-base);
}

.menu a {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.menu a:hover {
    background: var(--theme-soft);
}

.hero {
    padding: 70px 0;
    background: linear-gradient(135deg, #eef4ff, #f9fbff);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: var(--fs-hero-title);
    line-height: 1.12;
}

.hero p {
    max-width: 720px;
    color: #4b5563;
    font-size: var(--fs-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: var(--fs-button);
    font-weight: 700;
}

.btn-primary {
    background: var(--theme-color);
    color: #fff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.section {
    padding: 48px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card,
.form-card {
    padding: 24px;
    border: 1px solid var(--theme-line);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.notice-item,
.event-item {
    padding: 18px 0;
    border-bottom: 1px solid #eceff4;
}

.notice-item:last-child,
.event-item:last-child {
    border-bottom: none;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    margin: 18px 0;
    font-size: var(--fs-base);
    line-height: 1.5;
}

.flash.success {
    background: #e8f8ef;
    color: #166534;
}

.flash.error {
    background: #fdecec;
    color: #b91c1c;
}

.flash.warning {
    background: #fff7e6;
    color: #92400e;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 16px;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0;
    margin-top: 50px;
}

.muted {
    color: var(--muted);
    font-size: var(--fs-sm);
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: var(--fs-xs);
}

.page-intro {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--theme-line);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, .45), transparent 20%),
        linear-gradient(135deg, color-mix(in srgb, var(--theme-color) 14%, white 86%) 0%, #ffffff 100%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .05);
}

.page-intro h1,
.page-intro h2 {
    margin: 0 0 10px;
    color: var(--theme-dark);
    font-family: var(--font-display);
    font-size: var(--fs-page-title);
    line-height: 1.15;
}

.page-intro p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.content-stack {
    display: grid;
    gap: 20px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: var(--fs-table);
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 28px, 1150px);
    }

    .navbar .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 14px;
        padding: 12px 0;
        align-items: center;
    }

    .brand {
        max-width: calc(100% - 58px);
        font-size: clamp(18px, 5.2vw, 22px);
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        justify-self: end;
    }

    .menu {
        grid-column: 1 / -1;
        display: flex;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        max-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(.98);
        border: 1px solid rgba(18, 59, 122, .12);
        border-radius: 16px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 22px 50px rgba(15, 23, 42, .18);
        z-index: 60;
        transition: max-height .3s ease, opacity .22s ease, transform .22s ease, padding .22s ease, visibility .22s ease;
    }

    .menu.is-open {
        display: flex;
        max-height: 430px;
        padding: 8px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .menu a {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        border: 0;
        background: transparent;
        border-radius: 10px;
        color: var(--theme-dark);
        box-shadow: none;
        font-weight: 600;
    }

    .menu a::after {
        content: "";
        width: 7px;
        height: 7px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        opacity: .45;
        transform: rotate(45deg);
    }

    .menu a:hover {
        background: linear-gradient(90deg, var(--theme-soft), transparent);
        color: var(--theme-color);
    }

    .row {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: clamp(30px, 8vw, 32px);
    }

    .topbar .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        justify-content: stretch;
        gap: 8px;
        padding: 8px 0;
        font-size: clamp(10px, 2.7vw, 12px);
    }

    .topbar-email,
    .topbar-phone {
        display: block;
        min-width: 0;
    }

    .section {
        padding: 32px 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card,
    .form-card,
    .page-intro {
        border-radius: var(--radius-lg);
        padding: 20px;
    }

    .page-intro p {
        line-height: 1.65;
    }

    .btn {
        width: 100%;
        min-height: 46px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .brand {
        font-size: 17px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
}

/* ---------- Public footer ---------- */
.site-footer {
    background: #f8f9fc;
    color: #667085;
    padding: 44px 0 0;
    margin-top: 0;
    border-top: 1px solid #e8ebf3;
    font-size: var(--fs-sm);
}

.site-footer strong,
.site-footer h3 {
    color: #1f2a7c;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.25fr .8fr 1.05fr 1.2fr;
    gap: 44px;
    align-items: start;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.site-footer-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e93339;
    color: #fff;
    font-weight: 800;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #2a3190;
}

.site-footer p {
    margin: 0 0 14px;
    line-height: 1.65;
}

.site-footer h3 {
    margin: 0 0 14px;
    font-size: var(--fs-base);
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.site-footer a {
    color: #667085;
    text-decoration: none;
}

.site-footer a:hover {
    color: #db2f36;
}

.site-socials {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.site-socials a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #db2f36;
    border: 1px solid #eceef5;
    font-size: var(--fs-xs);
    font-weight: 800;
}

.site-footer-bottom {
    margin-top: 40px;
    padding: 18px 0;
    border-top: 1px solid #e8ebf3;
    text-align: center;
    font-size: var(--fs-xs);
}

.site-footer-bottom nav {
    display: inline-flex;
    gap: 16px;
    margin-left: 12px;
}

@media (max-width: 900px) {
    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .site-footer-bottom nav {
        display: flex;
        justify-content: center;
        margin: 10px 0 0;
    }
}