/* ====================================================================
   Webinar funnel — signup (/webinar-*) + watch (/webinar-watch-*).
   Re-skinned 2026-09-17 to the "MAG Webinar Pages" design (warm light
   signup page, dark watch page, IBM Plex Sans Arabic). Scoped to the
   webinar page-template body classes so nothing else on the site moves.
   Loaded automatically by the assets/css/pages/*.css glob in inc/enqueue.php.
   ==================================================================== */

/* ─── Tokens + page scope ────────────────────────────────────────────── */
body[class*="page-template-page-webinar"] {
  --wb-bg: #F7F6F2;
  --wb-card: #FFFFFF;
  --wb-card-2: #FBFAF7;
  --wb-well: #F1F0EB;
  --wb-ink: #15171B;
  --wb-text: #3A3F47;
  --wb-muted: #5B6068;
  --wb-faint: #9AA0A8;
  --wb-line: #E4E2DA;
  --wb-line-2: #D9D6CD;
  --wb-green: #17B26A;
  --wb-green-deep: #0F8A50;
  --wb-green-soft: #E8F7EF;
  --wb-green-bright: #3DD68C;
  --wb-amber: #F5A524;
  --wb-dark: #0F1114;
  --wb-dark-2: #171A1F;
  --wb-dark-3: #131619;
  --wb-dark-4: #20242B;
  --wb-dark-line: #2A2F37;
  --wb-dark-text: #F3F4F6;
  --wb-dark-text-2: #E5E7EB;
  --wb-dark-muted: #9AA0A8;
  --wb-font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* The theme's protected Arabic heading rule reads these variables, so
     overriding them here swaps the font on these pages without touching it. */
  --ar-display: var(--wb-font);
  --ar-body: var(--wb-font);
  --display-font: var(--wb-font);
  --body-font: var(--wb-font);

  background: var(--wb-bg);
  color: var(--wb-ink);
  font-family: var(--wb-font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}
body[class*="page-template-page-webinar"] h1,
body[class*="page-template-page-webinar"] h2,
body[class*="page-template-page-webinar"] h3 {
  font-family: var(--wb-font) !important;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
/* Neutralise the theme's generic section rhythm inside these pages;
   every block below sets its own. */
/* :where() keeps this at element specificity so each .wb-* block's own padding wins. */
body[class*="page-template-page-webinar"] main section { padding-block: 0; }
/* RTL pages can scroll toward the left if anything pokes out on that side
   (the logo marquee's track, a transformed reveal); clip it so the page can
   never be dragged sideways and shift the whole layout. */
body[class*="page-template-page-webinar"] { overflow-x: clip; }
body[class*="page-template-page-webinar"] .logos, body[class*="page-template-page-webinar"] .marquee { overflow: hidden; }
/* Gutenberg's constrained layout puts a block gap between the sections; the
   design's bands touch, so the gap goes. */
body[class*="page-template-page-webinar"] main.wp-block-group > * { margin-block: 0 !important; }
body[class*="page-template-page-webinar"] .nav-links { display: none; }

.wb-wrap { max-width: 1160px; margin-inline: auto; padding-inline: 20px; box-sizing: border-box; }

/* ─── Shared atoms ───────────────────────────────────────────────────── */
.wb-kicker { font-size: 13px; font-weight: 600; color: var(--wb-green-deep); }
.wb-h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.3; font-weight: 700; text-wrap: pretty; }
.wb-accent { color: var(--wb-green-deep); }

.wb-pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 500; }
.wb-pill { padding: 4px 12px; border-radius: 999px; background: var(--wb-card); border: 1px solid var(--wb-line); color: var(--wb-muted); }
.wb-pill--green { background: var(--wb-green-soft); color: var(--wb-green-deep); border-color: transparent; }

.wb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 12px;
  font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background 0.2s, color 0.2s, transform 0.2s;
}
.wb-btn:hover { transform: translateY(-1px); }
.wb-btn--green { background: var(--wb-green); color: #fff; }
.wb-btn--green:hover { background: var(--wb-green-deep); color: #fff; }
.wb-btn--dark { background: var(--wb-ink); color: #fff; }
.wb-btn--dark:hover { background: var(--wb-green-deep); color: #fff; }
.wb-btn--ghost { background: var(--wb-dark); color: #fff; border: 1px solid var(--wb-dark-line); min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.wb-btn--ghost:hover { border-color: var(--wb-green-bright); }
.wb-btn .wb-arrow { display: inline-block; }
body.lang-ar .wb-btn .wb-arrow { transform: scaleX(-1); }

.wb-check { display: flex; gap: 8px; align-items: flex-start; }
.wb-check::before { content: "✓"; color: var(--wb-green-deep); font-weight: 700; flex: none; line-height: inherit; }
.wb-x { display: flex; gap: 10px; align-items: flex-start; color: var(--wb-muted); }
.wb-x::before { content: "✕"; flex: none; }

.wb-stars { color: var(--wb-amber); letter-spacing: 1px; }

/* ─── Signup: hero ───────────────────────────────────────────────────── */
.wb-hero .wb-wrap { padding: 104px 20px 48px; }   /* clears the fixed site nav */
.wb-hero-grid { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.wb-hero-copy { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.wb-h1 { margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.25; font-weight: 700; text-wrap: pretty; }
.wb-lead { margin: 0; font-size: 17px; color: var(--wb-text); max-width: 56ch; text-wrap: pretty; }
.wb-lead b { color: var(--wb-ink); font-weight: 600; }
.wb-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--wb-text); }

.wb-host-mini {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; max-width: 520px;
  background: var(--wb-card); border: 1px solid var(--wb-line); border-radius: 14px;
}
.wb-host-mini-photo { width: 52px; height: 52px; border-radius: 50%; flex: none; overflow: hidden; background: var(--wb-well); }
.wb-host-mini-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.wb-host-mini-name { font-weight: 600; font-size: 15px; }
.wb-host-mini-name span { color: var(--wb-muted); font-weight: 400; font-size: 13px; }
.wb-host-mini-cred { font-size: 13px; color: var(--wb-muted); }
.wb-host-mini-cred b { color: var(--wb-ink); font-weight: 600; }

.wb-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 13px; color: var(--wb-muted); }
.wb-trust b { color: var(--wb-ink); }

/* form card: GHL owns the inside of the iframe; the chrome carries the design */
.wb-form-card {
  flex: 0 1 420px; min-width: 280px; width: 100%;
  background: var(--wb-card); border: 1px solid var(--wb-line); border-radius: 20px;
  box-shadow: 0 12px 40px -20px rgba(21, 23, 27, 0.25);
  display: flex; flex-direction: column; overflow: hidden;
}
.wb-form-head { padding: 22px 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.wb-form-kicker { font-size: 12px; font-weight: 600; color: var(--wb-green-deep); }
.wb-form-title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
.wb-form-meta { font-size: 13px; color: var(--wb-muted); }
.wb-form-bar { height: 4px; margin: 0 22px; background: var(--wb-well); border-radius: 2px; overflow: hidden; }
.wb-form-bar > span { display: block; height: 100%; width: 45%; background: var(--wb-green); }
.wb-form-body { padding: 10px 6px 0; }
.wb-form-body iframe {
  width: 100%; border: none; display: block;
  opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
  position: static !important; left: auto !important;
}
/* Floors apply only until the form has reported its real height
   (data-sized is set by webinar-gate.js); after that the exact height wins. */
.wb-form-body iframe:not([data-sized]) { min-height: 860px; }
.wb-form-note { margin: 0; padding: 12px 22px 18px; font-size: 12px; line-height: 1.6; color: var(--wb-muted); text-align: center; }

.wb-hero-cta { display: none; }

/* ─── Signup: learn ──────────────────────────────────────────────────── */
.wb-learn { background: var(--wb-card); border-top: 1px solid var(--wb-line); border-bottom: 1px solid var(--wb-line); }
.wb-learn .wb-wrap { padding-block: 52px; display: flex; flex-direction: column; gap: 28px; }
.wb-head { display: flex; flex-direction: column; gap: 6px; }
.wb-lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.wb-lesson { border: 1px solid var(--wb-line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--wb-card-2); }
.wb-lesson-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--wb-green-soft); color: var(--wb-green-deep); }
.wb-lesson h3 { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.4; }
.wb-lesson p { margin: 0; font-size: 14px; color: var(--wb-muted); text-wrap: pretty; }

/* ─── Signup: fit ────────────────────────────────────────────────────── */
.wb-fit .wb-wrap { padding-block: 52px; display: flex; flex-direction: column; gap: 24px; }
.wb-fit-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.wb-fit-card { flex: 1 1 300px; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.wb-fit-card--yes { background: var(--wb-card); border: 1px solid var(--wb-line); }
.wb-fit-card--no { background: var(--wb-well); border: 1px dashed var(--wb-line-2); }
.wb-fit-card--no .wb-fit-head { font-size: 13px; color: var(--wb-muted); font-weight: 600; }
.wb-fit-card--yes .wb-fit-head { font-size: 13px; color: var(--wb-green-deep); font-weight: 600; }

/* ─── Videos (dark) — shared by both pages ───────────────────────────── */
.wb-videos { background: var(--wb-ink); color: #fff; }
.wb-videos .wb-wrap { padding-block: 52px; display: flex; flex-direction: column; gap: 28px; }
.wb-videos-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.wb-videos .wb-kicker { color: var(--wb-green); }
.wb-videos .wb-accent { color: var(--wb-green-bright); }
.wb-rating { font-size: 13px; color: #B7BCC4; }
.wb-reels { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.wb-reel { border-radius: 14px; overflow: hidden; background: var(--wb-dark-4); display: flex; flex-direction: column; }
.wb-reel-frame { position: relative; aspect-ratio: 9 / 16; background: #262A32; }
.wb-reel-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wb-reel-meta { padding: 12px 14px; }
.wb-reel-name { font-weight: 600; font-size: 14px; }
.wb-reel-role { font-size: 12px; color: #B7BCC4; }

/* ─── Signup: host ───────────────────────────────────────────────────── */
.wb-host .wb-wrap { padding-block: 52px; }
.wb-host-grid { display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.wb-host-photo { position: relative; flex: 0 1 340px; min-width: 240px; }
.wb-host-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; border-radius: 20px; border: 1px solid var(--wb-line); }
.wb-host-photo-tag {
  position: absolute; inset-inline: 14px; bottom: 14px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--wb-line); border-radius: 12px;
  display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--wb-muted);
}
.wb-host-photo-tag b { color: var(--wb-ink); font-size: 14px; }
.wb-host-copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.wb-host-name { font-weight: 700; font-size: 20px; }
.wb-host-role { font-size: 14px; color: var(--wb-muted); }
.wb-host-bio { margin: 0; font-size: 16px; color: var(--wb-text); text-wrap: pretty; }
.wb-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.wb-stat { flex: 1 1 150px; background: var(--wb-card); border: 1px solid var(--wb-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.wb-stat-n { font-weight: 700; font-size: 24px; color: var(--wb-green-deep); }
.wb-stat-l { font-size: 13px; color: var(--wb-muted); }

/* ─── Theme patterns reused inside these pages (logos, Upwork) ───────── */
body[class*="page-template-page-webinar"] .section-label { color: var(--wb-green-deep); }
body[class*="page-template-page-webinar"] .display em { color: var(--wb-green-deep); font-style: normal; }
body[class*="page-template-page-webinar"] #upwork { padding-block: 52px; }
body[class*="page-template-page-webinar"] .pc-upwork-card { border-radius: 14px; border: 1px solid var(--wb-line); }

/* ─── Signup: bottom register (phones) ───────────────────────────────── */
.wb-head--center { text-align: center; align-items: center; }
.wb-sub { margin: 4px 0 0; font-size: 15px; color: var(--wb-muted); }
.wb-register { display: none; }

/* ─── Footer (both pages) ────────────────────────────────────────────── */
.wb-footer { border-top: 1px solid var(--wb-line); padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; font-size: 13px; color: var(--wb-muted); }
.wb-footer-link { display: inline-flex; align-items: center; gap: 6px; color: var(--wb-ink); text-decoration: none; font-weight: 500; }
.wb-footer-link:hover { color: var(--wb-green-deep); }
.wb-footer-link svg { color: var(--wb-green-deep); flex: none; }

/* ─── Sticky bar (phones) ────────────────────────────────────────────── */
.wb-sticky { display: none; }

/* ─── Watch page ─────────────────────────────────────────────────────── */
.wb-watch .wb-wrap { padding: 96px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.wb-watch-top { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.wb-watch h1 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.3; text-wrap: pretty; }
.wb-watch-lead { margin: 0; font-size: 15px; color: var(--wb-muted); text-wrap: pretty; }

.wb-watch-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.wb-watch-main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wb-player { position: relative; border-radius: 16px; overflow: hidden; background: var(--wb-ink); border: 1px solid var(--wb-line); }
.wb-player wistia-player { display: block; width: 100%; }

.wb-offer {
  flex: 1 1 300px; max-width: 420px; min-width: 280px;
  background: var(--wb-card); border: 1px solid var(--wb-line); border-radius: 20px; padding: 22px;
  box-shadow: 0 12px 40px -20px rgba(21, 23, 27, 0.25);
  box-sizing: border-box; display: flex; flex-direction: column; gap: 14px;
}
.wb-offer [data-wb-locked], .wb-offer .wb-gate { display: flex; flex-direction: column; gap: 12px; }
.wb-offer-text { margin: 0; font-size: 14px; color: var(--wb-text); }
.wb-offer-kicker { font-size: 12px; font-weight: 600; color: var(--wb-green-deep); letter-spacing: 0.02em; }
.wb-offer-title { font-size: 21px; font-weight: 700; line-height: 1.35; }
.wb-locked {
  border: 1px dashed var(--wb-line-2); border-radius: 12px; padding: 12px 14px; background: var(--wb-card-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wb-locked-label { font-size: 13px; color: var(--wb-muted); }
.wb-countdown-time { font-size: 22px; font-weight: 600; color: var(--wb-ink); direction: ltr; font-variant-numeric: tabular-nums; }
.wb-locked-track { height: 4px; border-radius: 2px; background: var(--wb-well); overflow: hidden; }
.wb-locked-track > span { display: block; height: 100%; width: 0%; background: var(--wb-green); transition: width 0.6s linear; }

.wb-gate[hidden] { display: none !important; }
[data-wb-locked][hidden] { display: none !important; }
.wb-reveal { animation: wb-rise 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) both; }
@keyframes wb-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* packages (theme card styles; only the head + grid are ours) */
.wb-packages-section .wb-wrap { padding-block: 48px; display: flex; flex-direction: column; gap: 22px; }
.wb-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
@media (min-width: 1000px) { .wb-packages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* share card */
.wb-share .wb-wrap { padding: 8px 20px 56px; }
.wb-share-card {
  background: var(--wb-card); border: 1px solid var(--wb-line); border-radius: 20px; padding: 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.wb-share-copy { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; }
.wb-share-title { margin: 0; font-weight: 700; font-size: 18px; }
.wb-share-sub { font-size: 14px; color: var(--wb-muted); }
.wb-share-url { color: var(--wb-ink); direction: ltr; unicode-bidi: embed; }
.wb-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-share-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: none; }
.wb-share-btn--wa { background: #25D366; color: var(--wb-ink); }
.wb-share-btn--li { background: #0A66C2; color: #fff; }
.wb-share-copy-btn { background: var(--wb-card); color: var(--wb-ink); border: 1px solid var(--wb-line-2); font-weight: 500; }
.wb-share-copy-btn:hover { border-color: var(--wb-green); }
.wb-share-copy-btn [hidden] { display: none !important; }

/* ─── Phones ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wb-hero .wb-wrap { padding: 96px 20px 40px; }
  .wb-hero-grid { gap: 22px; }
  .wb-hero-copy { gap: 16px; }
  .wb-h1 { font-size: 30px; }
  .wb-lead { font-size: 16px; }
  .wb-checks { flex-direction: column; gap: 8px; }
  .wb-hero-cta { display: inline-flex; width: 100%; }

  /* the form leaves the hero (moved by webinar-gate.js) and becomes the last section */
  .wb-register { display: block; background: var(--wb-card); border-top: 1px solid var(--wb-line); }
  .wb-register .wb-wrap { padding-block: 44px 56px; display: flex; flex-direction: column; gap: 18px; }
  .wb-register-slot .wb-form-card { max-width: none; flex: none; }
  .wb-form-body iframe:not([data-sized]) { min-height: 1060px; }

  .wb-learn .wb-wrap, .wb-fit .wb-wrap, .wb-videos .wb-wrap { padding-block: 40px; }
  .wb-host .wb-wrap, body[class*="page-template-page-webinar"] #upwork { padding-block: 40px; }
  .wb-host-photo { flex-basis: 100%; }

  .wb-sticky {
    display: flex; align-items: center; gap: 12px;
    position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(247, 246, 242, 0.92); backdrop-filter: blur(8px);
    border-top: 1px solid var(--wb-line);
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  .wb-sticky.is-on { transform: none; }
  .wb-sticky-text { flex: 1; min-width: 0; font-size: 12px; color: var(--wb-muted); line-height: 1.4; }
  .wb-sticky-text b { color: var(--wb-ink); font-size: 13px; display: block; }
  .wb-sticky .wb-btn { min-height: 46px; padding: 0 20px; font-size: 15px; flex: none; }

  .wb-watch .wb-wrap { padding: 90px 20px 32px; }
  .wb-offer { max-width: none; }
  .wb-share .wb-btn, .wb-share-btns { width: 100%; }
  .wb-share-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wb-share-btn { padding: 0 8px; font-size: 13px; }
}
@media (min-width: 721px) {
  .wb-hero-cta, .wb-sticky, .wb-register { display: none; }
  /* Host photo sits on the RIGHT on desktop in both languages: in LTR the
     first flex item lands on the left, so push it to the end of the row there. */
  body.lang-en .wb-host-photo { order: 2; }
  .wb-host-grid { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-reveal { animation: none; }
  .wb-btn, .wb-sticky, .wb-locked-track > span { transition: none !important; }
}
