/* «تعليمي» page (Amer, 2026-12-02): section tabs, the letter grid, the word chips. The rest comes from the doc/reels editor styles. */
.edu-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 auto 22px; padding: 0 16px; max-width: 900px; }
.edu-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(255, 122, 0, .35); background: #fff; color: #3a2a1c; font: 700 15px "IBM Plex Sans Arabic", system-ui, sans-serif; cursor: pointer; }
.edu-tab i { font-style: normal; font-family: "Baloo Bhaijaan 2", system-ui, sans-serif; font-size: 16px; }
.edu-tab.on { background: linear-gradient(135deg, #ffa23f, #ff7a00 55%, #f06400); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(255, 122, 0, .3); }
.edu-tab:disabled { opacity: .55; cursor: default; }
.edu-tab em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #f2ede8; color: #8a7f75; }

.edu-lang { margin-bottom: 12px; }
.edu-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.edu-grid.en { direction: ltr; }
.edu-grid button { aspect-ratio: 1; border-radius: 14px; border: 1.5px solid rgba(255, 122, 0, .25); background: #fff; color: #3a2a1c; font: 800 24px/1 "Baloo Bhaijaan 2", system-ui, sans-serif; cursor: pointer; transition: transform .15s, background .15s; }
.edu-grid button:hover { transform: translateY(-2px); }
.edu-grid button.on { background: #ff7a00; color: #fff; border-color: #ff7a00; box-shadow: 0 6px 14px rgba(255, 122, 0, .35); }

.edu-words { display: flex; flex-wrap: wrap; gap: 8px; }
.edu-words button { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px 0 10px; border-radius: 999px; border: 1.5px solid rgba(0, 0, 0, .1); background: #fff; color: #3a2a1c; font: 700 16px "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", system-ui, sans-serif; cursor: pointer; opacity: .6; }
.edu-words button.on { opacity: 1; border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255, 122, 0, .18); }
.edu-words img { width: 34px; height: 34px; }
.group h3 small { font-size: 12px; font-weight: 600; opacity: .6; }
.edu-credit { display: block; margin: 6px 4px 0; font-size: 11px; opacity: .5; }
@media (max-width: 430px) { .edu-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; } .edu-grid button { font-size: 21px; } .edu-tab { height: 42px; padding: 0 14px; font-size: 14px; } }
/* language switch: its own pill (the shared .seg is styled only inside .quality) */
.edu-lang { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff3e6; border: 1px solid rgba(255, 122, 0, .25); }
.edu-lang .glider { display: none; }
.edu-lang button { height: 38px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: #8a5a2a; font: 700 15px "IBM Plex Sans Arabic", system-ui, sans-serif; cursor: pointer; }
.edu-lang button.on { background: #ff7a00; color: #fff; box-shadow: 0 4px 10px rgba(255, 122, 0, .3); }
/* each switch on its own line (they sat side by side) */
.edu .look .toggle { display: flex; width: 100%; margin: 14px 0 0; }
.edu .look .swatches { margin-bottom: 6px; }
.edu .look .quality { margin-top: 18px; }

/* ---- the new sections (Amer, 2026-12-03): tab strip, pill switches, chips, the certificate ---- */
.edu-tabs { max-width: 1040px; }
.edu-tab b { font-weight: 700; }
@media (max-width: 640px) {
  /* one swipeable strip on phones instead of four rows of tabs */
  .edu-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 4px 14px 10px; margin-bottom: 14px; -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
  .edu-tabs::-webkit-scrollbar { display: none; }
  .edu-tab { flex: none; }
}
.edu-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: #fff3e6; border: 1px solid rgba(255, 122, 0, .25); }
.edu-seg button { height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: #8a5a2a; font: 700 15px "IBM Plex Sans Arabic", "Baloo Bhaijaan 2", system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.edu-seg button.on { background: #ff7a00; color: #fff; box-shadow: 0 4px 10px rgba(255, 122, 0, .3); }
.group > .edu-seg { margin-bottom: 12px; }
.edu-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.edu-row > span { font-weight: 700; font-size: 14px; opacity: .75; }
.edu-shuffle { height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px dashed #ff7a00; background: #fff; color: #d65f00; font: 700 14px "IBM Plex Sans Arabic", system-ui, sans-serif; cursor: pointer; }
.edu-shuffle:active { transform: scale(.97); }
.edu-sub { margin-top: 14px; font-size: 14px; }
.edu-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .12); flex: none; }
.edu-words svg { flex: none; }
.edu-words .edu-ar { font: 600 12px "IBM Plex Sans Arabic", sans-serif; opacity: .65; }
.edu-cats { margin-bottom: 4px; }
.edu-cats button { opacity: 1; }
.edu-cats button.on { background: #fff3e6; }
.edu-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 14px; }
.edu-field small { font-weight: 600; opacity: .6; font-size: 12px; }
.edu-field input, .edu-field textarea { width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 14px; border: 1.5px solid rgba(255, 122, 0, .25); background: #fff; color: #2a1d12; font: 600 16px "IBM Plex Sans Arabic", system-ui, sans-serif; resize: vertical; }
.edu-field input:focus, .edu-field textarea:focus { outline: none; border-color: #ff7a00; box-shadow: 0 0 0 3px rgba(255, 122, 0, .15); }
.group > .edu-row:first-of-type { margin-top: 12px; }

/* the certificate: preview (scaled to the column) and print */
.ed-grid.edu-cert { grid-template-columns: minmax(0, 1fr) 380px; }
.edu-cert .preview { width: 100%; }
.cert-wrap { position: relative; width: 100%; aspect-ratio: 1123 / 794; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 24px 50px rgba(30, 60, 90, .22); }
.cert-scale { position: absolute; top: 0; right: 0; width: 1123px; height: 794px; transform-origin: top right; }
.cert-page { position: relative; width: 1123px; height: 794px; overflow: hidden; background: #fff; color: #2b2340; direction: rtl; font-family: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cert-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cert-frame { position: absolute; inset: 26px; display: flex; flex-direction: column; align-items: center; padding: 34px 70px 0; border: 10px solid var(--a); border-radius: 40px; box-sizing: border-box; }
.cert-frame::before { content: ""; position: absolute; inset: 10px; border: 3px dashed var(--b); border-radius: 30px; pointer-events: none; }
.cert-kicker { padding: 4px 28px; border-radius: 999px; background: var(--s); color: var(--a); font-weight: 800; font-size: 26px; }
.cert-title { margin-top: 2px; font-weight: 800; font-size: 118px; line-height: 1.15; color: var(--a); text-shadow: 0 6px 0 var(--b); }
.cert-line { font: 600 25px "IBM Plex Sans Arabic", sans-serif; color: #5b5370; }
.cert-line b { color: #2b2340; font-weight: 700; }
.cert-name { min-width: 540px; max-width: 900px; margin: 4px 0 12px; padding: 0 30px; border-bottom: 4px dotted var(--b); text-align: center; font-weight: 800; font-size: 62px; line-height: 1.35; white-space: nowrap; overflow: hidden; }
.cert-foot { position: absolute; left: 60px; right: 60px; bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; }
.cert-col { display: flex; flex-direction: column; align-items: center; width: 280px; margin-bottom: 22px; }
.cert-col span { width: 100%; min-height: 44px; border-bottom: 3px solid #e3dcef; text-align: center; font-weight: 800; font-size: 28px; line-height: 1.5; white-space: nowrap; overflow: hidden; }
.cert-col i { margin-top: 4px; font: 600 17px "IBM Plex Sans Arabic", sans-serif; font-style: normal; color: #8a8396; }
.cert-date { position: absolute; top: 22px; left: 34px; font: 600 17px "IBM Plex Sans Arabic", sans-serif; color: #8a8396; }
#edu-print { display: none; }
@media (max-width: 900px) { .ed-grid.edu-cert { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#edu-print) { display: none !important; }
  #edu-print { display: block !important; }
  #edu-print .cert-page { width: 297mm; height: 210mm; break-after: page; page-break-after: always; }
  #edu-print .cert-page:last-child { break-after: auto; page-break-after: auto; }
}
/* the voice is always on (Amer, 2026-12-03): a plain line instead of the switch */
.edu .edu-voice { margin: 4px 0 2px; font-size: 14px; font-weight: 700; color: var(--ink, #2a1d12); opacity: .85; }
/* «زبط الأزرار» (Amer, 2026-12-03): on phones the sections are a neat grid of small tiles (icon over name), all visible,
   instead of the sideways strip that cut the active one off */
@media (max-width: 640px) {
  .edu-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px; overflow: visible; padding: 4px 12px 0; margin-bottom: 18px; -webkit-mask: none; mask: none; }
  .edu-tab { height: auto; min-height: 64px; padding: 9px 4px 8px; border-radius: 16px; flex-direction: column; justify-content: center; gap: 4px; font-size: 12.5px; line-height: 1.25; text-align: center; }
  .edu-tab i { font-size: 17px; line-height: 1; }
  .edu-tab.on { box-shadow: 0 6px 14px rgba(255, 122, 0, .28); }
  .edu-tab em { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 9.5px; padding: 1px 6px; white-space: nowrap; }
}
