/* ==========================================================================
   SFVCCA Chinese School — base styles & public site
   ========================================================================== */

/* --------------------------------------------------------- design tokens */
:root {
    --crimson:      #e8175d;
    --crimson-dk:   #c8102e;
    --crimson-lt:   #fce7ee;
    --orange:       #f5811f;
    --orange-lt:    #fef1e4;
    --gold:         #f5b921;
    --gold-lt:      #fdf5e1;
    --navy:         #14356b;
    --navy-dk:      #0d2450;
    --navy-lt:      #e8eef8;
    --green:        #2e9e6b;
    --green-lt:     #e6f5ee;

    --ink:          #1a2233;
    --body:         #46536b;
    --muted:        #7b869c;
    --line:         #e4e8ef;
    --line-soft:    #eef1f6;
    --bg:           #ffffff;
    --bg-soft:      #f7f9fc;
    --bg-warm:      #fdf8f4;

    --radius:       14px;
    --radius-lg:    22px;
    --radius-sm:    9px;

    --shadow-sm:    0 1px 3px rgba(20, 53, 107, .07), 0 1px 2px rgba(20, 53, 107, .04);
    --shadow:       0 4px 16px rgba(20, 53, 107, .09), 0 1px 3px rgba(20, 53, 107, .05);
    --shadow-lg:    0 14px 42px rgba(20, 53, 107, .14);
    --shadow-crim:  0 8px 22px rgba(232, 23, 93, .28);

    --font-display: 'Anton', 'Arial Narrow', 'Haettenschweiler', Impact, sans-serif;
    --font-script:  'Caveat', 'Segoe Script', cursive;
    --font-zh:      'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC',
                    'Heiti TC', 'SimHei', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                    Roboto, 'Helvetica Neue', Arial, sans-serif;

    --wrap: 1200px;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
    margin: 0 0 .5em;
    color: var(--ink);
    line-height: 1.22;
    font-weight: 800;
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

button, input, select, textarea { font: inherit; color: inherit; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
    outline: 3px solid var(--crimson);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Chinese text renders with the CJK stack. */
.zh, .zh-inline { font-family: var(--font-zh); }
.zh-inline { color: var(--muted); font-weight: 500; font-size: .92em; }

/* -------------------------------------------------------------- layout */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 24px;
}

.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-tight { padding: 48px 0; }

.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny  { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 0;
    border-radius: 999px;
    background: var(--crimson);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
    box-shadow: var(--shadow-crim);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}
.btn:hover {
    background: var(--crimson-dk);
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}
.btn:active { transform: translateY(0); }

.btn-orange { background: var(--orange); box-shadow: 0 8px 22px rgba(245, 129, 31, .3); }
.btn-orange:hover { background: #dd6f12; }

.btn-gold { background: var(--gold); box-shadow: 0 8px 22px rgba(245, 185, 33, .32); color: #4a3400; }
.btn-gold:hover { background: #e0a613; color: #4a3400; }

.btn-navy { background: var(--navy); box-shadow: 0 8px 22px rgba(20, 53, 107, .26); }
.btn-navy:hover { background: var(--navy-dk); }

.btn-ghost {
    background: transparent;
    color: var(--crimson);
    border: 2px solid currentColor;
    box-shadow: none;
    padding: 11px 24px;
}
.btn-ghost:hover { background: var(--crimson); color: #fff; border-color: var(--crimson); }

.btn-white {
    background: #fff; color: var(--navy);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.btn-white:hover { background: var(--bg-soft); color: var(--navy); }

.btn-sm { padding: 8px 16px; font-size: .84rem; gap: 6px; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

.btn .arrow { transition: transform .16s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------- site header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 78px;
}

/* The brand block must never be squeezed — Chinese characters wrapping
   mid-word ("協 會") looks broken, so it keeps its width and the nav flexes. */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: none;
}
.brand:hover { text-decoration: none; }
.brand img, .brand svg { width: 46px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-zh {
    font-family: var(--font-zh);
    font-size: 1.16rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: .04em;
    white-space: nowrap;
}
.brand-en {
    font-size: .585rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav a {
    padding: 9px 11px;
    color: var(--body);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 8px;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}
.main-nav a:hover { color: var(--crimson); background: var(--crimson-lt); text-decoration: none; }
.main-nav a.active { color: var(--crimson); }
.main-nav a.active::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 2px;
    height: 2px;
    background: var(--crimson);
    border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------- language switcher */
.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;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px 0 10px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #fff;
    transition: border-color .15s ease;
}
.lang-switch:hover,
.lang-switch:focus-within { border-color: var(--crimson); }

.lang-switch-icon { display: inline-flex; color: var(--muted); flex: none; }
.lang-switch:hover .lang-switch-icon,
.lang-switch:focus-within .lang-switch-icon { color: var(--crimson); }

.lang-select {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 8px 26px 8px 2px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--body);
    cursor: pointer;
    line-height: 1.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237b869c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
}
.lang-select:focus { outline: none; }
.lang-select:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; border-radius: 4px; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: var(--navy);
    margin-left: auto;
}

/* -------------------------------------------------------------- hero */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 88% -12%, #fff3f6 0%, transparent 62%),
        radial-gradient(760px 420px at -6% 8%, #fff8ec 0%, transparent 58%),
        #fff;
    padding: 56px 0 84px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: 52px;
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 5.6vw, 4.5rem);
    line-height: .96;
    letter-spacing: .008em;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.hero-title span {
    display: block;
    background: linear-gradient(96deg, var(--crimson) 0%, #f0533d 48%, var(--orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-zh {
    font-family: var(--font-zh);
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    font-weight: 900;
    color: var(--ink);
    margin: 0 0 14px;
    letter-spacing: .05em;
}

.hero-tagline {
    font-size: 1.03rem;
    color: var(--body);
    margin-bottom: 30px;
    max-width: 42ch;
}

.hero-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.play-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
}
.play-link:hover { text-decoration: none; color: var(--crimson); }
.play-circle {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2px solid var(--crimson);
    color: var(--crimson);
    display: grid;
    place-items: center;
    transition: background .16s ease, color .16s ease;
    flex: none;
}
.play-link:hover .play-circle { background: var(--crimson); color: #fff; }

/* hero artwork ---------------------------------------------------------- */
.hero-art { position: relative; }
.hero-art-frame {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    /* Matches banner.png (1774x887). Change this if you swap in artwork
       with a different shape, so the image isn't cropped. */
    aspect-ratio: 2 / 1;
    background: linear-gradient(135deg, #fde8ef, #fdf0e2);
}
.hero-art-frame img { width: 100%; height: 100%; object-fit: cover; }

/* decorative swoosh behind the photo */
.hero-swoosh {
    position: absolute;
    inset: auto -6% -14% -12%;
    height: 62%;
    background: linear-gradient(96deg, var(--crimson), var(--orange), var(--gold));
    border-radius: 50% 50% 44% 56% / 100% 100% 0 0;
    opacity: .13;
    z-index: -1;
}

/* news ticker ----------------------------------------------------------- */
.news-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 999px;
    padding: 14px 26px;
    box-shadow: var(--shadow);
    margin-top: -34px;
    position: relative;
    z-index: 5;
    flex-wrap: wrap;
}
.news-bar .megaphone {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--crimson-lt);
    color: var(--crimson);
    display: grid; place-items: center;
    flex: none;
}
.news-label { color: var(--crimson); font-weight: 800; font-size: .88rem; white-space: nowrap; }
.news-text {
    color: var(--body);
    font-size: .92rem;
    flex: 1;
    min-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--crimson); font-weight: 700; font-size: .88rem;
    white-space: nowrap;
}

/* ---------------------------------------------------- feature news cards */
.feature-cards { margin-top: 44px; }

.fcard {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}
.fcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.fcard-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.fcard-media img { width: 100%; height: 100%; object-fit: cover; }

/* numbered corner flag */
.fcard-num {
    position: absolute;
    top: 0; left: 0;
    width: 74px; height: 74px;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    display: grid;
    place-items: start;
    padding: 9px 0 0 12px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    z-index: 2;
}
.fcard-1 .fcard-num { background: var(--crimson); }
.fcard-2 .fcard-num { background: var(--orange); }
.fcard-3 .fcard-num { background: var(--gold); color: #4a3400; }

.fcard-icon {
    position: absolute;
    left: 22px; bottom: -26px;
    width: 54px; height: 54px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    box-shadow: var(--shadow);
    z-index: 3;
}
.fcard-1 .fcard-icon { background: var(--crimson); }
.fcard-2 .fcard-icon { background: var(--orange); }
.fcard-3 .fcard-icon { background: var(--gold); color: #4a3400; }

.fcard-body { padding: 40px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.fcard-title-zh {
    font-family: var(--font-zh);
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 3px;
    line-height: 1.4;
}
.fcard-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.fcard-sub { font-size: .9rem; color: var(--muted); margin-bottom: 18px; flex: 1; }
.fcard .btn { align-self: stretch; justify-content: center; }

/* ------------------------------------------------------- why / enrollment */
.why-panel {
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dk) 100%);
    border-radius: var(--radius-lg);
    padding: 38px 34px;
    color: #cfdbf0;
    position: relative;
    overflow: hidden;
}
.why-panel h2 {
    color: var(--gold);
    font-size: 1.6rem;
    margin-bottom: 26px;
    font-weight: 800;
}
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-item { text-align: center; }
.why-item .why-icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    display: grid; place-items: center;
}
.why-item h3 {
    color: #fff;
    font-size: .93rem;
    margin-bottom: 6px;
    font-weight: 700;
    line-height: 1.35;
}
.why-item p { font-size: .78rem; color: #a9bcda; margin: 0; line-height: 1.5; }

.enroll-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 38px 34px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.enroll-year {
    font-family: var(--font-display);
    font-size: 2.1rem;
    color: var(--orange);
    line-height: 1;
    letter-spacing: .01em;
}
.enroll-head {
    font-family: var(--font-display);
    font-size: 1.95rem;
    color: var(--navy);
    line-height: 1.1;
    margin: 4px 0 2px;
}
.enroll-script {
    font-family: var(--font-script);
    font-size: 2.1rem;
    color: var(--crimson);
    line-height: 1;
    margin-bottom: 22px;
}
.enroll-art {
    position: absolute;
    right: -10px; bottom: -10px;
    width: 44%;
    max-width: 230px;
    opacity: .95;
    pointer-events: none;
}
.enroll-panel .btn { align-self: flex-start; }

/* ------------------------------------------------------------- about */
.about-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}
.about-seal { width: 138px; }
.about-copy h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 12px; }
.about-copy p { font-size: .93rem; line-height: 1.75; }

.stats-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.stat { text-align: center; padding: 0 6px; position: relative; }
.stat + .stat::before {
    content: '';
    position: absolute;
    left: -5px; top: 12%; bottom: 12%;
    width: 1px;
    background: var(--line);
}
.stat-icon { margin: 0 auto 8px; width: 42px; height: 42px; display: grid; place-items: center; }
.stat-num { font-size: 1.45rem; font-weight: 800; color: var(--crimson); line-height: 1.1; }
.stat-title { font-size: .88rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.stat-sub { font-size: .74rem; color: var(--muted); line-height: 1.35; }

/* ------------------------------------------------- designed event tiles */
.event-tile {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    line-height: 0;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
}
.event-tile img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .35s ease, filter .22s ease;
}

/* Lift, warm glow, and a slow push-in on the artwork. */
.event-tile:hover,
.event-tile:focus-visible {
    transform: translateY(-6px);
    text-decoration: none;
    box-shadow:
        0 0 0 2px rgba(232, 23, 93, .5),
        0 10px 28px rgba(232, 23, 93, .34),
        0 18px 50px rgba(232, 23, 93, .2);
}
.event-tile:hover img,
.event-tile:focus-visible img {
    transform: scale(1.04);
    filter: saturate(1.08) brightness(1.02);
}

@media (prefers-reduced-motion: reduce) {
    .event-tile,
    .event-tile img { transition: none; }
    .event-tile:hover { transform: none; }
    .event-tile:hover img { transform: none; }
}

/* ------------------------------------------------------------- ralphs */
.ralphs {
    background: linear-gradient(100deg, #fdeef3 0%, #fdf3ee 100%);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}
.ralphs-logo {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2rem;
    color: var(--crimson-dk);
    flex: none;
    letter-spacing: -.02em;
}
.ralphs-copy { flex: 1; min-width: 260px; font-size: .88rem; }
.ralphs-copy strong { color: var(--ink); display: block; margin-bottom: 3px; }

/* ------------------------------------------------------------- footer */
.site-footer {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dk) 100%);
    color: #b9c8e2;
    padding: 54px 0 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 34px;
    padding-bottom: 34px;
}
.footer-brand-zh {
    font-family: var(--font-zh);
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: .04em;
}
.site-footer h4 {
    color: #fff;
    font-size: .97rem;
    margin-bottom: 14px;
    font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b9c8e2; font-size: .89rem; }
.site-footer a:hover { color: #fff; text-decoration: none; }

.footer-contact li {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: .89rem;
    line-height: 1.5;
}
.footer-contact svg { flex: none; margin-top: 3px; color: var(--gold); }

.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: grid; place-items: center;
    color: #fff;
    transition: background .16s ease;
}
.social-row a:hover { background: var(--crimson); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: .82rem;
}
.footer-bottom a { margin-left: 18px; }

/* ------------------------------------------------------- page headers */
.page-head {
    background:
        radial-gradient(900px 300px at 80% -40%, #fff1f5 0%, transparent 60%),
        var(--bg-soft);
    padding: 46px 0 40px;
    border-bottom: 1px solid var(--line-soft);
}
.page-head h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.9rem);
    text-transform: uppercase;
    background: linear-gradient(96deg, var(--crimson), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
}
.page-head p { margin: 0; color: var(--body); }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--crimson); }

/* --------------------------------------------------------- news list */
.news-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    transition: box-shadow .18s ease, transform .18s ease;
}
.news-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.news-date {
    background: linear-gradient(150deg, var(--crimson), var(--orange));
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    align-self: start;
}
.news-date .d { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.news-date .m { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.news-date .y { font-size: .72rem; opacity: .85; }

.news-item h3 { font-size: 1.12rem; margin-bottom: 5px; }
.news-item h3 a { color: var(--ink); }
.news-item h3 a:hover { color: var(--crimson); text-decoration: none; }

.tag {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: var(--crimson-lt);
    color: var(--crimson-dk);
}
.tag-orange { background: var(--orange-lt); color: #b45309; }
.tag-gold   { background: var(--gold-lt);   color: #8a6200; }
.tag-navy   { background: var(--navy-lt);   color: var(--navy); }
.tag-green  { background: var(--green-lt);  color: #1c6e49; }

/* ---------------------------------------------------------- calendar */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.cal-head h2 { margin: 0; font-size: 1.5rem; color: var(--navy); }
.cal-nav { display: flex; gap: 8px; }

.calendar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 10px 4px;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cal-cell {
    min-height: 108px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    padding: 7px;
    background: #fff;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.empty { background: var(--bg-soft); }
.cal-cell.today { background: #fffdf3; box-shadow: inset 0 0 0 2px var(--gold); }
.cal-daynum { font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.cal-cell.today .cal-daynum { color: var(--orange); }

.cal-event {
    display: block;
    font-size: .71rem;
    line-height: 1.28;
    padding: 3px 6px;
    border-radius: 5px;
    margin-bottom: 3px;
    font-weight: 600;
    border-left: 3px solid;
    text-decoration: none;
}
.cal-event:hover { text-decoration: none; filter: brightness(.96); }
.ev-crimson { background: var(--crimson-lt); color: var(--crimson-dk); border-color: var(--crimson); }
.ev-orange  { background: var(--orange-lt);  color: #b45309;          border-color: var(--orange); }
.ev-gold    { background: var(--gold-lt);    color: #8a6200;          border-color: var(--gold); }
.ev-blue    { background: var(--navy-lt);    color: var(--navy);      border-color: var(--navy); }
.ev-green   { background: var(--green-lt);   color: #1c6e49;          border-color: var(--green); }

.event-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
    align-items: start;
}
.event-row:last-child { border-bottom: 0; }
.event-date-box {
    text-align: center;
    background: var(--navy-lt);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    color: var(--navy);
}
.event-date-box .d { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.event-date-box .m { font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; }
.event-row h3 { font-size: 1.02rem; margin-bottom: 3px; }
.event-meta { font-size: .84rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------- cards */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-pad-lg { padding: 32px; }

.prose { max-width: 72ch; }
.prose p { line-height: 1.8; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; color: var(--navy); }
.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }

/* --------------------------------------------------------------- forms */
/* Form primitives live here, not in portal.css, because the public contact
   page uses them too. portal.css is loaded after this and only adds the
   portal-specific extras (the file drop zone). */
.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-size: .87rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 7px;
}
.field label .muted { font-weight: 500; }
.field .hint { font-size: .79rem; color: var(--muted); margin: 6px 0 0; font-weight: 400; }

.input, .select, .textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: .95rem;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #a8b1c2; }

.input:hover, .select:hover, .textarea:hover { border-color: #cdd5e2; }

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--crimson);
    box-shadow: 0 0 0 3px rgba(232, 23, 93, .13);
}

.textarea { resize: vertical; min-height: 130px; line-height: 1.65; }

.select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237b869c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.field-row   { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.form-actions {
    display: flex;
    gap: 11px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
}

.check-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.check-row input[type=checkbox] {
    margin-top: 3px;
    width: 16px; height: 16px;
    accent-color: var(--crimson);
    flex: none;
}
.check-row label { margin: 0; font-weight: 500; font-size: .9rem; }

@media (max-width: 700px) {
    .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- alerts */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    border-left: 4px solid;
    margin-bottom: 18px;
    font-size: .92rem;
}
.alert-success { background: var(--green-lt);  border-color: var(--green);   color: #1c6e49; }
.alert-error   { background: var(--crimson-lt);border-color: var(--crimson); color: var(--crimson-dk); }
.alert-info    { background: var(--navy-lt);   border-color: var(--navy);    color: var(--navy); }
.alert-warn    { background: var(--gold-lt);   border-color: var(--gold);    color: #8a6200; }

/* ------------------------------------------------------------ avatars */
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    flex: none;
    line-height: 1;
    letter-spacing: .02em;
}
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar-md { width: 42px; height: 42px; font-size: .88rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.2rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 1.7rem; }

/* ------------------------------------------------------------ helpers */
.divider { height: 1px; background: var(--line); margin: 26px 0; border: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.ml-auto { margin-left: auto; }

.empty-state {
    text-align: center;
    padding: 46px 20px;
    color: var(--muted);
}
.empty-state svg { margin: 0 auto 14px; opacity: .4; }
.empty-state h3 { color: var(--body); font-size: 1.05rem; margin-bottom: 6px; }
.empty-state p { font-size: .9rem; margin: 0; }

/* --------------------------------------------------------- responsive */
/* Eight nav links, the language switcher and two buttons stop fitting
   alongside the brand at about 1260px. Collapse just the nav to the hamburger
   there — the page layout below is governed by its own breakpoints. */
@media (max-width: 1260px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--line);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 14px; }
    .main-nav a.active::after { display: none; }
    .nav-toggle { display: block; margin-left: auto; }
}

@media (max-width: 1040px) {
    .hero-grid { grid-template-columns: 1fr; gap: 38px; }
    .hero-art { order: -1; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-seal { margin: 0 auto; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 2px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--line);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 12px 14px; }
    .main-nav a.active::after { display: none; }
    .nav-toggle { display: block; }
    .header-actions .btn { padding: 10px 18px; font-size: .86rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .stats-panel { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .stat + .stat::before { display: none; }
    .section { padding: 52px 0; }
    .news-item { grid-template-columns: 74px minmax(0, 1fr); gap: 16px; }
    .cal-cell { min-height: 84px; }
    .cal-event { font-size: .62rem; }
}

@media (max-width: 560px) {
    .wrap { padding-inline: 18px; }
    .lang-switch { padding-left: 8px; gap: 3px; }
    .lang-select { padding: 7px 22px 7px 2px; font-size: .8rem; }
    .header-actions { gap: 6px; }
    .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .hero { padding: 34px 0 64px; }
    .news-bar { border-radius: var(--radius); }
    .news-text { white-space: normal; }
    .stats-panel { grid-template-columns: repeat(2, 1fr); }
    .enroll-art { display: none; }
    .event-row { grid-template-columns: 68px minmax(0, 1fr); gap: 14px; }
    .footer-bottom { flex-direction: column; }
    .footer-bottom a { margin: 0 18px 0 0; }
}

/* ------------------------------------------------------------- print */
@media print {
    .site-header, .site-footer, .btn, .nav-toggle { display: none !important; }
    body { color: #000; }
}
