/*
Theme Name: Athar Yabqa Child
Template: astra
Description: قالب فرعي لهوية مبادرة أثر يبقى — وزارة التعليم 2025
Version: 2.0.0
*/

/* ============================================================
   متغيرات الهوية — وزارة التعليم
   ============================================================ */
:root{
  --athar-petrol:#15445a; --athar-green:#07a869; --athar-teal:#0da9a6;
  --athar-blue:#3d7eb9; --athar-gold:#c1b489; --athar-grey:#c2c1c1;
  --athar-ink:#16303d; --athar-muted:#5b7482; --athar-line:rgba(21,68,90,.10);
  --athar-radius:20px; --athar-ease:cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   1) الخط — Cairo على كل الموقع
   ============================================================ */
html body, html body *:not(i):not(.fas):not(.far):not(.fab):not([class*="fa-"]),
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body p, html body a, html body li, html body button, html body input,
html body select, html body textarea, html body .elementor-heading-title,
html body .elementor-button, html body .elementor-widget-container,
html body .entry-title, html body .ast-site-title, html body .main-header-menu a{
  font-family:'Cairo','IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',sans-serif !important;
}
body{color:var(--athar-ink); background:#fff;}

/* ============================================================
   2) إصلاح المسافات الفارغة بين الحروف (العربية خط متصل)
   ============================================================ */
html, body, h1, h2, h3, h4, h5, h6, p, span, div, a, li, button, input, select, textarea,
.entry-title, .site-title, .ast-site-identity, .elementor-heading-title,
.elementor-widget-container, .elementor-button, .elementor-icon-list-text{
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  font-feature-settings: normal !important;
  font-variant-ligatures: normal !important;
  text-rendering: optimizeLegibility;
}
/* منع أي letter-spacing موجب على النصوص العربية */
[dir="rtl"] *, html[lang^="ar"] *{ letter-spacing: 0 !important; }

/* ============================================================
   3) تخطي للمحتوى + شريط تقدم القراءة
   ============================================================ */
.athar-skip{position:absolute;inset-inline-start:-9999px;top:8px;background:var(--athar-petrol);
  color:#fff;padding:10px 18px;border-radius:10px;z-index:100000;}
.athar-skip:focus{inset-inline-start:16px;}

#athar-progress{position:fixed;top:0;inset-inline-start:0;height:3px;width:0;z-index:99999;
  background:linear-gradient(270deg,#07a869,#0da9a6 55%,#c1b489);
  box-shadow:0 0 12px rgba(7,168,105,.55);transition:width .12s linear;pointer-events:none;}

/* ============================================================
   4) الهيدر
   ============================================================ */
.athar-header{position:sticky;top:0;z-index:9990;background:rgba(255,255,255,.9);
  backdrop-filter:blur(16px) saturate(170%);border-bottom:1px solid var(--athar-line);
  transition:box-shadow .3s ease,background .3s ease;}
.athar-header.is-scrolled{box-shadow:0 10px 30px -18px rgba(21,68,90,.55);background:rgba(255,255,255,.97);}
.athar-header-inner{max-width:1240px;margin:0 auto;padding:12px 24px;
  display:flex;align-items:center;gap:26px;}
.athar-brand{display:flex;align-items:center;gap:12px;text-decoration:none;flex-shrink:0;}
.athar-brand img{height:56px;width:auto;transition:height .3s var(--athar-ease);}
.athar-header.is-scrolled .athar-brand img{height:46px;}
.athar-brand-title{display:block;font-weight:800;font-size:20px;color:var(--athar-petrol);line-height:1.1;}
.athar-brand-sub{display:block;font-size:11.5px;color:var(--athar-muted);margin-top:3px;}
.athar-nav{margin-inline-start:auto;}
.athar-menu{display:flex;align-items:center;gap:6px;list-style:none;margin:0;padding:0;}
.athar-menu-item>a{display:block;padding:9px 14px;border-radius:11px;font-size:15px;font-weight:600;
  color:var(--athar-petrol);text-decoration:none;position:relative;transition:color .25s,background .25s;}
.athar-menu-item>a::after{content:"";position:absolute;bottom:5px;inset-inline:14px;height:2px;
  border-radius:2px;background:var(--athar-green);transform:scaleX(0);transform-origin:right;
  transition:transform .3s var(--athar-ease);}
.athar-menu-item>a:hover{background:rgba(7,168,105,.07);color:var(--athar-green);}
.athar-menu-item>a:hover::after,.athar-menu-item.is-current>a::after{transform:scaleX(1);}
.athar-menu-item.is-current>a{color:var(--athar-green);}
.athar-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.athar-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 20px;
  border-radius:12px;font-size:14px;font-weight:700;text-decoration:none;border:1.5px solid transparent;
  transition:transform .28s var(--athar-ease),box-shadow .28s,background .28s,color .28s;}
.athar-btn-solid{background:var(--athar-green);color:#fff;box-shadow:0 8px 20px -10px rgba(7,168,105,.9);}
.athar-btn-solid:hover{background:var(--athar-petrol);color:#fff;transform:translateY(-2px);
  box-shadow:0 14px 26px -12px rgba(21,68,90,.7);}
.athar-btn-ghost{border-color:var(--athar-line);color:var(--athar-petrol);}
.athar-btn-ghost:hover{border-color:var(--athar-green);color:var(--athar-green);background:rgba(7,168,105,.06);}
.athar-burger{display:none;flex-direction:column;justify-content:center;gap:5px;width:44px;height:44px;
  background:transparent;border:1.5px solid var(--athar-line);border-radius:12px;cursor:pointer;padding:0 11px;}
.athar-burger span{display:block;height:2px;border-radius:2px;background:var(--athar-petrol);transition:transform .3s,opacity .3s;}

/* ============================================================
   5) الفوتر
   ============================================================ */
.athar-footer{background:linear-gradient(160deg,#123a4d,#15445a 55%,#0f3444);color:#cfe0e6;margin-top:0;}
.athar-footer-inner{max-width:1240px;margin:0 auto;padding:64px 24px 40px;
  display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:40px;}
.athar-fcol-brand img{height:64px;width:auto;margin-bottom:16px;}
.athar-fcol p{font-size:13.5px;line-height:1.85;margin:0 0 14px;color:rgba(207,224,230,.82);}
.athar-org{color:var(--athar-gold)!important;font-size:12.5px!important;}
.athar-fcol h3{font-size:15px;margin:0 0 16px;color:#fff;font-weight:800;position:relative;padding-bottom:10px;}
.athar-fcol h3::after{content:"";position:absolute;bottom:0;inset-inline-start:0;width:34px;height:2px;
  border-radius:2px;background:var(--athar-green);}
.athar-fcol ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;}
.athar-fcol a{color:rgba(207,224,230,.8);text-decoration:none;font-size:13.5px;
  transition:color .25s,padding-inline-start .25s;}
.athar-fcol a:hover{color:#8fe3c4;padding-inline-start:5px;}
.athar-footer-bar{max-width:1240px;margin:0 auto;padding:18px 24px;border-top:1px solid rgba(255,255,255,.09);
  display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  font-size:12.5px;color:rgba(207,224,230,.6);}
.athar-moe{color:var(--athar-gold);}

/* ============================================================
   6) هامش المحتوى (Elementor يتولى التصميم)
   ============================================================ */
.athar-main{padding:0;}
.entry-header{display:none!important;}
.ast-above-header-wrap,#ast-mobile-header{display:none!important;}
header.site-header{display:none!important;}
.ast-container,.entry-content{padding-inline:0!important;max-width:none!important;margin:0!important;}

/* إخفاء حقوق Astra */
.ast-footer-copyright, .site-footer .ast-footer-copyright,
.ast-small-footer, footer .ast-footer-copyright{ display:none !important; }
.ast-footer-credit, .powered-by-astra{ display:none !important; }

/* إخفاء عنوان الصفحة المكرر (Astra entry-title) */
.ast-single-entry-banner, .entry-header.ast-no-thumbnail,
.ast-article-single > .entry-header, .page .entry-header,
h1.entry-title, .entry-title{ display:none !important; }
.ast-separate-container .ast-article-single{ padding-top:0 !important; }

/* ============================================================
   7) أنماط مشتركة للصفحات (كانت في athar-setup)
   ============================================================ */
.athar-wrap{max-width:1200px;margin:0 auto;padding:0 22px}
.athar-sec{padding:88px 0}
.athar-sec.soft{background:linear-gradient(180deg,#f6fafb 0%,#ffffff 100%)}
.athar-eyebrow{display:inline-block;font-size:14px;font-weight:700;
  color:#07a869;background:rgba(7,168,105,.10);padding:6px 16px;border-radius:999px;margin-bottom:16px}
.athar-h2{font-size:clamp(26px,3.6vw,40px);font-weight:800;color:#15445a;margin:0 0 14px;line-height:1.35}
.athar-sub{font-size:17px;color:#5b6f7a;max-width:640px;line-height:1.9;margin:0 auto}
.athar-center{text-align:center}
.athar-grid{display:grid;gap:24px;margin-top:44px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:980px){.g3,.g4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.g2,.g3,.g4{grid-template-columns:1fr}.athar-sec{padding:60px 0}}
.athar-btn.primary{background:linear-gradient(135deg,#07a869,#0da9a6);color:#fff;
  box-shadow:0 10px 26px rgba(7,168,105,.30)}
.athar-btn.primary:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(7,168,105,.42);color:#fff}
.athar-btn.ghost{background:rgba(255,255,255,.10);color:#fff;border:1.5px solid rgba(255,255,255,.35)}
.athar-btn.ghost:hover{background:rgba(255,255,255,.20);transform:translateY(-3px);color:#fff}
.athar-btn.outline{background:#fff;color:#15445a;border:1.5px solid rgba(21,68,90,.18)}
.athar-btn.outline:hover{border-color:#07a869;color:#07a869;transform:translateY(-3px)}

/* ============================================================
   8) الهيدر/الفوتر المخصصان (Elementor templates)
   ============================================================ */
.athar-hf-header{ position:relative; z-index:99; }
.athar-hf-header .elementor-container{ align-items:center; }
.athar-hf-header .elementor-widget-image{ display:flex; align-items:center; }
.athar-hf-header .elementor-widget-image img{ max-height:56px !important; width:auto !important; }
.athar-hf-header .elementor-widget-image:last-child img{ max-height:44px !important; }
.athar-hf-header .elementor-widget-button{ margin:0; }
.athar-hf-footer{ background:#15445a; margin-top:0; }
.athar-hf-footer .elementor-container{ background:transparent; }
.athar-hf-footer .elementor-widget-image img{ max-height:64px !important; width:auto !important; }
.athar-hf-footer .elementor-widget-image:last-child img{ max-height:52px !important; }
.athar-hf-footer h4, .athar-hf-footer .elementor-heading-title{ color:#ffffff !important; }
.athar-hf-footer p, .athar-hf-footer .elementor-icon-list-text{ color:rgba(255,255,255,.80) !important; }
.athar-nav ul{ list-style:none; margin:0; padding:0; display:flex; gap:22px; flex-wrap:wrap; justify-content:center; }
.athar-nav ul li a{ color:#15445a; font-weight:700; font-size:15px; text-decoration:none; transition:color .25s ease; }
.athar-nav ul li a:hover{ color:#07a869; }
.athar-hf-footer .athar-nav ul{ flex-direction:column; gap:10px; align-items:flex-start; }
.athar-hf-footer .athar-nav ul li a{ color:rgba(255,255,255,.82); }
.athar-hf-footer .athar-nav ul li a:hover{ color:#8fe3c4; }

/* ============================================================
   9) الموشن — ظهور تدريجي + hover
   ============================================================ */
.athar-reveal{ opacity:0; transform:translateY(26px);
  transition:opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.athar-reveal.is-visible{ opacity:1; transform:none; }

.elementor-widget-icon-box{ transition:transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease; }
.elementor-widget-icon-box:hover{ transform:translateY(-6px); }
.elementor-button{ transition:all .3s cubic-bezier(.22,.61,.36,1) !important; }
.elementor-button:hover{ transform:translateY(-2px); }

/* ============================================================
   10) الريسبونسيف — منع التمرير الأفقي
   ============================================================ */
html, body{ overflow-x:hidden !important; max-width:100%; }
img, video, iframe, table{ max-width:100% !important; height:auto; }
.elementor-container, .elementor-element, .elementor-widget-container{ max-width:100%; }

@media (max-width:1024px){
  .athar-nav{position:fixed;inset-block-start:0;inset-inline-end:-320px;width:300px;height:100dvh;
    background:#fff;box-shadow:-12px 0 40px rgba(21,68,90,.18);padding:88px 18px 24px;
    transition:inset-inline-end .38s var(--athar-ease);overflow-y:auto;z-index:10000;}
  .athar-nav.is-open{inset-inline-end:0;}
  .athar-menu{flex-direction:column;align-items:stretch;gap:4px;}
  .athar-menu-item>a{padding:13px 16px;border-radius:12px;font-size:15.5px;}
  .athar-menu-item>a::after{display:none;}
  .athar-burger{display:flex;}
  .athar-actions .athar-btn-ghost{display:none;}
  .athar-footer-inner{grid-template-columns:1fr 1fr;gap:30px;}
}

@media (max-width:767px){
  .elementor-heading-title{ word-break:break-word; overflow-wrap:anywhere; }
  .elementor-widget-container{ padding-left:0; padding-right:0; }
  .athar-hf-header .elementor-widget-image img{ max-height:42px !important; }
  .athar-hf-header .elementor-widget-image:last-child img{ max-height:34px !important; }
  .athar-hf-header > .elementor-container{ flex-wrap:wrap !important; row-gap:8px !important; }
  .athar-hf-header .elementor-widget-button .elementor-button{ padding:9px 16px !important; font-size:13px !important; }
  .athar-hf-header .athar-nav{ width:100% !important; order:3; }
  .athar-hf-header .athar-nav ul{ display:flex !important; flex-wrap:wrap !important;
    justify-content:center !important; gap:10px 14px !important; }
  .athar-hf-header .athar-nav ul li a{ font-size:13px !important; }
  .athar-hf-footer .elementor-widget-image img{ max-height:52px !important; }
  .athar-hf-footer .elementor-widget-image:last-child img{ max-height:44px !important; }
  .athar-nav ul{ gap:14px; }
  .athar-nav ul li a{ font-size:14px; }
}

@media (max-width:560px){
  .athar-header-inner{padding:10px 16px;gap:12px;}
  .athar-brand img{height:46px;}
  .athar-brand-title{font-size:17px;}
  .athar-brand-sub{font-size:10.5px;}
  .athar-footer-inner{grid-template-columns:1fr;}
  .athar-footer-bar{justify-content:center;text-align:center;}
}

/* ============================================================
   11) إتاحة: تقليل الحركة
   ============================================================ */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;}
  .athar-reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
}
