/* مدرسة اقرأ — الدعم الفني
   Colours follow the app: blue primary, orange accent, soft green. */

:root {
  --blue: #1E63D6;
  --blue-600: #1A56BD;
  --blue-soft: #E8F1FF;
  --sky: #3AA7FF;
  --orange: #F07B1E;
  --orange-soft: #FFF1E3;
  --green: #1FA56B;
  --green-soft: #E3F7EE;
  --purple: #7A67F0;
  --purple-soft: #EFEBFF;
  --teal: #159C8C;
  --teal-soft: #E0F5F2;
  --red: #E0476C;
  --red-soft: #FFE8EE;

  --ink: #14213D;
  --ink-2: #45527A;
  --ink-3: #6B7594;
  --bg: #F4F7FC;
  --surface: #FFFFFF;
  --rule: #E3E9F3;
  --shadow: 0 10px 30px rgba(20, 40, 90, .07);
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #5B9BFF;
    --blue-600: #7AAEFF;
    --blue-soft: #16243D;
    --sky: #6BBEFF;
    --orange: #FF9A4D;
    --orange-soft: #33230F;
    --green: #3FD08F;
    --green-soft: #0F2E22;
    --purple: #A597FF;
    --purple-soft: #221D3D;
    --teal: #3CCBB8;
    --teal-soft: #0D2B28;
    --red: #FF7A98;
    --red-soft: #33161E;

    --ink: #EAF0FA;
    --ink-2: #B7C2D8;
    --ink-3: #8D98B0;
    --bg: #0C1220;
    --surface: #141C2E;
    --rule: #243049;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, "Geeza Pro", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 56px 120px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .16) 0 120px, transparent 121px),
    radial-gradient(circle at 10% 90%, rgba(255, 197, 61, .20) 0 140px, transparent 141px),
    linear-gradient(135deg, #2F86F0 0%, #1E63D6 55%, #174FB3 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 64px;
  background: var(--bg);
  clip-path: ellipse(75% 100% at 50% 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero__logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  padding: 10px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(8, 30, 80, .28);
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 15px;
  font-weight: 700;
}

.hero__title {
  font-size: clamp(28px, 6.2vw, 44px);
  font-weight: 800;
  line-height: 1.35;
  text-wrap: balance;
}

.hero__intro {
  max-width: 680px;
  margin: 16px auto 0;
  font-size: clamp(16px, 2.4vw, 18.5px);
  line-height: 1.9;
  color: rgba(255, 255, 255, .92);
}

/* ---------- Shared ---------- */
main { position: relative; z-index: 2; margin-top: -84px; padding-bottom: 56px; }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-title {
  font-size: clamp(22px, 3.6vw, 28px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
}
.section-title--sm { font-size: clamp(20px, 3vw, 24px); }

/* ---------- Contact ---------- */
.contact { padding: clamp(22px, 4vw, 36px); }

.contact__list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
@media (min-width: 680px) {
  .contact__list { grid-template-columns: 1fr 1fr; }
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--rule);
  min-width: 0;
}
.contact__item > div { min-width: 0; }

.contact__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.contact__icon svg { width: 26px; height: 26px; }
.contact__icon--blue { background: var(--blue-soft); color: var(--blue); }
.contact__icon--orange { background: var(--orange-soft); color: var(--orange); }

.contact__label { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.contact__value {
  font-size: clamp(17px, 2.6vw, 20px);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact__actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
@media (min-width: 520px) {
  .contact__actions { grid-template-columns: 1fr 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 22px;
  border-radius: 16px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 22px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #2F86F0, #1E63D6);
  box-shadow: 0 10px 22px rgba(30, 99, 214, .30);
}
.btn--primary:hover { box-shadow: 0 14px 28px rgba(30, 99, 214, .38); }

.btn--secondary {
  color: #fff;
  background: linear-gradient(135deg, #FF9A4D, #F07B1E);
  box-shadow: 0 10px 22px rgba(240, 123, 30, .28);
}
.btn--secondary:hover { box-shadow: 0 14px 28px rgba(240, 123, 30, .36); }

.contact__hint {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.8;
}

/* icons drawn as strokes */
.contact__icon svg, .btn svg, .topic__icon svg, .before__icon svg, .before__steps svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Topics ---------- */
.topics { margin-top: 48px; }

.topics__grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
@media (min-width: 600px) { .topics__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .topics__grid { grid-template-columns: repeat(3, 1fr); }
  .topic:last-child { grid-column: 2; }   /* seven topics: centre the last one */
}

.topic {
  padding: 22px 20px;
  transition: transform .15s ease, border-color .15s ease;
}
.topic:hover { transform: translateY(-3px); border-color: var(--blue); }

.topic__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  margin-bottom: 14px;
}
.topic__icon svg { width: 25px; height: 25px; }

.t-blue   { background: var(--blue-soft);   color: var(--blue); }
.t-sky    { background: var(--blue-soft);   color: var(--sky); }
.t-purple { background: var(--purple-soft); color: var(--purple); }
.t-green  { background: var(--green-soft);  color: var(--green); }
.t-orange { background: var(--orange-soft); color: var(--orange); }
.t-teal   { background: var(--teal-soft);   color: var(--teal); }
.t-red    { background: var(--red-soft);    color: var(--red); }

.topic__title { font-size: 19px; font-weight: 800; line-height: 1.5; }
.topic__text { margin-top: 6px; font-size: 15.5px; color: var(--ink-2); line-height: 1.8; }

/* ---------- Before contacting ---------- */
.before {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 48px;
  padding: clamp(22px, 4vw, 32px);
  border-inline-start: 5px solid var(--green);
}

.before__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
}
.before__icon svg { width: 26px; height: 26px; }

.before__text { margin-top: 6px; color: var(--ink-2); }

.before__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.before__steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.before__steps svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .before { flex-direction: column; gap: 12px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 26px calc(26px + env(safe-area-inset-bottom));
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__links a {
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__copy { font-size: 14.5px; color: var(--ink-3); }

@media (max-width: 600px) {
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
