/* ==========================================================================
   Exam Success — Arabic (RTL) layer on top of main.css
   ========================================================================== */

.exams {
  --accent: #1d7f55;
  --accent-ink: #166a47;
  --accent-soft: rgba(29, 127, 85, 0.1);
  --glow: rgba(29, 127, 85, 0.14);
  --font-sans: "IBM Plex Sans Arabic", "Geist", system-ui, sans-serif;
  --font-serif: "Amiri", "Instrument Serif", Georgia, serif;
  --font-latin: "Geist", system-ui, sans-serif;
  --font-latin-serif: "Instrument Serif", Georgia, serif;
  --fs-h2: clamp(2rem, 4.4vw, 3.9rem);
  line-height: 1.8;
}
.exams .section--dark,
.exams .theme-dark-scope {
  --accent: #5fd3a0;
  --accent-ink: #86e2bb;
  --accent-soft: rgba(95, 211, 160, 0.12);
  --glow: rgba(64, 190, 140, 0.16);
}

/* Arabic letters must not be tracked apart */
.exams *:not(.num):not(.latin) { letter-spacing: 0 !important; }
.exams .num, .exams .latin { font-family: var(--font-latin); }
.exams .latin-serif { font-family: var(--font-latin-serif); font-style: italic; }
.exams .eyebrow { font-family: var(--font-sans); font-size: 0.9rem; text-transform: none; color: var(--ink-2); }
.exams .eyebrow .idx { font-family: var(--font-latin); font-size: 0.75rem; }
.exams .h1, .exams .h2, .exams .h3 { font-weight: 600; line-height: 1.3; }
.exams .h2 em, .exams .ex-title em {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}
.exams .lead { line-height: 1.85; }
.exams .btn { font-weight: 600; font-size: 1rem; }
.exams .btn .icon { font-size: 1.15rem; }
.exams .hero__social { margin-left: 0; margin-inline-start: 4px; }
.exams .icon--flip { transform: scaleX(-1); }

/* Brand */
.ex-brand { display: inline-flex; align-items: center; gap: 12px; }
.ex-brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ex-brand span { font-family: var(--font-latin); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em !important; direction: ltr; white-space: nowrap; }
@media (max-width: 359px) { .nav .ex-brand span { display: none; } }
.exams .nav__link { font-size: 0.95rem; }

/* Hero */
.ex-hero .hero__glow { right: auto; left: -10%; }
.ex-hero .hero__grid {
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 28% 40%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 70% at 28% 40%, #000 10%, transparent 72%);
}
.ex-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.ex-badge__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.ex-badge__icon .icon { font-size: 0.85rem; }
.ex-title {
  font-size: clamp(2.5rem, 5.6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 24px;
  text-wrap: balance;
}
.ex-hero .lead { max-width: 40ch; margin-bottom: 36px; }
.ex-assure {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.ex-assure li { display: inline-flex; align-items: center; gap: 8px; }
.ex-assure .icon { color: var(--accent); }

.ex-plan {
  position: relative;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-l);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ex-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ex-plan__title { font-size: 1.35rem; font-weight: 700; line-height: 1.4; }
.ex-plan__logo {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 600ms var(--ease-out);
}
.ex-plan:hover .ex-plan__logo { transform: rotate(-4deg) scale(1.04); }
.ex-plan__logo img { width: 100%; height: 100%; object-fit: cover; }
.ex-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.ex-step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.ex-step .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 500;
}
.ex-step strong { font-weight: 600; }
.ex-plan__foot { margin-top: 18px; display: grid; gap: 10px; }
.ex-plan__bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ex-plan__bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(to left, var(--accent), color-mix(in srgb, var(--accent) 50%, transparent));
  transform-origin: 100% 50%;
  animation: ex-fill 3.6s var(--ease-in-out) infinite;
}
@keyframes ex-fill { 0% { transform: scaleX(0.08); } 70%, 100% { transform: scaleX(1); } }
.ex-plan__legend { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.85rem; }

/* Subjects */
.ex-subjects { display: grid; border-top: 1px solid var(--line); }
.ex-subject {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(28px, 3.4vw, 48px) 0;
  border-bottom: 1px solid var(--line);
}
.ex-subject__top { display: flex; justify-content: space-between; align-items: center; }
.ex-subject__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform 600ms var(--ease-out), background-color 300ms var(--ease-soft), color 300ms var(--ease-soft);
}
.ex-subject__icon .icon { font-size: 1.6rem; }
.ex-subject:hover .ex-subject__icon { transform: rotate(-6deg) scale(1.05); background: var(--accent); color: #fff; }
.ex-subject .num { color: var(--ink-3); font-size: 0.8rem; }
.ex-subject h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 700; line-height: 1.3; }
.ex-subject > p { color: var(--ink-2); }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-list li { position: relative; padding-inline-start: 26px; }
.ex-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 14px var(--accent);
}
.ex-subject__note { color: var(--ink-3); font-size: 0.95rem; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
@media (min-width: 960px) {
  .ex-subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .ex-subject { padding-inline: clamp(24px, 2.4vw, 40px); border-bottom: 0; }
  .ex-subject + .ex-subject { border-inline-start: 1px solid var(--line); }
  .ex-subject:first-child { padding-inline-start: 0; }
  .ex-subject:last-child { padding-inline-end: 0; }
}

/* Why us */
.ex-why { display: grid; border-top: 1px solid var(--line); }
.ex-why__item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px 18px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.ex-why__item .icon-wrap {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--accent);
  transition: background-color 300ms var(--ease-soft), transform 500ms var(--ease-out);
}
.ex-why__item:hover .icon-wrap { background: var(--accent-soft); transform: translateY(-2px); }
.ex-why__item .icon { font-size: 1.3rem; }
.ex-why__item h3 { font-size: 1.15rem; font-weight: 600; }
.ex-why__item p { color: var(--ink-2); }
@media (min-width: 760px) { .ex-why { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
@media (min-width: 1100px) { .ex-why { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Testimonials */
.ex-quotes { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-l); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ex-quote { display: grid; align-content: space-between; gap: 28px; padding: clamp(28px, 3.4vw, 48px); background: var(--bg); }
.ex-quote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.6;
}
.ex-quote blockquote::before { content: "”"; display: block; font-size: 3.4rem; line-height: 0.6; color: var(--accent); margin-bottom: 10px; }
.ex-quote figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.ex-quote__who { display: grid; }
.ex-quote__who strong { font-weight: 600; }
.ex-quote__who span { color: var(--ink-3); font-size: 0.9rem; }
.ex-stars { display: inline-flex; gap: 2px; color: var(--accent); }
.ex-stars .icon { font-size: 0.95rem; }
@media (min-width: 860px) { .ex-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tutor */
.ex-tutor { display: grid; gap: 32px; align-items: end; }
.ex-tutor__statement { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 500; line-height: 1.55; text-wrap: pretty; }
.ex-tutor__statement strong { font-weight: 700; color: var(--accent); }
.ex-tutor__side { display: grid; gap: 14px; color: var(--ink-2); }
.ex-tutor__years { display: flex; align-items: baseline; gap: 12px; }
.ex-tutor__years .num { font-size: clamp(4rem, 9vw, 7.5rem); font-weight: 500; letter-spacing: -0.06em; line-height: 0.9; color: var(--ink); }
@media (min-width: 960px) { .ex-tutor { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 64px; } }

/* FAQ */
.ex-faq { max-width: 880px; margin-inline: auto; border-top: 1px solid var(--line); }
.ex-faq details { border-bottom: 1px solid var(--line); }
.ex-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 250ms var(--ease-soft);
}
.ex-faq summary::-webkit-details-marker { display: none; }
.ex-faq summary:hover { color: var(--accent-ink); }
.ex-faq summary .icon-btn { width: 40px; height: 40px; flex: none; transition: transform 400ms var(--ease-out), background-color 300ms var(--ease-soft); }
.ex-faq details[open] summary .icon-btn { transform: rotate(45deg); background: var(--accent-soft); color: var(--accent); }
.ex-faq details p { padding: 0 0 26px; color: var(--ink-2); max-width: 64ch; }
.ex-faq details[open] p { animation: ex-open 500ms var(--ease-out); }
@keyframes ex-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Contact */
.ex-contact__title { font-size: clamp(2.4rem, 6vw, 5.4rem); font-weight: 700; line-height: 1.2; margin: 24px 0 clamp(40px, 5vw, 64px); max-width: 16ch; }
.ex-contact__title em { font-family: var(--font-serif); font-style: normal; color: var(--accent); }
.ex-info { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ex-info li { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ex-info .icon { color: var(--accent); font-size: 1.15rem; }
.ex-info a, .menu__footer .latin { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.ex-stamp { margin-top: 32px; display: flex; align-items: center; gap: 16px; color: var(--ink-3); }
.ex-stamp img { width: 84px; height: 84px; object-fit: cover; border-radius: 20px; background: #fff; transition: transform 500ms var(--ease-out); }
.ex-stamp:hover img { transform: rotate(-3deg) scale(1.04); }
.exams .field__label { font-family: var(--font-sans); text-transform: none; font-size: 0.9rem; }
.exams .field__input[type="email"], .exams .field__input[type="tel"] { direction: ltr; text-align: right; }

/* Footer */
.ex-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.ex-footer__credit a { color: var(--accent); font-weight: 500; }

/* Floating WhatsApp (tablet/desktop) */
.ex-wa {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: #1f9d58;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(31, 157, 88, 0.6);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-soft);
}
.ex-wa:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(31, 157, 88, 0.7); }
.ex-wa .icon { font-size: 1.35rem; }

/* Sticky CTA (phones) */
.ex-sticky {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 85;
  display: none;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.ex-sticky .btn { flex: 1 1 0; min-height: 48px; }
.ex-sticky .btn--wa { --btn-bg: #1f9d58; --btn-fg: #fff; }

@media (max-width: 700px) {
  .ex-wa { display: none; }
  .ex-sticky { display: flex; }
  .exams { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .exams .hero__actions .btn { flex: 1 1 100%; }
}
