/* ═══════════════════════════════════════
   natija.online — Global Stylesheet
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Amiri:wght@400;700&display=swap');

:root {
  --red:        #C1121F;
  --red2:       #E63946;
  --red-light:  #FFF0F0;
  --red-mid:    #FFE0E2;
  --green:      #1a7f37;
  --green-light:#E8F5EC;
  --gold:       #B8860B;
  --gold2:      #D4A017;
  --gold-light: #FFF8E7;
  --blue:       #1d6fa4;
  --blue-light: #E0F2FE;
  --bg:         #FFFFFF;
  --bg2:        #F7F8FA;
  --bg3:        #F0F2F5;
  --card:       #FFFFFF;
  --border:     #E8E8EC;
  --border2:    #D0D0D8;
  --text:       #0F0F12;
  --text2:      #6B7280;
  --text3:      #9CA3AF;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06),0 2px 8px rgba(0,0,0,0.04);
  --shadow:     0 2px 12px rgba(0,0,0,0.07),0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.09),0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.11);
  --font:       'Tajawal', sans-serif;
  --serif:      'Amiri', serif;
  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  20px;
  --max-w:      1080px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── Page Background ── */
.page-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 90% -5%, rgba(193,18,31,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at -5% 70%, rgba(184,134,11,0.03) 0%, transparent 70%);
}
.dot-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.3;
  background-image: radial-gradient(circle, #C8C8D2 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center;
  padding: 0 2rem;
  animation: slideDown .4s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.nav-inner {
  max-width: var(--max-w); width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  box-shadow: 0 2px 12px rgba(193,18,31,0.28);
  flex-shrink: 0;
}
.logo-texts { line-height: 1.1; }
.logo-ar { font-size: 17px; font-weight: 800; color: var(--text); }
.logo-sub { font-size: 10px; color: var(--red); letter-spacing: 1.5px; font-weight: 700; }

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-link {
  padding: 6px 13px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: var(--text2); transition: all .15s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg2); }
.nav-link.active { color: var(--red); background: var(--red-light); font-weight: 600; }

.nav-cta {
  padding: 9px 18px; border-radius: 9px;
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 700; border: none;
  box-shadow: 0 2px 10px rgba(193,18,31,0.25);
  transition: all .2s; white-space: nowrap;
}
.nav-cta:hover { background: var(--red2); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(193,18,31,0.35); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .2s; }

/* ── HERO ── */
.hero {
  position: relative; z-index: 1;
  padding: 68px 2rem 56px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 100px;
  background: var(--red-light); border: 1px solid rgba(193,18,31,0.15);
  color: var(--red); font-size: 12px; font-weight: 600;
  margin-bottom: 22px;
  animation: fadeUp .5s ease .1s both;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); display: inline-block;
  animation: blink 1.4s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 14px; color: var(--text);
  animation: fadeUp .5s ease .2s both;
}
.hero-title .accent { color: var(--red); }
.hero-sub {
  font-size: 16px; color: var(--text2);
  max-width: 520px; margin: 0 auto 36px; line-height: 1.75;
  animation: fadeUp .5s ease .3s both;
}

/* ── Search Card ── */
.search-card {
  max-width: 660px; margin: 0 auto 44px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .5s ease .4s both;
  position: relative; overflow: hidden;
}
.search-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold2), var(--red));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.search-tabs {
  display: flex; gap: 4px;
  background: var(--bg2); border-radius: 10px; padding: 4px; margin-bottom: 18px;
}
.stab {
  flex: 1; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--text2);
  border: none; background: transparent; transition: all .18s; font-family: var(--font);
}
.stab.on { background: #fff; color: var(--red); box-shadow: var(--shadow-sm); }

.search-row { display: flex; gap: 8px; }
.search-input {
  flex: 1; padding: 12px 16px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 14px;
  outline: none; transition: all .2s; direction: rtl;
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(193,18,31,0.08); }

.search-btn {
  padding: 12px 22px; background: var(--red); border: none; border-radius: 10px;
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(193,18,31,0.25); transition: all .2s; white-space: nowrap;
}
.search-btn:hover { background: var(--red2); transform: translateY(-1px); }

.search-hints {
  display: flex; justify-content: center; gap: 20px; margin-top: 12px;
  font-size: 12px; color: var(--text3);
}
.search-hints span { display: flex; align-items: center; gap: 4px; }

/* ── Stats ── */
.stats-row {
  display: flex; justify-content: center; max-width: 560px;
  margin: 0 auto 56px; animation: fadeUp .5s ease .5s both;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-item { flex: 1; text-align: center; padding: 18px 12px; }
.stat-item + .stat-item { border-right: 1px solid var(--border); }
.stat-num { font-size: 26px; font-weight: 800; color: var(--red); }
.stat-lbl { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ── Section ── */
.section { position: relative; z-index: 1; padding: 0 2rem 52px; max-width: var(--max-w); margin: 0 auto; }
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.sec-title {
  font-size: 20px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.sec-title::before {
  content: ''; display: block; width: 4px; height: 22px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--red), var(--gold2));
}
.sec-link {
  font-size: 13px; color: var(--red);
  border: 1px solid rgba(193,18,31,0.2);
  padding: 5px 13px; border-radius: 8px; transition: all .2s;
}
.sec-link:hover { background: var(--red-light); }

/* ── Main Cards ── */
.main-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 44px; }
.main-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px;
  transition: all .25s; display: block; color: inherit;
}
.main-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border2); }
.mc-bac:hover     { border-color: rgba(193,18,31,0.3); box-shadow: 0 4px 24px rgba(193,18,31,0.08); }
.mc-brevet:hover  { border-color: rgba(26,127,55,0.3); box-shadow: 0 4px 24px rgba(26,127,55,0.08); }
.mc-concours:hover{ border-color: rgba(184,134,11,0.3); box-shadow: 0 4px 24px rgba(184,134,11,0.08); }

.card-icon-wrap { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px; }
.mc-bac .card-icon-wrap     { background: var(--red-light); }
.mc-brevet .card-icon-wrap  { background: var(--green-light); }
.mc-concours .card-icon-wrap{ background: var(--gold-light); }
.mc-calc .card-icon-wrap    { background: #EEF2FF; }
.mc-uni .card-icon-wrap     { background: var(--blue-light); }
.mc-guide .card-icon-wrap   { background: #F0FDF4; }

.card-title2 { font-size: 16px; font-weight: 700; margin-bottom: 7px; }
.card-desc   { font-size: 13px; color: var(--text2); line-height: 1.6; }
.card-badge  { display: inline-block; margin-top: 11px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 100px; }
.badge-hot  { background: var(--red-light); color: var(--red); }
.badge-new  { background: var(--green-light); color: var(--green); }
.badge-soon { background: var(--gold-light); color: var(--gold); }
.badge-blue { background: var(--blue-light); color: var(--blue); }

/* ── Timeline ── */
.timeline { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.tl-head { font-size: 14px; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.tl-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--bg2); }
.tl-item:last-child { border-bottom: none; padding-bottom: 0; }
.tl-dot-col { width: 12px; flex-shrink: 0; margin-top: 4px; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-done { background: var(--green); }
.dot-now  { background: var(--red); box-shadow: 0 0 0 3px rgba(193,18,31,0.15); animation: ripple 1.5s infinite; }
.dot-soon { background: var(--bg3); border: 2px solid var(--border2); }
@keyframes ripple { 0%,100%{box-shadow:0 0 0 3px rgba(193,18,31,0.15)} 50%{box-shadow:0 0 0 6px rgba(193,18,31,0.08)} }
.tl-name { font-size: 13px; font-weight: 600; line-height: 1.4; }
.tl-date { font-size: 11px; color: var(--text3); margin-top: 3px; }
.tl-tag  { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; margin-top: 5px; }
.tag-done { background: var(--green-light); color: var(--green); }
.tag-now  { background: var(--red-light); color: var(--red); }
.tag-soon { background: var(--bg2); color: var(--text3); }

/* ── News ── */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: all .2s;
}
.news-card:hover { box-shadow: var(--shadow-md); border-color: var(--border2); transform: translateY(-1px); }
.news-img { width: 56px; height: 56px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--bg2); }
.news-cat   { font-size: 11px; font-weight: 700; color: var(--red); margin-bottom: 5px; }
.news-title2{ font-size: 13px; font-weight: 600; line-height: 1.5; }
.news-date  { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* ── Calc Banner ── */
.calc-banner {
  background: linear-gradient(135deg, var(--red) 0%, #a00d17 100%);
  border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 1fr 320px;
  box-shadow: 0 8px 32px rgba(193,18,31,0.2);
  margin-bottom: 44px;
}
.calc-left2 { padding: 32px; color: #fff; }
.calc-left2 h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; line-height: 1.3; }
.calc-left2 p  { font-size: 14px; opacity: .85; line-height: 1.7; margin-bottom: 20px; }
.calc-btn-white {
  display: inline-block; padding: 11px 24px; border-radius: 9px;
  background: #fff; color: var(--red);
  font-weight: 800; font-size: 14px; border: none; font-family: var(--font);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15); transition: all .2s;
}
.calc-btn-white:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.calc-right2 { background: rgba(0,0,0,0.15); padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.calc-field2 { margin-bottom: 12px; }
.calc-label2 { font-size: 11px; color: rgba(255,255,255,0.7); margin-bottom: 5px; font-weight: 600; }
.calc-row2   { display: flex; gap: 6px; }
.calc-inp2 {
  flex: 1; padding: 9px 12px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; color: #fff; font-size: 13px; direction: rtl;
}
.calc-inp2:focus { outline: none; background: rgba(255,255,255,0.2); }
.calc-inp2::placeholder { color: rgba(255,255,255,0.4); }
.coef2 { width: 52px; text-align: center; }
.calc-result2 {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px; padding: 14px; text-align: center; margin-top: 4px;
}
.rnum2    { font-size: 32px; font-weight: 800; color: #fff; }
.rstatus2 { font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 3px; }

/* ── Regions ── */
.regions-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 44px; }
.region-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 11px; padding: 14px; text-align: center; transition: all .2s;
}
.region-card:hover { border-color: rgba(193,18,31,0.3); background: var(--red-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.region-name  { font-size: 12px; font-weight: 600; margin-top: 6px; }
.region-count { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── Mid Grid ── */
.mid-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; margin-bottom: 44px; }

/* ── Page Header (inner pages) ── */
.page-header {
  background: linear-gradient(135deg, var(--red) 0%, #a00d17 100%);
  padding: 48px 2rem 40px; color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 16px);
}
.page-header h1 { font-family: var(--serif); font-size: clamp(28px,4vw,44px); font-weight: 700; position: relative; }
.page-header p  { font-size: 15px; opacity: .85; margin-top: 8px; position: relative; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 12px; opacity: .75; margin-bottom: 12px; position: relative;
}
.breadcrumb a { color: inherit; }
.breadcrumb span { opacity: .6; }

/* ── Result Card ── */
.result-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.result-title  { font-size: 18px; font-weight: 800; }
.result-badge  { padding: 5px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.rb-success { background: var(--green-light); color: var(--green); }
.rb-fail    { background: var(--red-light); color: var(--red); }
.rb-pending { background: var(--gold-light); color: var(--gold); }

.result-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-table th { padding: 10px 14px; background: var(--bg2); font-weight: 600; text-align: right; font-size: 12px; color: var(--text2); }
.result-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.result-table tr:last-child td { border-bottom: none; }
.result-table tr:hover td { background: var(--bg2); }

/* ── Filter Bar ── */
.filter-bar {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 24px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: repeat(3,1fr) auto; gap: 12px; align-items: end;
}
.filter-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.filter-select {
  width: 100%; padding: 10px 14px;
  background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 14px; direction: rtl;
  appearance: none; outline: none; transition: all .2s;
}
.filter-select:focus { border-color: var(--red); background: #fff; }
.filter-btn-red {
  padding: 10px 20px; background: var(--red); color: #fff;
  border: none; border-radius: 9px; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(193,18,31,0.25); transition: all .2s; height: 42px;
}
.filter-btn-red:hover { background: var(--red2); transform: translateY(-1px); }

/* ── Info Box ── */
.info-box {
  background: var(--blue-light); border: 1px solid rgba(29,111,164,0.2);
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--blue); margin-bottom: 16px;
}

/* ── Calculator (full page) ── */
.calc-full { max-width: 700px; margin: 0 auto; }
.calc-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.calc-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.subject-row { display: grid; grid-template-columns: 1fr 100px 100px; gap: 10px; align-items: center; margin-bottom: 10px; }
.subject-name { font-size: 14px; font-weight: 500; }
.calc-inp-sm {
  padding: 9px 12px; background: var(--bg2); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px;
  text-align: center; outline: none; transition: all .2s;
}
.calc-inp-sm:focus { border-color: var(--red); background: #fff; }
.result-big {
  background: linear-gradient(135deg, var(--red), #a00d17);
  border-radius: var(--radius); padding: 28px; text-align: center; color: #fff;
}
.result-big .avg { font-size: 56px; font-weight: 900; line-height: 1; }
.result-big .mention { font-size: 18px; font-weight: 700; margin-top: 8px; }
.result-big .sub-text { font-size: 13px; opacity: .8; margin-top: 6px; }

/* ── Footer ── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 44px 2rem 22px; position: relative; z-index: 1;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid  { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-logo-text { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.footer-tagline   { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 14px; }
.social-row { display: flex; gap: 7px; }
.soc-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; transition: all .2s;
}
.soc-btn:hover { border-color: var(--red); background: var(--red-light); }
.footer-col h4    { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 13px; }
.footer-links     { display: flex; flex-direction: column; gap: 8px; }
.footer-link      { font-size: 13px; color: var(--text2); transition: color .15s; }
.footer-link:hover{ color: var(--red); }
.footer-bottom {
  padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .main-grid       { grid-template-columns: 1fr 1fr; }
  .mid-grid        { grid-template-columns: 1fr; }
  .calc-banner     { grid-template-columns: 1fr; }
  .calc-right2     { display: none; }
  .regions-grid    { grid-template-columns: repeat(3,1fr); }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .filter-bar      { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .main-grid    { grid-template-columns: 1fr; }
  .news-grid    { grid-template-columns: 1fr; }
  .regions-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
  .nav-links    { display: none; }
  .hamburger    { display: flex; }
  .hero         { padding: 48px 1rem 40px; }
  .section      { padding: 0 1rem 40px; }
  .filter-bar   { grid-template-columns: 1fr; }
  .subject-row  { grid-template-columns: 1fr 80px 80px; }
}
