:root {
  --fts-navy: #2f347f;
  --fts-navy-deep: #171d57;
  --fts-navy-soft: #454b9c;
  --fts-orange: #f04b23;
  --fts-orange-2: #ff6a2f;
  --fts-yellow: #ffd42a;
  --fts-ink: #202448;
  --fts-text: #555a78;
  --fts-muted: #7f849d;
  --fts-surface: #ffffff;
  --fts-surface-soft: #f7f8fb;
  --fts-border: #e7e9f2;
  --fts-shadow: 0 20px 60px rgba(33, 38, 92, 0.12);
  --fts-shadow-sm: 0 12px 30px rgba(33, 38, 92, 0.1);
  --fts-radius: 28px;
  --fts-radius-sm: 18px;
  --fts-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  color: var(--fts-text);
  background: #fff;
  line-height: 1.8;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 32px), var(--fts-container)); margin-inline: auto; }
.section { padding: 92px 0; position: relative; }
.section-soft { background: var(--fts-surface-soft); }
.section-dark { background: linear-gradient(135deg, var(--fts-navy-deep), var(--fts-navy)); color: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--fts-orange);
  font-weight: 800; font-size: 14px; margin-bottom: 8px;
}
.section-title { margin: 0; color: var(--fts-navy); font-size: clamp(30px, 4vw, 48px); line-height: 1.35; font-weight: 800; }
.section-title .accent { color: var(--fts-orange); }
.section-subtitle { margin: 16px auto 0; color: var(--fts-muted); font-size: 17px; max-width: 720px; }
.section-dark .section-title, .section-dark .section-subtitle { color: #fff; }
.section-dark .section-subtitle { opacity: .82; }

.btn {
  min-height: 48px; padding: 11px 22px; border-radius: 12px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 800; transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--fts-orange-2), var(--fts-orange)); box-shadow: 0 10px 26px rgba(240, 75, 35, .25); }
.btn-register { color: var(--fts-navy-deep); background: linear-gradient(135deg, #ffe56f, var(--fts-yellow), #ff6931); box-shadow: 0 10px 28px rgba(255, 174, 38, .28); }
.btn-outline { color: var(--fts-navy); border-color: rgba(47,52,127,.35); background: transparent; }
.btn-outline:hover { background: rgba(47,52,127,.06); }
.btn-light { color: var(--fts-navy); background: #fff; }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }

/* top bar + header */
.topbar { background: #fff; border-bottom: 1px solid var(--fts-border); font-size: 13px; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar-contact, .topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.topbar a { color: var(--fts-navy); display: inline-flex; align-items: center; gap: 7px; }
.topbar a:hover { color: var(--fts-orange); }
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(47,52,127,.97);
  backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(14,18,56,.12);
}
.nav-shell { min-height: 70px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; flex-shrink: 0; }
.brand img { width: 50px; height: 50px; object-fit: contain; border-radius: 50%; background: #fff; padding: 3px; }
.brand-copy { line-height: 1.25; }
.brand-copy strong { display: block; font-size: 14px; }
.brand-copy span { display: block; font-size: 10px; opacity: .72; letter-spacing: .6px; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 3px; margin: 0; padding: 0; }
.main-nav a { display: inline-flex; align-items: center; min-height: 42px; padding: 7px 11px; color: rgba(255,255,255,.86); font-weight: 700; font-size: 14px; border-radius: 10px; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-actions .btn { min-height: 40px; padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.lang-link { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); }
.mobile-toggle { display: none; border: 0; background: transparent; color: #fff; font-size: 28px; padding: 5px; }

/* hero */
.hero { min-height: 660px; position: relative; overflow: hidden; background: #f5f5f7; display: grid; place-items: end center; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 56%;
  background: linear-gradient(180deg, rgba(47,52,127,.16), rgba(47,52,127,0)); pointer-events: none;
}
.hero-building { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: saturate(.98) contrast(1.02); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,20,62,.08), rgba(16,20,62,.02) 45%, rgba(16,20,62,.28)); }
.hero-content { position: relative; width: min(calc(100% - 32px), var(--fts-container)); padding: 0 0 54px; display: flex; justify-content: flex-start; }
.hero-card { width: min(600px, 100%); padding: 32px 36px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.7); border-radius: 26px; box-shadow: 0 24px 70px rgba(22,29,76,.2); backdrop-filter: blur(8px); }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; color: var(--fts-navy); background: #eef0ff; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13px; }
.hero h1 { margin: 16px 0 12px; color: var(--fts-navy); font-size: clamp(34px, 5vw, 58px); line-height: 1.25; font-weight: 800; }
.hero h1 .accent { color: var(--fts-orange); }
.hero p { margin: 0; font-size: 17px; color: #5d617b; max-width: 640px; }
.hero-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }

/* home about */
.about-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.about-visual { position: relative; padding-bottom: 32px; }
.about-visual img { width: 100%; aspect-ratio: 1.35; object-fit: cover; border-radius: var(--fts-radius); box-shadow: var(--fts-shadow); }
.experience-card { position: absolute; inset-inline-start: 34px; bottom: 0; background: linear-gradient(135deg, var(--fts-orange-2), var(--fts-orange)); color: #fff; padding: 14px 28px; border-radius: 16px; box-shadow: 0 16px 35px rgba(240,75,35,.25); text-align: center; }
.experience-card strong { display: block; font-size: 34px; line-height: 1.1; }
.about-copy h2 { color: var(--fts-navy); margin: 0 0 16px; font-size: clamp(32px, 4vw, 48px); line-height: 1.35; }
.about-copy p { margin: 0 0 16px; }
.about-bullets { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.about-bullets div { display: flex; gap: 9px; align-items: flex-start; color: var(--fts-ink); font-weight: 700; }
.about-bullets i { color: var(--fts-orange); font-size: 19px; margin-top: 5px; }

.stats-grid { margin-top: 58px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card { background: #fff; border: 1px solid var(--fts-border); border-radius: 18px; min-height: 112px; padding: 22px; display: flex; align-items: center; gap: 16px; box-shadow: var(--fts-shadow-sm); }
.stat-icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; background: #fff1ec; color: var(--fts-orange); border-radius: 14px; font-size: 24px; }
.stat-card strong { color: var(--fts-navy); font-size: 32px; line-height: 1; }
.stat-card span { display: block; color: var(--fts-muted); font-size: 14px; margin-top: 4px; }

/* stages */
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stage-card { position: relative; background: #fff; border: 1px solid var(--fts-border); border-radius: 24px; overflow: hidden; box-shadow: var(--fts-shadow-sm); transition: transform .3s ease, box-shadow .3s ease; }
.stage-card:hover { transform: translateY(-7px); box-shadow: var(--fts-shadow); }
.stage-visual { height: 350px; padding: 22px 22px 0; background: linear-gradient(180deg, #eef0ff, #f7f8fc); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.stage-visual img { height: 100%; width: auto; object-fit: contain; object-position: bottom; }
.stage-visual img.secondary-student { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.stage-body { padding: 24px; text-align: center; }
.stage-body h3 { color: var(--fts-navy); margin: 0 0 10px; font-size: 23px; }
.stage-body p { font-size: 14px; margin: 0 0 16px; color: var(--fts-text); }
.stage-link { color: var(--fts-orange); font-weight: 800; display: inline-flex; gap: 7px; align-items: center; }

/* why us */
.why-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.why-card { text-align: center; padding: 12px 8px; }
.why-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--fts-orange); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; font-size: 30px; box-shadow: 0 13px 28px rgba(240,75,35,.22); }
.why-card h3 { margin: 0 0 8px; color: var(--fts-orange); font-size: 17px; }
.why-card p { margin: 0; font-size: 13px; color: var(--fts-text); }

/* Category B */
.category-card { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: 30px; background: var(--fts-navy); box-shadow: var(--fts-shadow); }
.category-media { min-height: 440px; position: relative; background: linear-gradient(180deg,#f7f7fa,#efeff5); display: grid; place-items: end center; overflow: hidden; }
.category-media img { width: 100%; height: 100%; object-fit: cover; }
.category-content { padding: 50px; color: #fff; align-self: center; }
.category-content .tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 800; }
.category-content h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.3; margin: 14px 0; }
.category-content p { color: rgba(255,255,255,.83); }
.level-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 26px; }
.level-chips span { padding: 7px 11px; border-radius: 10px; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.12); font-size: 13px; }

/* portals */
.portal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.portal-card { padding: 34px; border-radius: 26px; background: #fff; border: 1px solid var(--fts-border); box-shadow: var(--fts-shadow-sm); display: flex; flex-direction: column; min-height: 410px; }
.portal-card .portal-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 16px; background: #fff0eb; color: var(--fts-orange); font-size: 28px; }
.portal-card h3 { color: var(--fts-navy); font-size: 27px; margin: 18px 0 8px; }
.portal-card p { margin: 0 0 12px; color: var(--fts-muted); }
.portal-list { margin: 12px 0 24px; padding: 0; list-style: none; }
.portal-list li { margin: 8px 0; display: flex; gap: 9px; align-items: flex-start; }
.portal-list i { color: var(--fts-orange); margin-top: 5px; }
.portal-card .btn { margin-top: auto; }

/* CTA */
.cta-box { position: relative; overflow: hidden; background: linear-gradient(110deg, #303583, #252a72); color: #fff; border-radius: 28px; padding: 48px; display: flex; justify-content: space-between; gap: 30px; align-items: center; box-shadow: 0 24px 60px rgba(36,42,113,.24); }
.cta-box::after { content: ""; position: absolute; width: 280px; height: 280px; border: 70px solid rgba(255,255,255,.045); border-radius: 50%; inset-inline-end: -80px; top: -120px; }
.cta-copy { position: relative; z-index: 1; }
.cta-copy h2 { margin: 0 0 8px; font-size: clamp(28px,4vw,42px); }
.cta-copy p { margin: 0; opacity: .8; }
.cta-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* News / announcements */
.news-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 20px; }
.news-card { min-height: 240px; border-radius: 22px; padding: 26px; background: linear-gradient(135deg, #fff, #f7f8ff); border: 1px solid var(--fts-border); box-shadow: var(--fts-shadow-sm); display: flex; flex-direction: column; }
.news-card.featured { background: linear-gradient(135deg, var(--fts-navy), var(--fts-navy-deep)); color: #fff; }
.news-card .pill { align-self: flex-start; font-size: 12px; font-weight: 800; color: var(--fts-orange); background: #fff0eb; padding: 4px 10px; border-radius: 999px; }
.news-card.featured .pill { background: rgba(255,255,255,.13); color: #fff; }
.news-card h3 { margin: auto 0 10px; font-size: 24px; color: var(--fts-navy); line-height: 1.45; }
.news-card.featured h3 { color: #fff; font-size: 30px; }
.news-card p { margin: 0 0 18px; font-size: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 28px; }
.contact-panel, .contact-form { background: #fff; border-radius: 26px; border: 1px solid var(--fts-border); box-shadow: var(--fts-shadow-sm); padding: 34px; }
.contact-panel h3, .contact-form h3 { color: var(--fts-navy); margin: 0 0 10px; font-size: 27px; }
.contact-items { display: grid; gap: 14px; margin: 24px 0; }
.contact-item { display: flex; gap: 13px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #f8f9fc; }
.contact-item i { color: var(--fts-orange); font-size: 21px; margin-top: 4px; }
.contact-item strong { display: block; color: var(--fts-ink); }
.contact-item span, .contact-item a { font-size: 14px; color: var(--fts-muted); }
.contact-item a:hover { color: var(--fts-orange); }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { color: var(--fts-ink); font-size: 13px; font-weight: 800; }
.field input, .field textarea { width: 100%; border: 1px solid var(--fts-border); background: #f8f9fb; border-radius: 12px; padding: 12px 14px; color: var(--fts-ink); outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: rgba(47,52,127,.55); box-shadow: 0 0 0 4px rgba(47,52,127,.08); }
.contact-form > .btn { margin-top: 22px; min-width: 170px; }
.form-status { min-height: 26px; font-size: 13px; margin-top: 10px; }

/* footer */
.students-strip { height: 210px; display: flex; justify-content: center; align-items: flex-end; overflow: hidden; background: #fff; gap: clamp(0px, 3vw, 30px); }
.students-strip img { height: 205px; width: auto; object-fit: contain; object-position: bottom; }
.students-strip img.secondary-student { width: 155px; object-fit: cover; object-position: center top; }
.site-footer { background: var(--fts-navy); color: rgba(255,255,255,.82); padding: 58px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr .78fr .78fr 1.2fr; gap: 36px; }
.footer-brand { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.footer-brand img { width: 62px; height: 62px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.footer-brand strong { color: #fff; display: block; font-size: 18px; }
.footer-brand span { display: block; font-size: 11px; opacity: .7; }
.site-footer p { font-size: 13px; margin: 0; }
.site-footer h4 { margin: 0 0 14px; color: #fff; font-size: 15px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13px; }
.footer-links a:hover { color: var(--fts-yellow); }
.footer-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.footer-contact-list i { color: var(--fts-yellow); margin-top: 4px; flex: 0 0 auto; }
.footer-contact-list a:hover { color: var(--fts-yellow); }
.footer-social { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.12); font-size: 16px; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.footer-social a:hover { transform: translateY(-3px); background: #fff; border-color: #fff; }
.footer-social a.whatsapp:hover { color: #25d366; }
.footer-social a.facebook:hover { color: #1877f2; }
.footer-social a.instagram:hover { color: #e4405f; }
.footer-social a.x-social:hover { color: #111; }
.footer-social a.linkedin:hover { color: #0a66c2; }
.footer-social a.youtube:hover { color: #ff0000; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; margin-top: 36px; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; }
.footer-credit a { color: var(--fts-yellow); font-weight: 800; }
.footer-credit a:hover { color: #fff; }

/* floating contacts */
.floating-contact { position: fixed; z-index: 900; inset-inline-end: 16px; bottom: 22px; display: grid; gap: 9px; }
.floating-contact a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 9px 25px rgba(25,29,77,.18); color: var(--fts-navy); border: 1px solid rgba(47,52,127,.10); font-size: 20px; transition: transform .2s ease, box-shadow .2s ease; }
.floating-contact a:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(25,29,77,.24); }
.floating-contact a.mail-float { color: var(--fts-navy); }
.floating-contact a.register-float { background: linear-gradient(135deg, var(--fts-orange-2), var(--fts-orange)); color: #fff; border-color: transparent; }

/* internal pages */
.page-hero { background: linear-gradient(135deg, var(--fts-navy-deep), var(--fts-navy)); color: #fff; padding: 70px 0 56px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 400px; height: 400px; border: 80px solid rgba(255,255,255,.04); border-radius: 50%; inset-inline-end: -100px; top: -150px; }
.page-hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: auto; }
.page-hero .eyebrow { display: inline-flex; padding: 6px 13px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 13px; font-weight: 800; }
.page-hero h1 { font-size: clamp(34px,5vw,56px); margin: 14px 0 12px; line-height: 1.3; }
.page-hero p { margin: 0; opacity: .82; font-size: 17px; }

.stage-intro { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.stage-intro-media { background: #f4f5f8; min-height: 390px; border-radius: 28px; overflow: hidden; display: grid; place-items: end center; position: relative; }
.stage-intro-media img { width: 100%; height: 100%; object-fit: cover; }
.stage-intro-copy h2 { margin: 0 0 16px; color: var(--fts-navy); font-size: clamp(29px,4vw,44px); }
.stage-intro-copy p { margin: 0 0 16px; }
.stage-note { display: inline-flex; align-items: center; gap: 8px; background: #fff0eb; color: var(--fts-orange); font-weight: 800; padding: 7px 12px; border-radius: 999px; font-size: 13px; }

.grade-track { margin-top: 54px; position: relative; display: grid; gap: 28px; grid-template-columns: repeat(6,1fr); }
.grade-track.three { grid-template-columns: repeat(3,1fr); }
.grade-track.four { grid-template-columns: repeat(4,1fr); }
.grade-track::before { content: ""; position: absolute; left: 8%; right: 8%; top: 48px; height: 2px; background: linear-gradient(90deg, rgba(240,75,35,.28), var(--fts-orange), rgba(240,75,35,.28)); }
.grade-node { position: relative; z-index: 1; text-align: center; }
.grade-shape { width: 96px; height: 96px; margin: auto; background: linear-gradient(135deg, var(--fts-orange-2), var(--fts-orange)); color: #fff; display: grid; place-items: center; clip-path: polygon(25% 7%, 75% 7%, 100% 50%, 75% 93%, 25% 93%, 0 50%); box-shadow: 0 14px 24px rgba(240,75,35,.2); }
.grade-shape strong { font-size: 27px; line-height: 1; }
.grade-shape span { display: block; font-size: 11px; margin-top: 5px; }

.info-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 38px; }
.info-card { border-radius: 20px; border: 1px solid var(--fts-border); padding: 24px; background: #fff; }
.info-card i { color: var(--fts-orange); font-size: 28px; }
.info-card h3 { color: var(--fts-navy); margin: 12px 0 7px; font-size: 19px; }
.info-card p { margin: 0; font-size: 14px; }

.about-page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.about-value { padding: 28px; border: 1px solid var(--fts-border); border-radius: 22px; background: #fff; box-shadow: var(--fts-shadow-sm); }
.about-value i { font-size: 30px; color: var(--fts-orange); }
.about-value h3 { margin: 13px 0 8px; color: var(--fts-navy); font-size: 23px; }
.about-value p { margin: 0; font-size: 14px; }
.objectives-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.objectives-list li { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--fts-border); border-radius: 15px; padding: 15px; }
.objectives-list i { color: var(--fts-orange); margin-top: 5px; }

/* login */
.login-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: radial-gradient(circle at 50% 30%, #ff9a57 0, #f47b34 34%, #e9702d 68%, #d96325 100%); }
.login-wrap { display: grid; place-items: center; padding: 60px 16px; }
.login-card { width: min(460px, 100%); background: #fff; border-radius: 42px; overflow: hidden; box-shadow: 0 30px 70px rgba(86,37,19,.28); }
.login-brand { background: linear-gradient(135deg, #f7924c, #ed7835); padding: 32px; display: grid; place-items: center; }
.login-brand img { width: 155px; height: 155px; border-radius: 50%; background: #fff; padding: 7px; box-shadow: 0 12px 30px rgba(70,26,12,.18); }
.login-body { padding: 32px; text-align: center; }
.login-body h1 { margin: 0; color: var(--fts-orange); font-size: 30px; }
.login-body p { margin: 10px 0 24px; color: var(--fts-muted); }
.login-options { display: grid; gap: 12px; }
.login-option { display: flex; align-items: center; gap: 14px; text-align: start; padding: 15px; border: 1px solid var(--fts-border); border-radius: 15px; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.login-option:hover { border-color: rgba(240,75,35,.45); transform: translateY(-2px); background: #fff8f5; }
.login-option i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #eef0ff; color: var(--fts-navy); font-size: 22px; }
.login-option strong { color: var(--fts-ink); display: block; }
.login-option span { color: var(--fts-muted); font-size: 12px; }
.login-note { margin-top: 18px; font-size: 12px; color: var(--fts-muted); }

/* utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 3px solid rgba(255,212,42,.8); outline-offset: 3px; }

@media (max-width: 1100px) {
  .main-nav a { padding-inline: 8px; font-size: 13px; }
  .brand-copy { display: none; }
  .why-grid { grid-template-columns: repeat(3,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  .topbar-inner { justify-content: center; }
  .topbar-actions { display: none; }
  .mobile-toggle { display: block; margin-inline-start: auto; }
  .main-nav {
    position: fixed; inset: 108px 16px auto; background: #fff; border-radius: 18px; box-shadow: var(--fts-shadow);
    padding: 14px; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: .25s ease; z-index: 1001;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav ul { display: grid; gap: 3px; }
  .main-nav a { color: var(--fts-navy); display: flex; padding: 10px 12px; }
  .main-nav a:hover, .main-nav a.active { background: #f2f3fb; color: var(--fts-orange); }
  .nav-actions .btn-outline, .nav-actions .lang-link { display: none; }
  .nav-actions { order: 2; }
  .mobile-toggle { order: 3; }
  .hero { min-height: 610px; }
  .hero-building { object-position: 56% 50%; }
  .hero-card { width: min(520px, 100%); }
  .about-grid, .category-card, .stage-intro, .contact-grid { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr 1fr; }
  .stage-card:last-child { grid-column: 1/-1; width: calc(50% - 12px); justify-self: center; }
  .portal-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card.featured { grid-column: 1/-1; }
  .grade-track, .grade-track.three, .grade-track.four { grid-template-columns: repeat(3,1fr); }
  .grade-track::before { display: none; }
  .info-cards, .about-page-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .section { padding: 68px 0; }
  .topbar-contact > a[data-link="email"] { display: none; }
  .nav-shell { min-height: 64px; }
  .brand img { width: 44px; height: 44px; }
  .nav-actions .btn { padding: 8px 10px; }
  .hero { min-height: 570px; align-items: end; }
  .hero-content { padding-bottom: 24px; }
  .hero-card { padding: 24px 22px; border-radius: 20px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14px; }
  .about-grid { gap: 36px; }
  .about-bullets { grid-template-columns: 1fr; }
  .stats-grid, .stage-grid, .why-grid, .news-grid, .info-cards, .about-page-grid, .objectives-list { grid-template-columns: 1fr; }
  .stage-card:last-child { grid-column: auto; width: 100%; }
  .stage-visual { height: 310px; }
  .category-content { padding: 30px 24px; }
  .category-media { min-height: 320px; }
  .cta-box { padding: 32px 24px; flex-direction: column; align-items: flex-start; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .students-strip { height: 125px; gap: 0; }
  .students-strip img { height: 125px; max-width: 25%; object-fit: contain; }
  .students-strip img.secondary-student { width: 25%; object-fit: cover; object-position: center top; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .floating-contact { inset-inline-end: 10px; bottom: 12px; }
  .floating-contact a { width: 42px; height: 42px; }
  .grade-track, .grade-track.three, .grade-track.four { grid-template-columns: repeat(2,1fr); }
  .page-hero { padding: 56px 0 44px; }
  .stage-intro-media { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Central configuration / multi-country contact helpers */
.topbar-phone-links,
.topbar-whatsapp-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.configured-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.configured-contact-link i {
  flex: 0 0 auto;
}

.contact-country-label {
  font-weight: 800;
  color: var(--fts-navy);
  white-space: nowrap;
}

.contact-phone-number {
  direction: ltr !important;
  unicode-bidi: isolate;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.contact-number-list,
.contact-whatsapp-list,
.footer-phone-list {
  display: grid;
  gap: 5px;
}

.contact-number-list .configured-contact-link,
.contact-whatsapp-list .configured-contact-link,
.footer-phone-list .configured-contact-link {
  width: fit-content;
}

.contact-whatsapp-list .configured-contact-link,
.topbar-whatsapp-links .configured-contact-link {
  color: #25d366;
}

.contact-whatsapp-list .configured-contact-link:hover,
.topbar-whatsapp-links .configured-contact-link:hover {
  color: #128c4b;
}

.footer-phone-list .contact-country-label {
  color: rgba(255,255,255,.78);
  font-size: 12px;
}

.footer-phone-list .contact-phone-number {
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.footer-phone-list a:hover .contact-phone-number,
.footer-phone-list a:hover .contact-country-label {
  color: #fff;
}

/* Config-driven social/floating actions */
.footer-social a.is-disabled,
.floating-contact a.is-disabled {
  opacity: .5;
  cursor: default;
}
.footer-social a.is-disabled:hover,
.floating-contact a.is-disabled:hover {
  transform: none;
}

.footer-social .social-link,
.floating-contact .floating-link {
  position: relative;
  overflow: visible;
}

/* Small SY / EG marker: both buttons keep the familiar WhatsApp icon while
   the badge makes the country immediately recognizable. */
.country-code-badge {
  position: absolute;
  inset-inline-end: -5px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--fts-orange);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(22, 26, 70, .18);
  font-size: 8px;
  font-family: Arial, sans-serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .2px;
  pointer-events: none;
}

.footer-social .country-code-badge {
  border-color: var(--fts-navy-deep);
}

.floating-contact a.whatsapp { color: #25d366; }
.floating-contact a.facebook { color: #1877f2; }
.floating-contact a.instagram { color: #e4405f; }
.floating-contact a.x-social { color: #111; }
.floating-contact a.linkedin { color: #0a66c2; }
.floating-contact a.youtube { color: #ff0000; }
.floating-contact a.whatsapp:hover,
.floating-contact a.facebook:hover,
.floating-contact a.instagram:hover,
.floating-contact a.x-social:hover,
.floating-contact a.linkedin:hover,
.floating-contact a.youtube:hover {
  background: #fff;
}

@media (max-width: 680px) {
  /* Hide only the email in the compact mobile top bar; keep both country numbers. */
  .topbar-contact > a[data-link="email"] { display: none; }
  .topbar-phone-links { gap: 8px; }
  .topbar-phone-links .configured-contact-link { font-size: 11px; }
  .topbar-phone-links .contact-country-label { display: none; }
}

/* Contact layout refinement - final multi-country design */
.topbar {
  background: #fff;
  border-top: 2px solid var(--fts-navy-deep);
  border-bottom: 1px solid var(--fts-border);
  box-shadow: 0 3px 14px rgba(31, 36, 85, .04);
}
.topbar-inner {
  min-height: 54px;
  padding-block: 7px;
  gap: 14px;
}
.topbar-contact,
.topbar-actions {
  gap: 9px;
  flex-wrap: nowrap;
}
.topbar-phone-links,
.topbar-whatsapp-links {
  display: flex;
  align-items: center;
  gap: 7px;
}
.topbar-email,
.topbar-phone-links .configured-contact-link,
.topbar-actions > a[href*="#contact"],
.topbar-whatsapp-links .configured-contact-link {
  min-height: 36px;
  border: 1px solid #e9ebf4;
  border-radius: 10px;
  background: #f8f9fc;
  color: var(--fts-navy);
  padding: 6px 10px;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.topbar-email:hover,
.topbar-phone-links .configured-contact-link:hover,
.topbar-actions > a[href*="#contact"]:hover {
  border-color: rgba(240,75,35,.25);
  background: #fff7f4;
  transform: translateY(-1px);
}
.topbar-email > i,
.topbar-phone-links .configured-contact-link > i,
.topbar-actions > a[href*="#contact"] > i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fff0eb;
  color: var(--fts-orange);
  font-size: 12px;
}
.topbar-phone-links .configured-contact-link {
  display: grid;
  grid-template-columns: 24px auto auto;
  align-items: center;
  column-gap: 6px;
}
.topbar-phone-links .contact-country-label {
  color: var(--fts-navy);
  font-size: 10px;
  font-weight: 800;
}
.topbar-phone-links .contact-phone-number {
  color: #656b88;
  font: 700 11.5px/1.1 "Cairo", Tahoma, Arial, sans-serif;
  letter-spacing: .05px;
}
.topbar-whatsapp-links .configured-contact-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f2fff7;
  border-color: rgba(37,211,102,.20);
  color: #168c48;
  padding-inline: 9px;
}
.topbar-whatsapp-links .configured-contact-link:hover {
  background: #eafff2;
  border-color: rgba(37,211,102,.34);
  color: #11783d;
  transform: translateY(-1px);
}
.topbar-whatsapp-links .configured-contact-link > i {
  font-size: 15px;
}
.topbar-whatsapp-links .contact-link-label {
  display: inline;
  font-size: 10.5px;
  font-weight: 800;
}

/* Contact panel */
.contact-grid { gap: 34px; align-items: start; }
.contact-panel,
.contact-form { padding: clamp(28px, 3vw, 40px); }
.contact-panel { display: flex; flex-direction: column; }
.contact-form { align-self: start; height: auto; }
.contact-items { gap: 13px; margin: 24px 0 0; }
.contact-item {
  gap: 13px;
  padding: 16px;
  border: 1px solid #eceef5;
  border-radius: 16px;
  background: #fafbfe;
}
.contact-item > i {
  width: 40px;
  height: 40px;
  margin-top: 0;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 12px;
  background: #fff0eb;
  color: var(--fts-orange);
  font-size: 18px;
}
.contact-item > div { min-width: 0; }
.contact-item strong { margin-bottom: 4px; color: var(--fts-ink); }
.contact-item-multi { display: block; padding: 16px; }
.contact-item-multi > div { width: 100%; }
.contact-item-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid #eceef5;
}
.contact-item-heading strong { margin: 0; }
.contact-heading-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff0eb;
  color: var(--fts-orange);
  flex: 0 0 34px;
}
.contact-item-whatsapp .contact-heading-icon {
  color: #1da851;
  background: #eefbf3;
}
.contact-number-list,
.contact-whatsapp-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.contact-number-list .configured-contact-link,
.contact-whatsapp-list .configured-contact-link {
  width: 100%;
  min-height: 48px;
  display: grid;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #e8eaf2;
  border-radius: 12px;
  background: #fff;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.contact-number-list .configured-contact-link {
  grid-template-columns: 32px minmax(58px, auto) 1fr;
}
.contact-whatsapp-list .configured-contact-link {
  grid-template-columns: 32px 1fr;
}
.contact-number-list .configured-contact-link:hover,
.contact-whatsapp-list .configured-contact-link:hover {
  transform: translateY(-1px);
  border-color: rgba(240,75,35,.25);
  box-shadow: 0 7px 20px rgba(31,36,85,.06);
}
.contact-number-list .configured-contact-link > i,
.contact-whatsapp-list .configured-contact-link > i {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff0eb;
  color: var(--fts-orange);
  font-size: 15px;
}
.contact-whatsapp-list .configured-contact-link > i {
  color: #1da851;
  background: #eefbf3;
}
.contact-number-list .contact-country-label {
  color: var(--fts-navy);
  font-size: 11.5px;
  font-weight: 800;
}
.contact-number-list .contact-phone-number {
  justify-self: end;
  color: #666d8b;
  font-size: 12.5px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
[dir="rtl"] .contact-number-list .contact-phone-number { justify-self: start; }
.contact-whatsapp-list .contact-link-label {
  color: #37704e;
  font-size: 12px;
  font-weight: 800;
}
.contact-form .btn[type="submit"] { margin-top: 18px; }

/* Footer */
.site-footer { padding: 62px 0 22px; }
.footer-grid {
  grid-template-columns: 1.35fr .72fr .80fr 1.28fr;
  gap: 42px;
  align-items: start;
}
.footer-grid > div { min-width: 0; }
.footer-brand { margin-bottom: 16px; }
.site-footer h4 { margin-bottom: 17px; }
.footer-links { gap: 10px; }
.footer-contact-list { gap: 10px; }
.footer-contact-list > li:not(.footer-phone-item) {
  gap: 10px;
  align-items: flex-start;
  line-height: 1.65;
}
.footer-contact-list > li:not(.footer-phone-item) > i {
  width: 30px;
  height: 30px;
  margin-top: 0;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: var(--fts-yellow);
  font-size: 13px;
}
.footer-phone-item { display: block !important; }
.footer-phone-list { display: grid; gap: 7px; }
.footer-phone-list .configured-contact-link {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 30px minmax(48px, auto) 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  background: rgba(255,255,255,.055);
}
.footer-phone-list .configured-contact-link > i {
  width: 30px;
  height: 30px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,212,42,.12);
  color: var(--fts-yellow);
  font-size: 13px;
}
.footer-phone-list .contact-country-label {
  color: rgba(255,255,255,.92);
  font-size: 11px;
  font-weight: 800;
}
.footer-phone-list .contact-phone-number {
  justify-self: end;
  color: rgba(255,255,255,.76);
  font-size: 11.5px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}
[dir="rtl"] .footer-phone-list .contact-phone-number { justify-self: start; }
.footer-phone-list .configured-contact-link:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,212,42,.22);
}
.footer-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.footer-social a { width: 38px; height: 38px; }
.footer-bottom { margin-top: 38px; }

/* Floating rail */
.floating-contact { gap: 7px; inset-inline-end: 18px; bottom: 22px; }
.floating-contact a { width: 46px; height: 46px; }

@media (max-width: 1100px) {
  .topbar-inner { flex-wrap: wrap; justify-content: center; padding-block: 8px; }
  .topbar-contact, .topbar-actions { flex-wrap: wrap; justify-content: center; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 38px 48px; }
}
@media (max-width: 820px) {
  .topbar-email { display: none !important; }
  .topbar-inner { gap: 7px; }
  .topbar-phone-links .configured-contact-link { padding-inline: 8px; }
  .topbar-whatsapp-links .contact-link-label { display: none; }
  .topbar-whatsapp-links .configured-contact-link { width: 36px; padding: 0; justify-content: center; }
  .topbar-actions > a[href*="#contact"] { padding-inline: 9px; }
}
@media (max-width: 680px) {
  .topbar { font-size: 11px; }
  .topbar-inner { min-height: auto; padding-block: 7px; }
  .topbar-contact, .topbar-actions { width: 100%; gap: 6px; }
  .topbar-phone-links { width: 100%; justify-content: center; gap: 6px; }
  .topbar-phone-links .configured-contact-link {
    min-height: 34px;
    grid-template-columns: 22px auto;
    column-gap: 5px;
    padding: 5px 8px;
  }
  .topbar-phone-links .configured-contact-link > i { width: 22px; height: 22px; }
  .topbar-phone-links .contact-country-label { display: none; }
  .topbar-phone-links .contact-phone-number { font-size: 10px; }
  .topbar-actions { justify-content: center; }
  .contact-panel, .contact-form { padding: 24px 20px; }
  .contact-number-list .configured-contact-link {
    grid-template-columns: 32px minmax(45px, auto) 1fr;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-social { margin-top: 17px; }
  .footer-phone-list .configured-contact-link { max-width: 380px; }
  .floating-contact { inset-inline-end: 10px; bottom: 12px; }
  .floating-contact a { width: 42px; height: 42px; }
}

/* Final small-screen overrides: keep configured WhatsApp contacts visible in both languages. */
.contact-item-heading::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: var(--fts-orange);
  flex: 0 0 4px;
}
.contact-item-whatsapp .contact-item-heading::before { background: #25b45a; }
@media (max-width: 900px) {
  .topbar-actions { display: flex; }
}

/* Mobile rendering reliability and overflow protection */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.container,
.topbar-inner,
.nav-shell,
.hero-content,
.about-grid,
.stats-grid,
.stage-grid,
.why-grid,
.category-card,
.portal-grid,
.news-grid,
.contact-grid,
.footer-grid,
.stage-intro,
.grade-track,
.info-cards,
.about-page-grid,
.objectives-list {
  min-width: 0;
  max-width: 100%;
}

.about-grid > *,
.stats-grid > *,
.stage-grid > *,
.why-grid > *,
.category-card > *,
.portal-grid > *,
.news-grid > *,
.contact-grid > *,
.footer-grid > *,
.stage-intro > *,
.grade-track > *,
.info-cards > *,
.about-page-grid > *,
.objectives-list > * {
  min-width: 0;
}

@media (max-width: 900px) {
  /* AOS transforms can extend the layout outside the viewport on phones and,
     if its JavaScript is delayed or blocked, leave content at opacity: 0.
     Mobile keeps all content visible and uses the normal responsive flow. */
  html:not(.no-js) [data-aos],
  html:not(.no-js) [data-aos][data-aos],
  html:not(.no-js) [data-aos^="fade"],
  html:not(.no-js) [data-aos^="zoom"] {
    opacity: 1 !important;
    -webkit-transform: none !important;
    transform: none !important;
    transition: none !important;
  }

  .container {
    width: min(calc(100% - 24px), var(--fts-container));
  }

  .main-nav {
    max-width: calc(100vw - 24px);
    inset-inline: 12px;
  }

  .floating-contact {
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 680px) {
  .section {
    padding: 56px 0;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .section-subtitle {
    font-size: 14px;
  }

  .topbar-inner {
    display: grid;
    grid-template-columns: 1fr;
    width: min(calc(100% - 20px), var(--fts-container));
  }

  .topbar-contact,
  .topbar-actions {
    min-width: 0;
    max-width: 100%;
  }

  .topbar-phone-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .topbar-phone-links .configured-contact-link {
    width: 100%;
    min-width: 0;
    grid-template-columns: 21px minmax(0, 1fr);
    padding: 5px 6px;
  }

  .topbar-phone-links .configured-contact-link > i {
    width: 21px;
    height: 21px;
  }

  .topbar-phone-links .contact-phone-number {
    min-width: 0;
    width: 100%;
    font-size: 9.5px;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .nav-shell {
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .nav-actions {
    gap: 5px;
    min-width: 0;
  }

  .nav-actions .btn-register {
    padding-inline: 9px;
    font-size: 11px;
    white-space: nowrap;
  }

  .mobile-toggle {
    margin-inline-start: 0;
    flex: 0 0 auto;
  }

  .hero-content,
  .hero-card,
  .cta-box,
  .contact-panel,
  .contact-form,
  .portal-card,
  .stage-card,
  .news-card,
  .about-value {
    max-width: 100%;
  }

  .contact-grid {
    gap: 20px;
  }

  .contact-panel,
  .contact-form {
    padding: 22px 16px;
    border-radius: 20px;
  }

  .contact-item,
  .contact-item-multi {
    padding: 13px;
  }

  .contact-number-list .configured-contact-link {
    grid-template-columns: 30px minmax(38px, auto) minmax(0, 1fr);
    padding-inline: 8px;
  }

  .contact-whatsapp-list .configured-contact-link {
    grid-template-columns: 30px minmax(0, 1fr);
    padding-inline: 8px;
  }

  .contact-number-list .contact-phone-number {
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .contact-number-list .contact-country-label,
  .contact-whatsapp-list .contact-link-label {
    min-width: 0;
  }

  .footer-phone-list .configured-contact-link {
    grid-template-columns: 28px minmax(42px, auto) minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
  }

  .footer-phone-list .contact-phone-number {
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-bottom {
    text-align: center;
  }

  .floating-contact {
    inset-inline-end: 8px;
    bottom: 10px;
  }

  .floating-contact a {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

/* Professional bilingual navigation system (2026-08-26). */
.site-header {
  background: linear-gradient(90deg, #2b3078 0%, var(--fts-navy) 52%, #34398a 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(18,23,68,.14);
}

.nav-shell {
  min-height: 76px;
  gap: 14px;
}

.brand {
  gap: 10px;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  box-shadow: 0 5px 15px rgba(10,14,50,.16);
}

.brand-copy strong {
  font-size: 13px;
  white-space: nowrap;
}

.brand-copy span {
  font-size: 9px;
  letter-spacing: .45px;
}

.main-nav {
  flex: 1 1 auto;
  min-width: 0;
  margin-inline-start: auto;
}

.main-nav > ul {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 4px;
  gap: 1px;
  background: rgba(16,20,67,.16);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
}

.main-nav a {
  min-height: 42px;
  padding: 7px 9px;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(255,255,255,.84);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.main-nav .nav-item-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

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

.main-nav a.active {
  color: var(--fts-navy-deep);
  background: #fff;
  border-color: rgba(255,255,255,.65);
  box-shadow: 0 7px 18px rgba(12,17,58,.16);
}

.main-nav a.active .nav-item-icon {
  color: var(--fts-orange);
  background: #fff0eb;
}

.nav-actions {
  gap: 7px;
  flex: 0 0 auto;
}

.nav-actions .btn {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  white-space: nowrap;
}

.nav-actions .nav-login {
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.045);
  box-shadow: none;
}

.nav-actions .nav-login:hover {
  color: #fff;
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.11);
}

.nav-actions .nav-register {
  box-shadow: 0 8px 22px rgba(255,169,35,.22);
}

.lang-link {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255,255,255,.045);
}

.lang-link:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.44);
}

.mobile-nav-tools { display: none; }

/* Keep the full desktop navigation only when there is enough horizontal room. */
@media (min-width: 1181px) and (max-width: 1320px) {
  .nav-shell { gap: 10px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy span { display: none; }
  .main-nav a { padding-inline: 7px; font-size: 11.5px; gap: 4px; }
  .main-nav .nav-item-icon { width: 21px; height: 21px; font-size: 12px; }
  .nav-actions .btn { padding-inline: 9px; font-size: 11.5px; }
  .lang-link { width: 39px; height: 39px; }
}

/* Tablet + mobile navigation. It mirrors naturally: left in Arabic, right in English. */
@media (max-width: 1180px) {
  .site-header {
    overflow: visible;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 2100;
  }

  .site-header.has-main-nav .nav-shell {
    position: relative;
    min-height: 66px;
    padding-inline-end: 56px;
  }

  .site-header.has-main-nav .brand-copy { display: block; }
  .site-header.has-main-nav .brand-copy strong { font-size: 12px; }
  .site-header.has-main-nav .brand-copy span { display: none; }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    position: absolute;
    inset-inline-end: 0;
    inset-inline-start: auto;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2300;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(10,14,52,.12);
  }

  .mobile-toggle:hover,
  .mobile-toggle:focus-visible,
  .mobile-toggle[aria-expanded="true"] {
    background: #fff;
    color: var(--fts-navy);
    border-color: #fff;
  }

  .mobile-toggle i { pointer-events: none; }

  .site-header.has-main-nav .nav-actions {
    margin-inline-start: auto;
    gap: 6px;
  }

  .site-header.has-main-nav .nav-actions .nav-login,
  .site-header.has-main-nav .nav-actions .nav-language {
    display: none;
  }

  .site-header.has-main-nav .nav-actions .nav-register {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .main-nav {
    display: block;
    position: fixed;
    top: var(--mobile-nav-top, 78px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 520px;
    max-height: calc(100dvh - var(--mobile-nav-top, 78px) - 12px);
    margin: 0 auto;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(255,255,255,.995);
    border: 1px solid rgba(47,52,127,.12);
    border-radius: 18px;
    box-shadow: 0 24px 65px rgba(15,20,64,.30);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.985);
    transform-origin: top center;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 2200;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .main-nav > ul {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .main-nav a {
    width: 100%;
    min-height: 50px;
    padding: 7px 9px;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--fts-navy);
    background: transparent;
    font-size: 13.5px;
    transform: none;
  }

  .main-nav .nav-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef0ff;
    color: var(--fts-navy);
    font-size: 16px;
  }

  .main-nav a:hover,
  .main-nav a.active {
    color: var(--fts-navy-deep);
    background: #f7f8fd;
    border-color: #e6e8f3;
    box-shadow: none;
    transform: none;
  }

  .main-nav a:hover .nav-item-icon,
  .main-nav a.active .nav-item-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--fts-orange-2), var(--fts-orange));
  }

  .mobile-nav-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--fts-border);
  }

  .main-nav .mobile-nav-tool {
    min-height: 44px;
    justify-content: center;
    background: #fff;
    border-color: var(--fts-border);
    font-size: 12.5px;
    font-weight: 800;
  }

  .main-nav .mobile-nav-tool i {
    width: auto;
    height: auto;
    background: transparent;
    color: var(--fts-orange);
    font-size: 15px;
  }

  .main-nav .mobile-nav-tool:hover i {
    color: var(--fts-orange);
    background: transparent;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2050;
    background: rgba(13,18,57,.38);
    backdrop-filter: blur(1px);
    pointer-events: auto;
  }

  /* Login gateway has no hamburger menu; keep its header compact and usable. */
  .login-page .nav-shell {
    min-height: 66px;
  }
  .login-page .nav-actions {
    margin-inline-start: auto;
  }
}

@media (max-width: 680px) {
  .site-header.has-main-nav .nav-shell {
    min-height: 62px;
    padding-inline-end: 50px;
    gap: 8px;
  }

  .site-header.has-main-nav .brand img {
    width: 42px;
    height: 42px;
  }

  .site-header.has-main-nav .brand-copy { display: none; }

  .mobile-toggle {
    width: 40px;
    height: 40px;
    font-size: 23px;
    border-radius: 11px;
  }

  .site-header.has-main-nav .nav-actions .nav-register {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .main-nav {
    left: 10px;
    right: 10px;
    max-width: none;
    border-radius: 15px;
    padding: 8px;
  }

  .main-nav a {
    min-height: 48px;
    font-size: 13px;
  }

  .main-nav .nav-item-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .login-page .brand-copy { display: none; }
  .login-page .nav-actions .btn { min-height: 38px; padding: 6px 9px; font-size: 11.5px; }
}

@media (max-width: 390px) {
  .site-header.has-main-nav .nav-actions .nav-register i { display: none; }
  .site-header.has-main-nav .nav-actions .nav-register { padding-inline: 9px; }
  .mobile-nav-tools { grid-template-columns: 1fr; }
  .login-page .nav-actions .btn-register i { display: none; }
}

/* Desktop navigation spacing refinement. */
@media (min-width: 1321px) {
  .nav-shell { gap: 16px; }
  .brand-copy strong { font-size: 12.5px; }
  .brand-copy span { font-size: 8.5px; letter-spacing: .35px; }
  .main-nav a { padding-inline: 7px; gap: 5px; font-size: 12px; }
  .main-nav .nav-item-icon { width: 22px; height: 22px; font-size: 12px; }
  .nav-actions .btn { padding-inline: 10px; font-size: 12px; }
}

/* Navigation and floating-action consistency pass (2026-08-26). */
.site-header[data-standard-nav="true"] .main-nav > ul > li > a > span,
.site-header[data-standard-nav="true"] .nav-actions .btn > span,
.site-header[data-standard-nav="true"] .mobile-nav-tool > span {
  min-width: 0;
}

/* Keep the quick-action rail above page sections throughout scrolling.
   On short viewports it becomes internally scrollable instead of disappearing. */
.floating-contact {
  position: fixed !important;
  z-index: 1950 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: grid !important;
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overflow-x: visible;
  padding: 5px 4px;
  overscroll-behavior: contain;
  scrollbar-width: none;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.floating-contact::-webkit-scrollbar { display: none; }

/* Let the opened navigation overlay sit above the floating rail. */
body.menu-open .floating-contact { z-index: 1900 !important; }

@media (max-height: 640px) {
  .floating-contact { gap: 5px; max-height: calc(100dvh - 72px); }
  .floating-contact a { width: 38px; height: 38px; font-size: 16px; }
  .floating-contact .country-code-badge { min-width: 16px; height: 16px; font-size: 7px; }
}

@media (max-width: 1180px) {
  /* The action row is intentionally part of the dropdown in both languages. */
  .site-header[data-standard-nav="true"] .mobile-nav-tools {
    display: grid;
  }
}


/* Homepage nav/Arabic label containment fix (2026-08-26). */
/* Long RTL labels such as "تواصل معنا" must keep their text inside the active pill. */
@media (min-width: 1181px) {
  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav > ul > li {
    flex: 0 0 auto;
    min-width: max-content;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav > ul > li > a,
  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav > ul > li > a > span {
    flex-shrink: 0;
    min-width: max-content;
    white-space: nowrap;
  }
}

/* Mobile menu items use the full row and can wrap safely instead of overflowing. */
@media (max-width: 1180px) {
  .site-header[data-standard-nav="true"] .main-nav > ul > li {
    width: 100%;
    min-width: 0;
  }

  .site-header[data-standard-nav="true"] .main-nav > ul > li > a > span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Keep hash targets visible below the sticky navigation. */
#stages,
#school-portals,
#news,
#contact {
  scroll-margin-top: 92px;
}

/* Arabic desktop navigation fit refinement (2026-08-26).
   The standard header needs more horizontal room than the page-content container,
   especially for the final RTL item ("تواصل معنا") at browser zoom levels above 100%. */
@media (min-width: 1181px) {
  [dir="rtl"] .site-header[data-standard-nav="true"] .nav-shell {
    width: min(calc(100% - 24px), 1400px);
    gap: 12px;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav {
    flex: 1 1 auto;
    min-width: 0;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav > ul {
    margin-inline: auto;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav > ul > li > a {
    box-sizing: border-box;
  }
}

/* Compress only the Arabic desktop navigation slightly before the mobile breakpoint.
   This keeps every label inside the navigation group without wrapping or colliding
   with Login/Register controls. */
@media (min-width: 1181px) and (max-width: 1500px) {
  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav a {
    padding-inline: 6px;
    gap: 4px;
    font-size: 11.5px;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .main-nav .nav-item-icon {
    width: 21px;
    height: 21px;
    font-size: 12px;
  }

  [dir="rtl"] .site-header[data-standard-nav="true"] .nav-actions .btn {
    padding-inline: 9px;
    font-size: 11.5px;
  }
}
