/* ============================================================
   Teacher page (teacher-profile.html) — design 2026-11-09 (Figma «عافر — ملف المعلم»)
   Cover + hero card, tabs, «عن المعلم» with the intro video, sections, a side contact card,
   a phone contact bar, and the CV view (#cv) that prints as the PDF.
   ============================================================ */
.tpx{ --tpx-dark:#27163A; --tpx-soft:#4F465C; --tpx-faint:#6E6580; background:#FAF8FC; padding-bottom:56px; }
.tpx p, .tpx li{ text-align:start; text-align-last:auto; }
.tpx-wrap{ width:min(1200px, calc(100% - 32px)); margin-inline:auto; }
.tpx-card{ background:#fff; border:1px solid var(--line); border-radius:20px; padding:26px 28px; }
.tpx-card > h2{ font-size:22px; margin:0 0 16px; color:var(--ink); }
.tp-muted{ color:var(--tpx-faint); line-height:1.8; margin:4px 0 0; }

/* hero */
.tpx-cover{ background:linear-gradient(90deg, #27163A, #6B3F8F); height:210px; }
.tpx-crumbs{ color:rgba(255,255,255,.82); font-size:14px; padding-top:26px; margin:0; }
.tpx-crumbs a{ color:inherit; }
.tpx-herocard{ margin-top:-110px; position:relative; background:#fff; border-radius:24px; box-shadow:0 12px 40px rgba(39,22,58,.12);
  padding:32px 36px; display:grid; grid-template-columns:auto 1fr auto; gap:28px; align-items:center; }
.tpx-avatar{ position:relative; width:156px; height:156px; border-radius:50%; border:6px solid #fff; box-shadow:0 0 0 1px var(--line); background:var(--purple-tint); display:block; }
.tpx-avatar img{ width:100%; height:100%; border-radius:50%; object-fit:cover; object-position:50% 20%; display:block; }
.tpx-avatar__initials{ display:grid; place-items:center; height:100%; font-size:44px; font-weight:800; color:var(--purple); }
.tpx-avatar__seal, .tcard__photo__seal, .tcv-photo__seal{ position:absolute; inset-inline-start:4px; bottom:6px; width:38px; height:38px; border-radius:50%; background:#1E7B4F; color:#fff;
  border:4px solid #fff; display:grid; place-items:center; font-weight:800; font-size:18px; line-height:1; box-sizing:border-box; }
.tpx-verified{ display:inline-block; background:#E6F4EC; color:#1E7B4F; font-weight:800; font-size:14px; border-radius:999px; padding:6px 14px; }
.tpx-id h1{ font-size:clamp(26px, 3vw, 36px); margin:10px 0 4px; color:var(--ink); }
.tpx-title{ font-size:19px; font-weight:600; color:var(--tpx-soft); margin:0 0 4px; }
.tpx-tagline{ color:var(--tpx-faint); margin:0 0 8px; }
.tpx-chips{ list-style:none; padding:0; margin:10px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.tpx-chips li{ background:var(--purple-tint); color:#3E2350; border-radius:999px; padding:7px 14px; font-size:14px; font-weight:600; }
.tpx-stats{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:14px 0 0; color:var(--tpx-faint); font-size:14px; }
.tpx-stats b{ color:var(--tpx-dark); font-size:20px; font-weight:800; }
.tpx-stats i{ width:1px; height:18px; background:#D8CFE5; }
.tpx-actions{ display:flex; flex-direction:column; gap:10px; min-width:260px; }
.tpx-price{ color:var(--orange); font-weight:800; margin:0; }
.tpx-actions .tpx-price{ color:var(--tpx-faint); font-weight:600; }
.tpx-price--big{ font-size:18px; }
.tp-btn{ min-height:48px; box-sizing:border-box; padding:0 22px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:14px; font:inherit; font-weight:800; text-decoration:none; cursor:pointer; border:1.5px solid transparent; }
.tp-btn--main{ background:var(--orange); color:#2B1838; }
.tp-btn--line{ background:#fff; border-color:var(--purple); color:var(--purple); }
.tpx-links{ display:flex; gap:10px; align-items:center; justify-content:center; margin:4px 0 0; color:#A69CB5; }
.tpx-links .link-btn{ font-weight:800; color:var(--purple); font-size:14px; }
.tpx .btn--dark{ background:var(--tpx-dark); color:#fff; border-radius:12px; }

/* tabs */
.tpx-tabs{ position:sticky; top:calc(var(--header-h) + 8px); z-index:30; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none;
  background:#fff; border:1px solid var(--line); border-radius:16px; padding:8px 10px; box-sizing:border-box; }
.tpx-tabs::-webkit-scrollbar{ display:none; }
.tpx-tabs a{ flex:none; padding:10px 18px; border-radius:12px; font-weight:800; font-size:15px; color:var(--tpx-soft); text-decoration:none; white-space:nowrap; }
.tpx-tabs a.is-on{ background:var(--tpx-dark); color:#fff; }

/* layout */
.tpx-layout{ display:grid; grid-template-columns:1fr 360px; gap:24px; align-items:start; margin-top:26px; }
.tpx-main{ display:flex; flex-direction:column; gap:20px; min-width:0; }
.tpx-main > section{ scroll-margin-top:calc(var(--header-h) + 80px); }
.tpx-side{ position:sticky; top:calc(var(--header-h) + 16px); display:flex; flex-direction:column; gap:16px; }
.tpx-book{ display:flex; flex-direction:column; gap:10px; }
.tpx-book > h2{ margin-bottom:4px; }
.tpx-facts{ list-style:none; padding:14px 0 0; margin:6px 0 0; border-top:1px solid var(--line); display:grid; gap:8px; color:var(--tpx-soft); }
.tpx-social{ display:flex; flex-wrap:wrap; gap:8px; }
.tpx-social a{ background:var(--purple-tint); color:#3E2350; border-radius:999px; padding:7px 14px; font-weight:700; text-decoration:none; font-size:14px; }
.tpx-trust{ background:#E6F4EC; border-radius:18px; padding:18px 22px; color:#2F5E46; }
.tpx-trust b{ color:#1E7B4F; display:block; margin-bottom:4px; }
.tpx-trust p{ margin:0; font-size:14px; line-height:1.7; }

/* about */
.tpx-video{ position:relative; aspect-ratio:16 / 9; border-radius:16px; overflow:hidden; background:#27163A; margin-bottom:16px; }
.tpx-video iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.tpx-bio{ white-space:pre-line; color:var(--tpx-soft); line-height:1.85; margin:0; }
.tpx-sub{ font-size:16px; margin:18px 0 0; }

/* services */
.tpx-services{ display:grid; gap:12px; }
.tpx-service{ display:grid; grid-template-columns:168px 1fr auto; gap:18px; align-items:center; background:#FAF8FC; border:1px solid var(--line); border-radius:16px; padding:16px; }
.tpx-service__thumb{ height:112px; border-radius:14px; background:linear-gradient(135deg, #A6408F, #27163A); color:#fff; display:grid; place-items:center; font-size:30px; }
.tpx-service__thumb--svc{ background:linear-gradient(135deg, #F15A24, #A6408F); }
.tpx-service h3{ font-size:18px; margin:8px 0 6px; }
.tpx-tag{ display:inline-block; border-radius:999px; padding:5px 12px; font-size:13px; font-weight:700; background:var(--purple-tint); color:#3E2350; }
.tpx-tag--warm{ background:#FBEFE6; color:#8A3E17; }

/* qualifications, experience, lists */
.tpx-quals{ display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.tpx-qual{ border:1px solid var(--line); border-radius:16px; padding:16px 18px; display:flex; flex-direction:column; gap:4px; }
.tpx-qual small{ color:var(--orange); font-weight:800; }
.tpx-qual b{ font-size:17px; }
.tpx-qual span{ color:var(--tpx-faint); font-size:14px; }
.tpx-lines{ list-style:none; padding:0; margin:14px 0 0; display:grid; gap:8px; }
.tpx-lines li{ display:flex; flex-wrap:wrap; gap:6px; align-items:baseline; }
.tpx-lines li[hidden]{ display:none; }
.tpx-lines span{ color:var(--tpx-faint); font-size:14px; }
.tpx-lines small{ color:#A69CB5; font-weight:700; }
.tpx-all{ margin-top:12px; font-weight:800; color:var(--purple); }
.tpx-timeline{ list-style:none; padding:0; margin:0; display:grid; gap:16px; }
.tpx-timeline li{ position:relative; padding-inline-start:28px; display:flex; flex-direction:column; gap:3px; }
.tpx-timeline li::before{ content:''; position:absolute; inset-inline-start:0; top:6px; width:14px; height:14px; border-radius:50%; background:var(--orange); }
.tpx-timeline b{ font-size:17px; }
.tpx-timeline span{ color:var(--tpx-faint); font-size:14px; }
.tpx-steps{ margin:0; padding-inline-start:22px; display:grid; gap:12px; }
.tpx-videos, .tpx-certs{ display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; }
.tpx-vtitle{ font-weight:800; margin:8px 0 0; }
.tpx-cert{ border:1px solid var(--line); border-radius:16px; padding:12px; display:flex; flex-direction:column; gap:4px; }
.tpx-cert img{ width:100%; border-radius:10px; display:block; }
.tpx-faq details{ border-bottom:1px solid var(--line); padding:12px 0; }
.tpx-faq summary{ font-weight:800; cursor:pointer; }

/* phone bar: hidden on large screens */
.tp-bar{ display:none; }

@media (max-width:980px){
  .tpx-herocard{ grid-template-columns:1fr; text-align:center; justify-items:center; padding:74px 20px 22px; margin-top:-70px; gap:12px; }
  .tpx-avatar{ position:absolute; top:-58px; left:50%; transform:translateX(-50%); width:116px; height:116px; border-width:5px; }
  .tpx-avatar__seal{ width:32px; height:32px; font-size:15px; bottom:2px; }
  .tpx-id{ display:flex; flex-direction:column; align-items:center; }
  .tpx-chips--hero, .tpx-stats{ justify-content:center; }
  .tpx-id p{ text-align:center; }
  .tpx-actions{ display:none; }
  .tpx-cover{ height:130px; }
  .tpx-crumbs{ display:none; }
  .tpx-tabs{ top:var(--header-h); border-radius:0; border:0; border-bottom:1px solid var(--line); background:#FAF8FC; padding:8px 0; margin-inline:-16px; padding-inline:16px; }
  .tpx-tabs a{ border:1px solid var(--line); border-radius:999px; background:#fff; padding:9px 14px; font-size:14px; }
  .tpx-layout{ grid-template-columns:1fr; margin-top:14px; }
  .tpx-side{ position:static; }
  .tpx-book, .tpx-trust{ display:none; }
  .tpx-card{ padding:20px; border-radius:18px; }
  .tpx-card > h2{ font-size:19px; }
  .tpx-service{ grid-template-columns:1fr; }
  .tpx-service__thumb{ height:150px; }
  .tpx-service__go{ width:100%; justify-content:center; }
  .tpx-quals{ grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:78%; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:4px; }
  .tpx-qual{ scroll-snap-align:start; }
  .tp-bar{ display:flex; gap:10px; position:fixed; inset-inline:0; bottom:0; z-index:40; background:#fff; padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 24px rgba(39,22,58,.14); }
  .tp-bar > *{ flex:1; }
  .tp-bar > .tp-btn--main{ flex:2; }
  .tpx{ padding-bottom:96px; }
}

/* ---------- the CV view (#cv): headings 18, text 14 ---------- */
.tpx-cvwrap{ background:#FAF8FC; padding:24px 16px 56px; }
.tcv{ width:min(794px, 100%); margin-inline:auto; background:#fff; border:1px solid var(--line); border-radius:20px; padding:32px clamp(18px, 5vw, 48px) 40px; box-sizing:border-box; font-size:14px; }
.tcv-bar{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:24px; }
.tcv-bar .link-btn{ font-weight:800; color:var(--purple); }
.tcv-card{ display:flex; gap:22px; align-items:center; background:var(--purple-tint); border-radius:20px; padding:24px 26px; }
.tcv-photo{ position:relative; flex:none; width:104px; height:104px; border-radius:50%; border:4px solid #fff; background:#fff; display:block; }
.tcv-photo img{ width:100%; height:100%; border-radius:50%; object-fit:cover; object-position:50% 20%; display:block; }
.tcv-photo__initials{ display:grid; place-items:center; height:100%; font-size:32px; font-weight:800; color:var(--purple); }
.tcv-photo__seal{ width:30px; height:30px; font-size:14px; border-width:3px; }
.tcv h1{ font-size:26px; margin:0 0 4px; }
.tcv-title{ font-size:15px; font-weight:600; color:#4F465C; margin:0; }
.tcv-card .tpx-chips li{ background:#fff; font-size:13px; padding:5px 12px; }
.tcv-line{ color:#6E6580; margin:10px 0 0; font-size:14px; }
.tcv-sec{ margin-top:26px; }
.tcv-sec h2{ font-size:18px; color:#27163A; margin:0 0 10px; padding-bottom:8px; position:relative; }
.tcv-sec h2::after{ content:''; position:absolute; inset-inline-start:0; bottom:0; width:48px; height:2px; background:var(--orange); }
.tcv-sec p{ font-size:14px; color:#4F465C; line-height:1.8; margin:0; white-space:pre-line; }
.tcv-list{ list-style:none; padding:0; margin:0; }
.tcv-list li{ display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px solid #EFE9F5; font-size:14px; color:#6E6580; }
.tcv-list li:last-child{ border-bottom:0; }
.tcv-list b{ color:var(--ink); }
.tcv-list small{ flex:none; color:#A69CB5; font-size:14px; font-weight:600; }
.tcv-foot{ margin-top:28px; color:#A69CB5; font-size:12px; font-weight:700; }
@media (max-width:560px){ .tcv-card{ flex-direction:column; text-align:center; } .tcv-card .tpx-chips{ justify-content:center; } }

/* «تحميل PDF» prints the CV view only (the browser offers «Save as PDF») */
@media print{
  body.is-cv .site-header, body.is-cv .site-footer, body.is-cv .skip-link, body.is-cv .back-to-top, body.is-cv .tcv-bar, body.is-cv .mobile-app-banner{ display:none !important; }
  body.is-cv .tpx-cvwrap{ background:#fff; padding:0; }
  body.is-cv .tcv{ border:0; width:100%; padding:0; }
  .tcv-list li, .tcv-card{ break-inside:avoid; }
  body:not(.is-cv) .tp-bar, body:not(.is-cv) .tpx-tabs, body:not(.is-cv) .tpx-side, body:not(.is-cv) .site-header, body:not(.is-cv) .site-footer{ display:none !important; }
}
/* share and CV on phones, where the side card is hidden */
.tpx-mlinks{ display:none; }
@media (max-width:980px){ .tpx-mlinks{ display:block; margin-top:6px; } }
