:root {
    --navy: var(--c-primary-800);
    --gold: var(--c-accent-500);
}

body { font-family: var(--font-display, 'Plus Jakarta Sans'), sans-serif; }

.topbar { background: linear-gradient(90deg, var(--c-primary-900), var(--c-primary-700)); }

.nav-link { color: #1e293b; }
.nav-link:hover, .nav-link.active { color: var(--c-primary-800); background: #f1f5f9; }

.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--c-primary-900) 0%, var(--c-primary-600) 60%, var(--c-highlight-500) 140%);
}

.input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
}

.input:focus {
    outline: 2px solid var(--c-highlight-500);
    border-color: transparent;
}

.label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.35rem; color: #334155; }

.btn-primary {
    background: var(--c-primary-800, #0B1F3A);
    color: #fff;
    font-weight: 800;
    border-radius: 0.9rem;
    padding: 0.7rem 1.1rem;
}

.btn-ghost {
    background: #fff;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    border-radius: 0.9rem;
    padding: 0.7rem 1.1rem;
}

.alert-success, .alert-error {
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success { background: #ecfdf5; color: #047857; }
.alert-error { background: #fef2f2; color: #b91c1c; }

.card-hover { transition: transform .25s ease, box-shadow .25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11, 31, 58, .12); }

.page-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -40% auto;
    width: 18rem;
    height: 18rem;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(240, 193, 75, .18), transparent 70%);
    pointer-events: none;
}

.hero-slide { transition: opacity .7s ease; color: #fff; }
.hero-slide h1 { color: #fff; }
.hero-slide p { color: #e2e8f0; }

.prose-school p { margin-bottom: 1rem; }
.prose-school img {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
    background: #e2e8f0;
}

.fit-media,
.fit-card,
.fit-hero,
.fit-wide {
    display: block;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}
.fit-media { aspect-ratio: 16 / 9; height: auto; }
.fit-card { aspect-ratio: 16 / 10; height: auto; }
.fit-hero { aspect-ratio: 16 / 9; height: auto; }
.fit-wide { aspect-ratio: 2 / 1; height: auto; }
.fit-portrait {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
}
.fit-avatar {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
}
.fit-fill,
.fit-contain {
    display: block;
    width: 100%;
    height: 100%;
    object-position: center;
}
.fit-fill { object-fit: cover; }
.fit-contain { object-fit: contain; }

img.fit-media,
img.fit-card,
img.fit-hero,
img.fit-wide,
img.fit-portrait,
img.fit-fill {
    object-fit: cover !important;
    object-position: center !important;
}

.media-box {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    background: #e2e8f0;
}
.media-box--card { aspect-ratio: 16 / 10; }
.media-box--media { aspect-ratio: 16 / 9; }
.media-box--hero { aspect-ratio: 16 / 9; }
.media-box--wide { aspect-ratio: 2 / 1; }
button.media-box,
a.media-box {
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    background: #e2e8f0;
}
.media-box img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

.admin-media {
    width: 7.5rem;
    aspect-ratio: 1;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.admin-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.admin-media.is-contain { background: #fff; }
.admin-media.is-contain img { object-fit: contain; padding: 4px; }

.admin-cover {
    position: relative;
    width: 100%;
    min-height: 180px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e2e8f0;
}
.admin-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-slide .bg-cover {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.ql-editor { min-height: 220px; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(7, 22, 39, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4rem;
}
.lightbox.hidden { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox-caption { position: absolute; bottom: 1.2rem; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; }
.lightbox-close {
    position: absolute; top: 1rem; right: 1.2rem; color: #fff; font-size: 2.4rem; line-height: 1;
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 1.4rem; background: rgba(255,255,255,.12);
    width: 3rem; height: 3rem; border-radius: 999px;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-thumb { cursor: zoom-in; }

.lang-switch { position: relative; }
.lang-switch button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: .25rem .7rem;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 700;
}
.lang-switch-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .4rem);
    min-width: 220px;
    background: #fff;
    color: #0f172a;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(7, 22, 39, .18);
    padding: .4rem;
    z-index: 70;
}
.lang-switch-menu a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    border-radius: .75rem;
    font-weight: 700;
    font-size: .85rem;
}
.lang-switch-menu a:hover,
.lang-switch-menu a.active { background: #f1f5f9; }
html[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }
html[dir="rtl"] body { font-family: 'Noto Naskh Arabic', 'Plus Jakarta Sans', sans-serif; }
html.locale-zh body { font-family: 'Noto Sans SC', 'Plus Jakarta Sans', sans-serif; }
html.locale-ko body { font-family: 'Noto Sans KR', 'Plus Jakarta Sans', sans-serif; }

#google_translate_element,
.goog-te-banner-frame,
.skiptranslate iframe.skiptranslate,
body > .skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { font-size: 0 !important; }
font { background: transparent !important; box-shadow: none !important; }

.translate-badge {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    background: var(--c-primary-800);
    color: var(--c-accent-400);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: .45rem .7rem;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(7, 22, 39, .25);
}
html[dir="rtl"] .translate-badge { right: auto; left: 1rem; }

.admin-nav-label {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 14px 8px 6px;
    font-weight: 800;
}
