/* ==========================================================================
   خبير سيو — الأنماط العامة (غير الحاجبة للعرض)
   المكوّنات، المقالات، الأقسام، النماذج، والأدوات المساعدة
   ========================================================================== */

/* أدوات مساعدة عامة ------------------------------------------------------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tint { background: var(--ink-50); }
.section--teal { background: linear-gradient(160deg, var(--teal-800), var(--teal-900)); color: #fff; }
.section--teal h2, .section--teal h3 { color: #fff; }

.section__head { max-width: 760px; margin-inline: auto; text-align: center; margin-block-end: 48px; }
.section__eyebrow {
  display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .5px;
  color: var(--teal-600); background: var(--teal-50); padding: 6px 16px; border-radius: 50px;
  margin-block-end: 16px;
}
.section--teal .section__eyebrow { color: #fff; background: rgba(255,255,255,.15); }
.section__lead { font-size: 1.15rem; color: var(--ink-500); margin-block-start: 14px; }
.section--teal .section__lead { color: rgba(255,255,255,.85); }

.text-center { text-align: center; }
.mt-lg { margin-block-start: 40px; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* البطاقات ---------------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-500); }
.card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: var(--teal-50); color: var(--teal-700); margin-block-end: 18px; font-size: 26px;
}
.card h3 { margin-block-end: 10px; }
.card p { color: var(--ink-700); }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-block-start: 16px; font-weight: 700; }
.card__link::after { content: '←'; }

/* بطاقة مقال -------------------------------------------------------------- */
.article-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ink-100);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card__cat {
  align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--teal-700);
  background: var(--teal-50); padding: 4px 12px; border-radius: 50px;
}
.article-card__title { font-size: 1.2rem; }
.article-card__title a { color: var(--ink-900); }
.article-card__title a:hover { color: var(--teal-700); text-decoration: none; }
.article-card__excerpt { color: var(--ink-500); font-size: .96rem; flex: 1; }
.article-card__meta { display: flex; gap: 14px; font-size: 13px; color: var(--ink-500); margin-block-start: 6px; }

/* أرقام/إحصاءات ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.stat { text-align: center; }
.stat__num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--teal-600); line-height: 1; }
.section--teal .stat__num { color: #fff; }
.stat__label { color: var(--ink-500); margin-block-start: 8px; font-weight: 600; }
.section--teal .stat__label { color: rgba(255,255,255,.8); }

/* خطوات ------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-inline-start: 64px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; inset-block-start: 0;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-700); color: #fff; font-weight: 800; font-size: 18px;
}
.step h3 { margin-block-end: 6px; }
.step p { color: var(--ink-700); }

/* الأسئلة الشائعة (accordion) --------------------------------------------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.faq__item { border: 1px solid var(--ink-100); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq__item summary {
  cursor: pointer; padding: 20px 24px; font-weight: 700; font-size: 1.08rem; color: var(--ink-900);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; font-size: 1.6rem; color: var(--teal-600); font-weight: 400; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--teal-700); }
.faq__answer { padding: 0 24px 22px; color: var(--ink-700); }

/* تذييل الموقع ------------------------------------------------------------ */
.site-footer { background: var(--ink-900); color: #cbd5e1; padding-block: 56px 28px; margin-block-start: 40px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer__brand .brand__name { color: #fff; font-size: 22px; display: inline-block; margin-block-end: 12px; }
.site-footer__brand p { color: #94a3b8; margin-block-end: 18px; font-size: .95rem; }
.site-footer__title { color: #fff; font-size: 1rem; margin-block-end: 16px; }
.site-footer__col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer__col a { color: #94a3b8; font-size: .95rem; }
.site-footer__col a:hover { color: #fff; text-decoration: none; }
.site-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-block-start: 1px solid #1e293b; margin-block-start: 40px; padding-block-start: 24px;
  font-size: .9rem; color: #64748b;
}
.site-footer__contact { display: flex; gap: 10px; align-items: center; }
.site-footer__contact a { color: #94a3b8; }
@media (max-width: 780px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* مسار التنقّل ------------------------------------------------------------ */
.breadcrumbs { background: var(--ink-50); border-block-end: 1px solid var(--ink-100); font-size: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding-block: 12px; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--ink-500); }
.breadcrumbs a { color: var(--ink-700); }
.breadcrumbs [aria-current='page'] { color: var(--teal-700); font-weight: 600; }
.breadcrumbs__sep { color: var(--ink-300); }

/* الهيرو ------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--teal-50), #fff 60%); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 96px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
  color: var(--teal-700); background: #fff; padding: 8px 16px; border-radius: 50px; box-shadow: var(--shadow); margin-block-end: 20px;
}
.hero h1 { margin-block-end: 18px; }
.hero__lead { font-size: 1.2rem; color: var(--ink-700); margin-block-end: 28px; max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-block-end: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 20px; font-size: .92rem; color: var(--ink-500); }
.hero__trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero__trust span::before { content: '✓'; color: var(--teal-600); font-weight: 800; }
.hero__card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px;
  border: 1px solid var(--ink-100);
}
.hero__card h2 { font-size: 1.2rem; margin-block-end: 16px; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; gap: 32px; } .hero__card { order: 2; } }

/* شريط CTA ---------------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-block-end: 14px; }
.cta-band p { max-width: 640px; margin: 0 auto 26px; font-size: 1.1rem; }
.cta-band .btn { font-size: 17px; padding: 15px 34px; }

/* محتوى المقال (prose) ---------------------------------------------------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose > * + * { margin-block-start: 1.25em; }
.prose h2 { margin-block-start: 1.8em; padding-block-end: .3em; border-block-end: 2px solid var(--teal-50); scroll-margin-top: 90px; }
.prose h3 { margin-block-start: 1.5em; color: var(--teal-800); scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--ink-700); }
.prose ul, .prose ol { padding-inline-start: 1.4em; display: grid; gap: .5em; }
.prose li { padding-inline-start: 4px; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink-900); }
.prose blockquote {
  border-inline-start: 4px solid var(--teal-600); background: var(--teal-50);
  padding: 16px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-700); font-style: normal;
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: var(--radius-sm); margin-block: 1.5em; box-shadow: var(--shadow); }
.prose code {
  background: var(--ink-100); padding: 2px 7px; border-radius: 6px; font-size: .9em;
  font-family: 'Consolas', 'Courier New', monospace; direction: ltr; display: inline-block;
}

/* جداول متجاوبة ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin-block: 1.5em; border-radius: var(--radius-sm); border: 1px solid var(--ink-100); }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 460px; }
.prose thead { background: var(--teal-700); color: #fff; }
.prose th, .prose td { padding: 13px 16px; text-align: start; border-block-end: 1px solid var(--ink-100); }
.prose tbody tr:nth-child(even) { background: var(--ink-50); }
.prose tbody tr:hover { background: var(--teal-50); }

/* صندوق ملاحظة/إجابة سريعة (للمقتطفات المميّزة) --------------------------- */
.answer-box {
  background: var(--teal-50); border: 1px solid var(--teal-500); border-inline-start-width: 5px;
  border-radius: var(--radius-sm); padding: 20px 24px; margin-block: 1.5em;
}
.answer-box strong { color: var(--teal-800); }

/* جدول المحتويات ---------------------------------------------------------- */
.toc { background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: var(--radius); padding: 22px 26px; margin-block: 2em; }
.toc h2 { font-size: 1.1rem; margin: 0 0 14px; border: 0; padding: 0; }
.toc ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; }
.toc a { color: var(--ink-700); text-decoration: none; }
.toc a:hover { color: var(--teal-700); text-decoration: underline; }

/* رأس المقال -------------------------------------------------------------- */
.article-header { max-width: 760px; margin-inline: auto; text-align: center; padding-block: 40px 8px; }
.article-header__cat { color: var(--teal-700); font-weight: 700; }
.article-header h1 { margin-block: 14px 18px; }
.article-header__meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; align-items: center;
  color: var(--ink-500); font-size: .92rem;
}
.article-header__meta time, .article-header__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* صندوق الكاتب (E-E-A-T) -------------------------------------------------- */
.author-box {
  display: flex; gap: 18px; align-items: center; max-width: 760px; margin: 48px auto 0;
  padding: 24px; background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: var(--radius);
}
.author-box__avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800)); color: #fff; font-size: 26px; font-weight: 800;
}
.author-box__name { font-weight: 800; color: var(--ink-900); }
.author-box__title { color: var(--ink-500); font-size: .92rem; }

/* مقالات ذات صلة ---------------------------------------------------------- */
.related { border-block-start: 1px solid var(--ink-100); margin-block-start: 48px; padding-block-start: 40px; }

/* نماذج ------------------------------------------------------------------- */
.form-field { display: grid; gap: 6px; margin-block-end: 18px; }
.form-field label { font-weight: 700; font-size: .95rem; }
.form-field input, .form-field textarea, .form-field select {
  font-family: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink-900); width: 100%;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(13,148,136,.15);
}

/* قائمة مزايا ------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: '✓'; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-50); color: var(--teal-700); display: grid; place-items: center; font-weight: 800; font-size: 14px;
}

/* الوصولية: تقليل الحركة --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
