@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
    font-display: swap;
    font-weight: 400;
    unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;
}
@font-face {
    font-family: "IBM Plex Sans Arabic";
    src: url("../fonts/ibm-plex-sans-arabic/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
    font-display: swap;
    font-weight: 700 900;
    unicode-range: U+0600-06FF,U+0750-077F,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF;
}
:root {
    color-scheme: light;
    --petrol: #064344;
    --ink: #092f31;
    --muted: #465d5b;
    --gold: #855720;
    --line: #dcded4;
    --ivory: #fbf8ef;
    --pale: #edf3ed;
    font-family: system-ui, sans-serif;
    color: var(--ink);
    background: var(--ivory);
}
:lang(ar) { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--petrol); text-underline-offset: .25em; }
:focus-visible { outline: 3px solid #a16a24; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.18; }
.container { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: absolute; top: .75rem; inset-inline-start: .75rem; z-index: 3; padding: .6rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .65rem; }
.wordmark { display: flex; align-items: center; gap: .55rem; font-weight: 800; text-decoration: none; }
.wordmark img { width: 69px; }
nav, .header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1.15rem; }
nav a, .language { text-decoration: none; }
nav a:hover, nav a[aria-current], .language:hover { text-decoration: underline; }
nav a, .language { display: inline-flex; align-items: center; min-height: 44px; }
.language { font-weight: 700; }
.mobile-navigation { display: none; }
.hero { background: var(--ivory); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.6rem, 4.5vw, 4rem); align-items: center; padding-block: clamp(2.6rem, 7vw, 6.5rem); }
.eyebrow { color: var(--gold); font-weight: 750; line-height: 1.6; }
h1 { font-size: clamp(2.65rem, 6vw, 5.65rem); letter-spacing: -.045em; }
h1:lang(ar) { letter-spacing: normal; }
.hero h1 { margin-block: .6rem 1rem; }
.lead { max-width: 41rem; color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.17rem); line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .62rem 1.1rem; border: 1px solid var(--petrol); border-radius: .55rem; font: inherit; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; }
.button-small { padding: .45rem .7rem; white-space: nowrap; }
.button-primary { color: white; background: var(--petrol); }
.button-primary:hover { background: var(--ink); }
.button-outline { color: var(--petrol); background: transparent; }
.button-outline:hover { background: #e4ede5; }
.hero-image { border: 1px solid #b69663; padding: .45rem; background: #fffaf0; border-radius: 1rem; box-shadow: 0 18px 42px #173e3424; }
.hero-image img { width: 100%; aspect-ratio: 1.32; object-fit: cover; object-position: 50% 55%; border-radius: .67rem; }
.site-footer { background: var(--ink); color: white; }
.site-footer a { color: white; }
.footer-inner { align-items: flex-start; padding-block: 2rem; }
.footer-inner p { margin-top: .3rem; color: #d2e4dc; }
.footer-inner nav { max-width: 43rem; }

@media (max-width: 1040px) {
    .desktop-navigation { display: none; }
    .header-inner { flex-wrap: wrap; }
    .mobile-navigation { display: block; width: 100%; border-top: 1px solid var(--line); }
    .mobile-navigation summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 700; }
}
@media (max-width: 760px) {
    .container { width: calc(100% - 2rem); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image img { aspect-ratio: 16 / 9; }
    .footer-inner { flex-direction: column; }
}
@media (max-width: 410px) {
    .header-inner { gap: .2rem .55rem; }
    .wordmark { font-size: .88rem; }
    .wordmark img { width: 48px; }
    .header-actions { gap: .45rem; font-size: .85rem; }
}

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section h2 { font-size: clamp(1.65rem, 3vw, 2.6rem); }
.section h3, .card h2 { font-size: 1.28rem; }
.section h1 + .lead, .section h2 + .lead { margin-top: .7rem; }
.section-tinted { background: var(--pale); }
.section-dark { background: var(--petrol); color: white; }
.section-dark .lead { color: #e2eee8; }
.section-dark .button { margin-top: 1.2rem; background: var(--ivory); color: var(--petrol); }
.section-dark .button:hover { background: white; }
.section-dark :focus-visible, .site-footer :focus-visible { outline-color: #f3cf86; }
.stats { background: var(--ink); color: #fff; }
.stats-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem clamp(2rem, 8vw, 8rem); padding-block: 1.5rem; }
.stats h2 { font-size: 1.2rem; }
.stats dl { display: flex; flex-wrap: wrap; gap: 1rem clamp(1.3rem, 5vw, 5rem); margin: 0; }
.stats dl div { display: flex; flex-direction: column; }
.stats dt { color: #e2eee8; }
.stats dd { margin: 0; font-size: 2rem; font-weight: 800; color: #f1cd91; }
.card-grid, .study-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card-grid { margin-block: 1.25rem 0; padding: 0; }
.study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.level-grid, .link-grid, .books { list-style: none; }
.card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: .8rem;
    background: white;
    padding: clamp(.95rem, 3vw, 1.6rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.card h2, .card h3 { margin-block: .2rem .55rem; }
.card p, .card blockquote { color: var(--muted); }
.card blockquote { margin: 0; }
.card .eyebrow { color: var(--gold); }
.card.empty { grid-column: 1 / -1; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.level-code { display: inline-block; border-radius: .35rem; padding: .1rem .55rem; margin-bottom: .45rem; background: var(--pale); color: var(--petrol); font-weight: 800; }
.level-english { unicode-bidi: isolate; }
.books { display: grid; gap: .65rem; padding: .85rem 0 0; margin: 0; }
.books li { border-top: 1px solid var(--line); padding-top: .55rem; }
.books img { width: 100%; height: auto; max-height: 12rem; object-fit: contain; object-position: center; margin-bottom: .35rem; }
.course-facts { display: grid; gap: .35rem; margin: .7rem 0; }
.course-facts div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; }
.course-facts dt { color: var(--muted); }
.course-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.section-note { margin-top: 1rem; }
.listing h1 { font-size: clamp(2.2rem, 5vw, 4.45rem); }
.listing .eyebrow { margin-top: .35rem; }
.detail-card, .inquiry-form { width: min(100%, 37rem); margin-top: 1.4rem; }
.detail-card .button { margin-top: .7rem; }
.faq-list { display: grid; gap: .65rem; margin-top: 1rem; max-width: 55rem; }
.faq-list .card { padding-block: .2rem; }
.faq-list summary { cursor: pointer; min-height: 44px; align-content: center; font-weight: 700; }
.faq-list details p { padding-block: .25rem .65rem; }
.entry-image { width: 100%; aspect-ratio: 7 / 5; object-fit: contain; background: var(--pale); border-radius: .4rem; margin-bottom: .8rem; }
.preserve-lines { white-space: pre-line; }
.inquiry-form, .form-field { display: grid; gap: .85rem; }
.form-field { gap: .25rem; }
.form-field label { font-weight: 700; }
.form-field input, .form-field textarea { width: 100%; min-height: 46px; border: 1px solid #718781; border-radius: .35rem; background: white; color: var(--ink); font: inherit; padding: .5rem; }
.inquiry-form button { justify-self: start; }
.form-field [aria-invalid=true] { border-color: #a32b22; }
.card .field-error { color: #96291f; }
.notice { border-inline-start: .3rem solid var(--petrol); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 760px) {
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .study-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .card-grid { grid-template-columns: 1fr; }
    .level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 350px) {
    .header-actions { justify-content: space-between; width: 100%; }
    .level-grid { grid-template-columns: 1fr; }
}
