/* ─────────────────────────────────────────────
   الصفحة الرئيسية — ثانوية السراج يانوح
   تعتمد على الخصائص المنطقية (inline-start/end) فتنقلب تلقائيًا بين العربية والإنكليزية
   ───────────────────────────────────────────── */

@font-face {
  font-family: "Cairo";
  src: url("../fonts/Cairo-Variable.woff") format("woff");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --navy: #12275D; --navy-dark: #0B1A42;
  --gold: #DBA73D; --gold-dark: #A9781F; --gold-soft: #F1CF85; --gold-tint: #F6E6C2; --gold-light: #FBF3E2;
  --bg: #F7F6F2; --ink: #1F2430; --muted: #5B6272;
  --kg-purple: #36284C; --kg-green: #8BBD3A;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Cairo", Tahoma, sans-serif; line-height: 1.7; }
a { color: var(--navy); }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

/* ── الشريط العلوي ── */
html { scroll-behavior: smooth; }
.topbar { background: rgba(255,255,255,.96); border-bottom: 1px solid #E6E2D8; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(18,39,93,.06); }
#top, #paths, #depts, #kg { scroll-margin-top: 120px; }
.topbar .wrap { padding-block: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 75px; width: auto; }
.brand-name { font-weight: 800; font-size: 20px; color: var(--navy); }
.brand-name em { font-style: normal; color: var(--gold-dark); }

.tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #F3F1EA; padding: 6px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.tab { color: #4A5163; text-decoration: none; border: 1px solid transparent; padding: 8px 20px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; transition: background .2s; }
.tab:hover { background: var(--gold-light); color: var(--navy); }
.tab[aria-current="page"] { color: var(--navy); background: var(--gold-tint); border-color: var(--gold); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #DEDBD2; color: var(--navy); text-decoration: none; font-weight: 700; padding: 9px 14px; border-radius: 999px; min-height: 44px; font-size: 14px; }
.lang-btn:hover { background: var(--gold-light); }
.login-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; padding: 11px 22px; border-radius: 12px; min-height: 44px; }
.login-btn:hover { background: var(--navy-dark); color: #fff; }
[dir="ltr"] .login-btn svg { transform: scaleX(-1); }

/* ── الواجهة ── */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.hero-pattern { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .09; }
.hero-inner { position: relative; max-width: 820px; margin-inline: auto; padding: 180px 24px 112px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.glow { position: relative; width: 170px; margin-bottom: 4px; }
.glow-svg { position: absolute; left: 50%; top: 50%; width: 400px; height: 400px; margin: -260px 0 0 -202px; pointer-events: none; }
.glow img { position: relative; width: 170px; height: auto; display: block; filter: drop-shadow(0 0 14px rgba(241,207,133,.35)); }
.siraj-rays, .siraj-glow { transform-box: fill-box; transform-origin: center; }
@keyframes sirajSpin { to { transform: rotate(360deg); } }
@keyframes sirajBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.siraj-rays { animation: sirajSpin 120s linear infinite; }
.siraj-glow { animation: sirajBreathe 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .siraj-rays, .siraj-glow { animation: none; } }

.year-badge { background: rgba(219,167,61,.16); color: var(--gold-soft); font-weight: 700; font-size: 14px; padding: 6px 16px; border-radius: 999px; }
.hero h1 { margin: 0; font-size: 52px; line-height: 1.25; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin: 0; font-size: 19px; line-height: 1.9; color: #D5DBEA; max-width: 620px; }

/* ── مسارات الدخول ── */
.paths { position: relative; margin-top: -56px; }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.path { border-radius: 20px; padding: 28px; text-decoration: none; color: inherit; box-shadow: 0 6px 18px rgba(18,39,93,.07); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; border: 1px solid; }
.path:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18,39,93,.12); }
.path-staff   { background: #EEF1F9; border-color: #D9DFEF; }
.path-student { background: #FBF5E8; border-color: #F0E1BE; }
.path-parent  { background: #EDF7F1; border-color: #CFE8DA; }
.path-icon { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; }
.path-staff .path-icon { color: var(--navy); }
.path-student .path-icon { color: var(--gold-dark); }
.path-parent .path-icon { color: #1E7F55; }
.path-title { font-weight: 800; font-size: 20px; color: var(--navy); }
.path-text { color: var(--muted); font-size: 15px; line-height: 1.8; }
.path-link { color: var(--gold-dark); font-weight: 700; font-size: 14px; }

/* ── الأقسام ── */
.depts { padding-block: 88px 24px; }
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin-bottom: 28px; }
.eyebrow { color: var(--gold-dark); font-weight: 700; font-size: 14px; }
.section-head h2 { margin: 0; font-size: 32px; font-weight: 800; color: var(--navy); }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; }
.depts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.dept { border-radius: 18px; padding: 22px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; border: 1px solid; transition: transform .2s, box-shadow .2s; }
.dept:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18,39,93,.10); }
.dept-badge { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; background: #fff; }
.dept-name { font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.5; }
.dept-sub { font-size: 13px; color: #6B7280; line-height: 1.5; }

/* ── قسم الروضات ── */
.kg { padding-block: 64px 96px; }
.kg-card { background: #FBFAF4; border: 2px solid #CFE3AE; border-radius: 32px; padding: 40px 180px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; position: relative; overflow: hidden; }
.kg-dot1, .kg-dot2 { position: absolute; border-radius: 50%; pointer-events: none; }
.kg-dot1 { width: 160px; height: 160px; background: #EEF6E2; inset-inline-end: -40px; top: -40px; opacity: .55; }
.kg-dot2 { width: 110px; height: 110px; background: #FDF1C9; inset-inline-start: -30px; bottom: -40px; opacity: .6; }
.kg-logo { position: absolute; inset-inline-start: 36px; top: 50%; transform: translateY(-50%); height: 85px; width: auto; }
.kg-badge { position: relative; background: var(--kg-green); color: #fff; font-weight: 800; font-size: 14px; padding: 5px 16px; border-radius: 999px; }
.kg h2 { position: relative; margin: 0; font-size: 34px; font-weight: 800; color: var(--kg-purple); }
.kg p { position: relative; margin: 0; color: #4E4560; font-size: 17px; line-height: 1.9; max-width: 680px; }
.kg-chips { position: relative; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.kg-chips span { font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 12px; }
.kg-enter { position: relative; margin-top: 6px; background: var(--kg-purple); color: #fff; text-decoration: none; font-weight: 800; padding: 13px 26px; border-radius: 16px; min-height: 48px; display: inline-flex; align-items: center; }
.kg-enter:hover { background: #241A35; color: #fff; }

/* ── التذييل ── */
.footer { background: var(--navy-dark); color: #C9D0E3; }
.footer .wrap { padding-block: 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: 14px; }
.footer-name { color: #fff; font-weight: 800; font-size: 16px; }
.footer-name em { font-style: normal; color: var(--gold); }

/* ── الشاشات الصغيرة ── */
@media (max-width: 900px) {
  .topbar { position: static; }
  .topbar .wrap { justify-content: center; }
  .hero h1 { font-size: 38px; }
  .kg-card { padding: 120px 24px 36px; }
  .kg-logo { inset-inline-start: 50%; top: 24px; transform: translateX(50%); }
  [dir="ltr"] .kg-logo { transform: translateX(-50%); }
}
@media (max-width: 560px) {
  .tabs { font-size: 13px; }
  .tab { padding: 6px 12px; }
  .hero-inner { padding-top: 160px; }
}

/* صورة الواجهة (من إعدادات الصفحة الرئيسية) */
.hero.has-photo { background: linear-gradient(rgba(11,26,66,var(--hero-dim,.55)), rgba(11,26,66,var(--hero-dim,.55))), var(--hero-img) center / cover no-repeat, var(--navy); }
.hero.has-photo .hero-pattern { opacity: .05; }
/* الأخبار والإعلانات */
.news { margin-top: -44px; position: relative; z-index: 2; }
.news-head { margin-bottom: 8px; } .news-badge { display: inline-block; background: var(--gold); color: var(--navy-dark); font-weight: 800; padding: 6px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(11,26,66,.18); }
.news-list { list-style: none; margin: 0; padding: 6px 18px; background: #fff; border: 1px solid #ECE8DE; border-radius: 18px; box-shadow: 0 12px 32px rgba(11,26,66,.10); }
.news-list li { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #EAE5D8; font-size: 16px; line-height: 1.7; }
.news-list li:last-child { border-bottom: 0; }
.news-list li::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: translateY(-2px); }
.news-list li a, .news-list li span { flex: 1; color: var(--navy); text-decoration: none; font-weight: 600; } .news-list li a:hover { text-decoration: underline; }
.news-list small { color: #8A8F9C; font-size: 13px; }
.news + .paths { margin-top: 28px; }
/* التواصل */
.contact { margin-top: 56px; margin-bottom: 56px; }
.contact-card { background: #fff; border: 1px solid #ECE8DE; border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.contact-info p { margin: 0 0 6px; font-size: 16px; color: #3A4256; } .contact-info b { color: var(--navy); margin-inline-end: 6px; }
.contact-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cl { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 2px 10px; padding: 10px 14px; border-radius: 14px; background: var(--gold-light); text-decoration: none; color: var(--navy); font-weight: 700; border: 1px solid transparent; }
.cl:hover { border-color: var(--gold); }
.cl svg { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: #fff; color: var(--navy); }
.cl small { color: #6B7080; font-weight: 600; font-size: 13px; }
.cl-whatsapp svg { color: #1E8E4E; } .cl-facebook svg { color: #1F4E8C; } .cl-instagram svg { color: #B13A73; } .cl-youtube svg { color: #C0392B; }
