* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; border-bottom: 1px solid var(--border); gap: 1rem; position: relative; z-index: 50; }
.brand { font-weight: 700; font-size: 1.25rem; }

.brand-link { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand-link img { height: 46px; width: auto; display: block; }
.nav nav { display: flex; align-items: center; gap: .6rem; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: .9rem; padding: .4rem .5rem; position: relative; transition: color .2s ease; }
.nav-link:hover { color: var(--text); }
/* Small hover polish for the top-bar links (About, Help, Find a teacher):
   an underline that grows outward from the center, rather than an instant
   color swap - subtle, not distracting. Scoped to <a> only; the pill-style
   <button> nav items (My sessions) already have their own filled look and
   get a gentle lift instead, just below. */
a.nav-link::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
  transition: left .2s ease, right .2s ease;
}
a.nav-link:hover::after { left: .4rem; right: .4rem; }
button.nav-link { transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
button.nav-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,.25); }
.nav-link-urgent { color: var(--danger-text); font-weight: 700; border-radius: 6px; }
.nav-link-urgent:hover { color: var(--danger-text); background: var(--danger-bg); }

/* .nav-drawer-item is layered onto either .nav-link (Find a teacher) or
   .account-menu-item (the dropdown items) - on desktop those base classes'
   own styling wins as-is (icon hidden, no extra layout); only the mobile
   media query below turns it into an icon+label row. .nav-drawer-list uses
   display:contents on desktop so it doesn't add an extra flex/block layer
   inside the existing dropdown's own flow. */
.nav-drawer-icon { display: none; }
.nav-drawer-list { display: contents; }
/* .nav-drawer-account (the colored mini-profile header) only ever exists
   inside the mobile drawer - desktop already shows the equivalent via the
   account-menu-btn pill in the top bar. No !important here, so JS's inline
   style.display stays authoritative; the mobile media query below only
   changes its LAYOUT when visible, it doesn't force visibility. */
.nav-drawer-account { display: none !important; }
@media (max-width: 720px) {
  .nav-drawer-account[style*="flex"] { display: flex !important; }
}

/* .nav-drawer-upcoming (the "class starting soon" item) shows on BOTH
   desktop and mobile, just styled differently - compact red text link in
   the desktop top bar (matching .nav-link-urgent's look), the bigger
   highlighted card only inside the mobile drawer (see the media query
   below, which restyles the same element rather than a separate one).
   Visibility itself is nav.js's inline style.display="flex"/"none", not
   forced by either rule - same reasoning as nav-drawer-account above. */
.nav-drawer-upcoming { color: var(--danger-text); font-weight: 700; text-decoration: none; border-radius: 6px; padding: .4rem .5rem; align-items: center; gap: .35rem; }
.nav-drawer-upcoming:hover { background: var(--danger-bg); }
.nav-drawer-upcoming-info { display: flex; flex-direction: column; }
.nav-drawer-upcoming-label { display: none; } /* "Upcoming class" eyebrow label is drawer-only; desktop just shows the compact text */
.nav-drawer-upcoming-join { display: none; } /* desktop has no separate "Join now" pill - the whole compact link is already the click target */

/* Class actually in progress (not just starting soon) - green like the
   Teacher/Admin dashboard's "live" convention, replacing the red
   countdown look once start time has passed, for as long as the class is
   still running. */
.nav-drawer-upcoming.nav-drawer-upcoming-live { color: var(--success-text); }
.nav-drawer-upcoming.nav-drawer-upcoming-live:hover { background: var(--success-bg); }
.nav-divider { width: 1px; height: 22px; background: var(--border); margin: 0 .35rem; }

.nav-persistent { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.lang-toggle { display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .7rem; font-size: .85rem; }
.lang-toggle span { font-weight: 600; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; background: none; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; padding: 0; align-items: center;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Mobile nav: full-height slide-out drawer, not a dropdown ----
   Opens from the inline-end edge (right in LTR, left in RTL) over a dim
   backdrop; closes on backdrop tap, Escape, or tapping any link/button
   inside (see initNavToggle in theme.js). The account section becomes a
   colored header block (avatar/name/role) at the top of the drawer instead
   of the desktop dropdown-button pattern, matching a standard mobile-app
   profile-drawer layout. */
.nav-drawer-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99;
  opacity: 0; transition: opacity .2s ease;
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-drawer-backdrop.open { display: block; opacity: 1; }

  .nav > nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 100;
    width: min(320px, 85vw); background: var(--surface);
    box-shadow: -8px 0 24px var(--shadow); padding: 0 0 1rem;
    transform: translateX(100%); transition: transform .22s ease; overflow-y: auto;
  }
  html[dir="rtl"] .nav > nav, :root[dir="rtl"] .nav > nav { transform: translateX(-100%); }
  .nav > nav.open { transform: translateX(0); }
  /* The RTL closed-state rule above is MORE specific than the plain .open
     rule (two attribute/class selectors vs one), so in Farsi it was still
     winning even after JS added .open - the drawer's transform never left
     translateX(-100%) and the menu looked like it wasn't opening at all.
     This override matches that same specificity to actually take over. */
  html[dir="rtl"] .nav > nav.open, :root[dir="rtl"] .nav > nav.open { transform: translateX(0); }

  .nav > nav .nav-link, .nav > nav .btn-ghost, .nav > nav .btn { width: 100%; text-align: start; }
  .nav-divider { display: none; }
  .nav > nav > .nav-link, .nav > nav > .nav-auth-group { margin: .2rem .75rem; }
  .nav > nav > .nav-auth-group { flex-direction: column; align-items: stretch; gap: .5rem; margin-top: .5rem; }
  /* #accountMenu (Logout) is intentionally NOT in the indented-margin rule
     above - it goes full-bleed edge-to-edge like the colored account header
     at the top, not indented like the plain list items. */
  .nav > nav > #accountMenu { margin: .5rem 0 0; }
  .account-menu-item-danger {
    background: var(--danger-bg); color: var(--danger-text); font-weight: 700;
    padding: .8rem 1.1rem; border-radius: 0;
  }
  .account-menu-item-danger:hover { background: var(--danger-bg); filter: brightness(0.95); }

  /* Colored profile header block at the top of the drawer - avatar, name,
     role, on a filled primary-color background so it reads as a distinct
     "you are here" card, matching a standard mobile drawer pattern.
     Visibility itself comes from the [style*="flex"] selector above (which
     only matches once nav.js's inline style.display="flex" is set for a
     logged-in user) - this rule is layout only. */
  .nav-drawer-account {
    align-items: center; gap: .75rem;
    background: var(--primary); color: #fff; padding: 1.25rem 1rem; margin-bottom: .5rem;
  }
  .nav-drawer-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.4); }
  .nav-drawer-account-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
  /* Was overflow:hidden + ellipsis + nowrap - in RTL (Farsi) mode that
     truncates from the START of a Latin name rather than the end (e.g.
     "Sorosh Majdeddin" showing as "...h Majdeddin"), since text-overflow's
     ellipsis side follows the container's direction, not the name's own
     script. unicode-bidi: plaintext makes each name render in ITS OWN
     detected direction (Latin names stay LTR, Persian names stay RTL)
     regardless of the surrounding RTL page, and wrapping instead of
     truncating means no part of any name is ever cut off either way. */
  .nav-drawer-name { font-weight: 700; font-size: 1rem; unicode-bidi: plaintext; overflow-wrap: break-word; }
  .nav-drawer-role { font-size: .78rem; opacity: .85; }
  .nav-drawer-edit-link {
    color: #fff; font-size: .78rem; font-weight: 600; text-decoration: none;
    border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .3rem .7rem; flex-shrink: 0;
  }
  .nav-drawer-edit-link:hover { background: rgba(255,255,255,.15); }

  /* Upcoming-class item upgrades from the compact desktop text link (base
     rule above) to a highlighted card here - same element, restyled, not a
     separate one. Visibility itself is unaffected by this block (nav.js's
     inline style.display stays authoritative either way). */
  .nav-drawer-upcoming {
    gap: .6rem; margin: 0 .75rem .5rem; padding: .7rem .8rem; border-radius: 12px;
    background: var(--danger-bg); border: 1px solid var(--danger-text);
  }
  .nav-drawer-upcoming-icon { font-size: .7rem; }
  .nav-drawer-upcoming-info { flex: 1; min-width: 0; gap: .1rem; }
  .nav-drawer-upcoming-label { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--danger-text); }
  .nav-drawer-upcoming-text { font-size: .85rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-drawer-upcoming-join {
    display: block; flex-shrink: 0; background: var(--danger-text); color: #fff; font-size: .75rem; font-weight: 700;
    padding: .35rem .7rem; border-radius: 999px;
  }

  /* Account area shouldn't need its own open/close toggle once the drawer
     is already open - that was a menu-inside-a-menu (open drawer, THEN tap
     the name to reveal items, which on mobile duplicated the colored header
     above it). Hide the desktop dropdown-button chrome entirely and show
     its (now Logout-only) content as a plain list item instead.
     !important is required here: this media-query rule and the plain
     .account-menu-btn rule later in the file have IDENTICAL specificity
     (one class each), so without it the later plain rule's display:flex
     silently wins on every screen size, including mobile - that was the
     actual bug (a second name/avatar pill showing under the drawer list). */
  .account-menu-btn { display: none !important; }
  .account-menu-dropdown { display: block !important; position: static; box-shadow: none; border: none; padding: 0; }
  .account-menu-item { padding: .65rem .75rem; }

  /* Icon+label row layout for both .nav-link items (Find a teacher) and
     .account-menu-item entries (My sessions, dashboards, Profile, etc.)
     when tagged .nav-drawer-item - the desktop-only base classes stay as
     they were, this only applies inside the drawer.

     display is deliberately NOT forced here (no bare "display: flex
     !important"). Several of these items are role-gated by nav.js, which
     sets style="display:none" directly on the element for a role that
     shouldn't see it (e.g. Teacher/Admin dashboard for a student, or
     everything when logged out). A bare !important here would beat that
     inline style unconditionally on every screen size this rule applies
     to - which is exactly the bug that shipped: Teacher/Admin dashboard
     showing for students AND for logged-out visitors on mobile, because
     this rule forced them visible regardless of what nav.js had just set.
     Gating on [style*="flex"] means the flex row layout only kicks in for
     elements nav.js has explicitly turned ON (style.display = "flex"); one
     that's plain (no inline style - e.g. "Find a teacher", always visible)
     still needs its own base display, which the second rule below covers
     via :not([style]) instead of guessing at every possible value. */
  .nav-drawer-list { display: flex; flex-direction: column; }
  .nav-drawer-item[style*="flex"], .nav-drawer-item:not([style]) { display: flex; align-items: center; gap: .75rem; }
  .nav-drawer-icon { display: block; width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }

  /* Training > Summary Writing: unlike the account-menu dropdown, this one
     stays a real tap-to-expand accordion on mobile (not force-shown) - the
     parent is a genuine nav item on its own, not a redundant trigger for
     info already shown elsewhere. Full width, no absolute positioning, and
     indented so the child reads as nested under "Training" in the drawer.
     !important is required on position/box-shadow/border/padding - this
     rule and the base (desktop) .nav-training-dropdown rule further down
     the file have IDENTICAL specificity (one class each), so without it
     the later base rule's position:absolute silently won even inside this
     media query, making the open dropdown float off and overlap whatever
     sat below it (the account menu's Profile/Logout, in practice) instead
     of sitting inline in the drawer - same class of bug the account-menu
     mobile override's own comment already documents. */
  .nav-training-btn { width: 100%; justify-content: flex-start; }
  .nav-training-dropdown {
    position: static !important; box-shadow: none !important; border: none !important; padding: 0 !important;
    margin-inline-start: 1.6rem; border-inline-start: 1px solid var(--border);
  }
  .nav-training-dropdown .nav-drawer-item { padding-inline-start: .75rem; }
}

.btn { background: var(--primary); color: #fff; border: none; padding: .6rem 1.2rem; border-radius: 6px; cursor: pointer; font-size: .95rem; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--primary-hover); }

.nav-auth-group { display: flex; align-items: center; gap: .5rem; }

.account-menu { position: relative; }
.account-menu-btn {
  display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: .3rem .9rem .3rem .3rem; cursor: pointer; color: var(--text); font-size: .85rem; font-weight: 500;
}
.account-menu-btn { transition: border-color .15s ease; }
.account-menu-btn:hover { border-color: var(--primary); }
.account-menu-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--border);
}
.account-menu-dropdown {
  display: none; position: absolute; top: calc(100% + .5rem); right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 20px var(--shadow); padding: .4rem; z-index: 100;
}
:root[dir="rtl"] .account-menu-dropdown, html[dir="rtl"] .account-menu-dropdown { right: auto; left: 0; }
/* display:none stays the hiding mechanism (unchanged - the mobile
   `display: block !important` override above still works exactly as
   before); this only adds a one-shot entrance animation for the moment it
   switches to visible, which `transition` can't do across a display
   change but a keyframe `animation` can. */
.account-menu.open .account-menu-dropdown { display: block; animation: accountMenuPop .16s ease; }
@keyframes accountMenuPop {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* "Training" nav parent > Summary Writing child - same open/close mechanics
   as .account-menu above (click to toggle, click-outside to close), styled
   as a dropdown on desktop. On mobile this becomes a plain tap-to-expand
   accordion instead (see the @media override near .nav-drawer-list). */
.nav-training-menu { position: relative; }
.nav-training-btn { background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; }
.nav-training-caret { font-size: .65rem; margin-inline-start: .25rem; transition: transform .15s ease; display: inline-block; }
.nav-training-menu.open .nav-training-caret { transform: rotate(180deg); }
.nav-training-dropdown {
  display: none; position: absolute; top: calc(100% + .5rem); left: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 20px var(--shadow); padding: .4rem; z-index: 100;
}
:root[dir="rtl"] .nav-training-dropdown, html[dir="rtl"] .nav-training-dropdown { left: auto; right: 0; }
.nav-training-menu.open .nav-training-dropdown { display: block; animation: accountMenuPop .16s ease; }
.nav-training-dropdown .nav-drawer-item { padding: .55rem .7rem; border-radius: 6px; }
.nav-training-dropdown .nav-drawer-item:hover { background: var(--surface-alt); }
.account-menu-item {
  display: block; width: 100%; text-align: start; background: none; border: none;
  padding: .55rem .7rem; border-radius: 6px; cursor: pointer; color: var(--text);
  font-size: .88rem; text-decoration: none; transition: background .12s ease;
}
.account-menu-item:hover { background: var(--border); }
.account-menu-item-danger { color: var(--danger-text); }
.account-menu-divider { height: 1px; background: var(--border-subtle); margin: .3rem 0; }

.verify-banner {
  display: none; align-items: center; justify-content: center; gap: 1rem;
  background: #fef3c7; color: #92400e; padding: .6rem 1rem; text-align: center;
  font-size: .88rem; flex-wrap: wrap;
}
:root[data-theme="dark"] .verify-banner { background: #451a03; color: #fcd34d; }
.verify-banner button {
  background: #92400e; color: #fff; border: none; border-radius: 6px;
  padding: .35rem .8rem; font-size: .82rem; cursor: pointer;
}
:root[data-theme="dark"] .verify-banner button { background: #b45309; }
.verify-banner button:disabled { opacity: .6; cursor: default; }

.btn-ghost {
  color: var(--text); background: transparent; border: 1px solid var(--border);
  padding: .5rem 1rem; border-radius: 6px; cursor: pointer; font-size: .85rem;
  text-decoration: none; display: inline-block; transition: border-color .15s, background .15s;
}
.btn-ghost:hover { border-color: var(--primary); background: var(--surface); }
.btn-ghost-lg { padding: .75rem 1.4rem; font-size: .95rem; }

.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero-actions-left { justify-content: flex-start; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; border-radius: 999px; }
.btn-sm { padding: .4rem .85rem; font-size: .82rem; border-radius: 8px; }

/* ---- Modern hero (matches mockup: headline+CTAs+trust row left, photo+stat-cards right) ---- */
.hero-modern-wrap {
  background-image:
    linear-gradient(100deg, rgba(15,23,42,.82) 0%, rgba(15,23,42,.58) 32%, rgba(15,23,42,.12) 58%, rgba(15,23,42,0) 70%),
    url('images/bg-plexus-dark.jpg');
  background-size: cover, cover; background-position: center top, center top; background-repeat: no-repeat, no-repeat;
}
:root[data-theme="light"] .hero-modern-wrap {
  background-image:
    linear-gradient(100deg, rgba(248,250,252,.88) 0%, rgba(248,250,252,.62) 32%, rgba(248,250,252,.14) 58%, rgba(248,250,252,0) 70%),
    url('images/bg-plexus-light.jpg');
}
.hero-modern {
  max-width: 1160px; margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center;
}
.hero-modern-text h1 {
  font-size: 2.6rem; line-height: 1.15; margin: 0 0 1rem; font-weight: 800; color: var(--text);
}
.hero-modern-text h1 span { color: var(--primary); }
.hero-modern-sub { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; margin: 0 0 1.6rem; max-width: 480px; }

.hero-trust-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.hero-trust-item { display: flex; align-items: center; gap: .6rem; }
.hero-trust-icon {
  width: 34px; height: 34px; border-radius: 50%; background: var(--available-bg);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-trust-item:hover .hero-trust-icon { transform: scale(1.14) rotate(-6deg); box-shadow: 0 6px 16px var(--shadow); }
.hero-trust-item div { display: flex; flex-direction: column; line-height: 1.3; }
.hero-trust-item strong { font-size: .85rem; color: var(--text); }
.hero-trust-item span { font-size: .78rem; color: var(--text-faint); }

@media (prefers-reduced-motion: no-preference) {
  .hero-trust-item { opacity: 0; animation: heroTrustIn .6s ease forwards; }
  .hero-trust-item:nth-child(1) { animation-delay: .5s; }
  .hero-trust-item:nth-child(2) { animation-delay: .65s; }
  .hero-trust-item:nth-child(3) { animation-delay: .8s; }
}
@keyframes heroTrustIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-modern-media { position: relative; }
.hero-modern-photo {
  width: 100%; aspect-ratio: 4 / 3.1; border-radius: 20px; background-size: cover; background-position: center;
  background-color: var(--surface-alt); position: relative; box-shadow: 0 20px 40px var(--shadow);
  background-image: url('images/hero-teacher-dark.jpg?v=20261010a');
}
:root[data-theme="light"] .hero-modern-photo {
  background-image: url('images/hero-teacher-light.jpg?v=20261010a');
}
.hero-live-badge {
  position: absolute; top: 1rem; right: 1rem; background: var(--surface); color: var(--text);
  font-size: .8rem; font-weight: 600; padding: .4rem .8rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .4rem; box-shadow: 0 4px 12px var(--shadow);
}
.hero-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; display: inline-block; }

.hero-modern-stats {
  display: flex; gap: .8rem; margin-top: -2.5rem; position: relative; z-index: 1;
  padding: 0 1rem; flex-wrap: wrap;
}
.hero-stat-card {
  flex: 1; min-width: 120px; background: var(--surface); border-radius: 14px; padding: .9rem 1rem;
  box-shadow: 0 8px 20px var(--shadow); border: 1px solid #fdb201;
}
.hero-stat-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.hero-stat-label { font-size: .76rem; color: var(--text-muted); margin-top: .1rem; }

@media (max-width: 860px) {
  .hero-modern { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-modern-text h1 { font-size: 2rem; }
  .hero-modern-text, .hero-modern-media { text-align: left; }
  .hero-actions-left { justify-content: center; }
  .hero-modern-text h1, .hero-modern-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-trust-row { justify-content: center; }
}

/* ---- Brand break: full-bleed section divider between teachers grid and trust bar ---- */
.brand-break {
  min-height: 260px; margin-bottom: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  background-image: url('images/bg-plexus-dark.jpg');
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
:root[data-theme="light"] .brand-break {
  background-image: url('images/bg-plexus-light.jpg');
}
.brand-break-logo {
  height: 84px; width: auto;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.35));
  animation: brandBreathe 5s ease-in-out infinite;
}
@keyframes brandBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-break-logo { animation: none; }
}
@media (max-width: 860px) {
  .brand-break { min-height: 180px; }
  .brand-break-logo { height: 60px; }
}

/* ---- Public "trust bar" strip (satisfaction / payments / support / fees) ---- */
.trust-bar-section { max-width: 1100px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.trust-bar {
  background: var(--surface-alt); border: 1px solid var(--border-subtle); border-radius: 18px;
  padding: 1.75rem 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
}
.trust-bar-item { display: flex; align-items: flex-start; gap: .8rem; }
.trust-bar-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
  box-shadow: 0 1px 3px var(--shadow);
}
.trust-bar-item div { display: flex; flex-direction: column; gap: .15rem; }
.trust-bar-item strong { font-size: .92rem; color: var(--text); }
.trust-bar-item span { font-size: .8rem; color: var(--text-muted); }

/* ---- Showcase section (apple.com-style feature cards) ---- */
.showcase-wrap {
  position: relative; overflow: hidden;
  background:
    radial-gradient(640px 320px at 12% 20%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 70%),
    radial-gradient(560px 300px at 88% 80%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%);
}
.showcase-section { max-width: 1100px; margin: 0 auto; padding: 4rem 1.5rem; position: relative; }
.showcase-section h2 { text-align: center; font-size: 1.7rem; margin-bottom: 2rem; }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.showcase-card {
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 16px;
  padding: 2rem 1.6rem; text-align: center; box-shadow: 0 2px 10px var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.showcase-card:hover {
  transform: translateY(-6px); box-shadow: 0 16px 32px var(--shadow); border-color: var(--primary);
}
.showcase-icon {
  font-size: 2.4rem; margin-bottom: .8rem; display: inline-block;
  transition: transform .3s ease;
}
.showcase-card:hover .showcase-icon { transform: scale(1.18) rotate(-4deg); }
.showcase-card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.showcase-card p { margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.5; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.showcase-grid .reveal:nth-child(2) { transition-delay: .1s; }
.showcase-grid .reveal:nth-child(3) { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
  .showcase-section h2 { font-size: 1.35rem; }
}


.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 3rem 1.5rem 2rem; background: var(--surface-alt); }
.footer-inner { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2.5rem; }

.footer-brand-block { max-width: 320px; }
.footer-logo { height: 72px; width: auto; display: block; margin-bottom: .85rem; }
.footer-tagline { color: var(--text-muted); font-size: .85rem; margin: 0; }

.footer-links {
  display: flex; gap: 2.5rem; padding: 0 2.5rem;
  border-inline: 1px solid var(--border-subtle);
}
.footer-col h4, .footer-office h4 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); margin: 0 0 .7rem; font-weight: 600;
}
.footer-col-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.footer-col a, .footer-office-city, .footer-email {
  color: var(--text-muted); font-size: .88rem; text-decoration: none;
}
.footer-col a:hover, .footer-email:hover { color: var(--primary); }
.footer-col-links a:not(:last-child)::after { content: "|"; margin-inline-start: .5rem; color: var(--border); }
.footer-office-city { display: block; margin: 0 0 .35rem; }

.footer-enamad { display: flex; align-items: center; justify-content: center; }
.footer-enamad a {
  display: block; width: 100px; height: 100px; padding: 4px;
  border: 1px solid var(--border-subtle); border-radius: 6px; background: #fff;
}
.footer-enamad img { display: block; width: 100%; height: 100%; }

.footer-bottom { max-width: 1000px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); color: var(--text-faint); font-size: .8rem; }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; }
  .footer-brand-block { max-width: none; }
  .footer-links { border-inline: none; padding: 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); padding: 1.5rem 0; }
}

/* About/Help/Contact - same premium plexus background as the homepage and
   dashboard (explicit request: "nice background... like site and
   homepage"), kept to a readable-but-visible overlay since this is mostly
   plain paragraph text with no card wrapping it (unlike the dashboard,
   where solid stat-card backgrounds could absorb a stronger texture). */
body.plexus-page {
  background-image:
    linear-gradient(180deg, rgba(15,23,42,.72), rgba(15,23,42,.85)),
    url('images/bg-plexus-dark.jpg');
  background-size: cover; background-position: center top; background-repeat: no-repeat; background-attachment: fixed;
}
:root[data-theme="light"] body.plexus-page {
  background-image:
    linear-gradient(180deg, rgba(248,250,252,.72), rgba(248,250,252,.85)),
    url('images/bg-plexus-light.jpg');
}

.simple-page { max-width: 720px; margin: 3rem auto; padding: 0 1.5rem; }
.simple-page h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.simple-page .lead { color: var(--text-muted); margin-bottom: 2rem; }
.simple-page section { margin-bottom: 2rem; }
.simple-page h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.simple-page p { color: var(--text-muted); line-height: 1.6; }

.bio-card {
  display: flex; gap: 2rem; background: var(--surface); border-radius: 14px; padding: 2rem; margin-bottom: 2rem;
  box-shadow: 0 1px 3px var(--shadow); border: 1px solid #fdb201; align-items: flex-start;
  transition: transform .3s ease, box-shadow .3s ease;
}
.bio-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(253,178,1,.2); }
.bio-card img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--primary); }
.bio-card h2 { margin: 0 0 .25rem; }
.bio-card .bio-title { color: var(--primary); font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.bio-card ul { margin: .75rem 0 0; padding-inline-start: 1.1rem; color: var(--text-muted); font-size: .9rem; line-height: 1.7; }

.help-item {
  margin-bottom: 1.25rem; background: var(--surface); border: 1px solid #fdb201; border-radius: 12px;
  padding: 1.1rem 1.3rem; box-shadow: 0 1px 3px var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.help-item:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(253,178,1,.18); }
.help-item h3 { font-size: 1rem; margin: 0 0 .35rem; }
.help-item p { color: var(--text-muted); line-height: 1.6; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .bio-card, .help-item, .contact-form {
    opacity: 0; animation: simplePageCardIn .6s ease forwards;
  }
  .simple-page .help-item:nth-child(1) { animation-delay: .05s; }
  .simple-page .help-item:nth-child(2) { animation-delay: .12s; }
  .simple-page .help-item:nth-child(3) { animation-delay: .19s; }
  .simple-page .help-item:nth-child(4) { animation-delay: .26s; }
  .simple-page .help-item:nth-child(5) { animation-delay: .33s; }
}
@keyframes simplePageCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .simple-page { margin: 2rem auto; padding: 0 1rem; }
  .simple-page h1 { font-size: 1.5rem; }
  .bio-card { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; gap: 1rem; }
  .bio-card img { width: 110px; height: 110px; }
  .bio-card ul { text-align: start; }
}

.cms-cover-image {
  width: 100%; max-height: 340px; object-fit: cover; object-position: top center;
  border-radius: 14px; margin-bottom: 1.5rem; border: 1px solid var(--border-subtle);
}

.page-editor-content { color: var(--text-muted); line-height: 1.6; }
.page-editor-content h2 { font-size: 1.15rem; margin: 1.25em 0 .4em; color: var(--text); }
.page-editor-content h3 { font-size: 1rem; margin: 1em 0 .4em; color: var(--text); }
.page-editor-content ul, .page-editor-content ol { padding-inline-start: 1.4rem; }
.page-editor-content a { color: var(--primary); }
.page-editor-content img { max-width: 100%; border-radius: 8px; margin: .5rem 0; }
.page-editor-content font[size="2"] { font-size: .85rem; }
.page-editor-content font[size="3"] { font-size: 1rem; }
.page-editor-content font[size="5"] { font-size: 1.5rem; }
.page-editor-content font[size="7"] { font-size: 2.25rem; }

.contact-whatsapp-card {
  display: none; align-items: center; gap: .9rem; text-decoration: none; color: var(--text);
  background: rgba(37,211,102,.1); border: 1px solid #25D366; border-radius: 14px;
  padding: 1rem 1.3rem; margin-bottom: 1.5rem; transition: transform .2s ease, box-shadow .2s ease;
}
.contact-whatsapp-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37,211,102,.2); }
.contact-whatsapp-icon { flex-shrink: 0; }
.contact-whatsapp-card strong { display: block; font-size: .98rem; }
.contact-whatsapp-sub { display: block; color: var(--text-muted); font-size: .85rem; margin-top: .1rem; }

.contact-category-heading { font-weight: 600; margin: 1.5rem 0 .75rem; }
.contact-category-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.contact-category-pill {
  padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: .9rem; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.contact-category-pill:hover { border-color: var(--primary); }
.contact-category-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.contact-category-hint { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.5rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; background: var(--surface); border-radius: 14px; padding: 2rem; box-shadow: 0 1px 3px var(--shadow); border: 1px solid #fdb201; }
.contact-form label { font-size: .85rem; color: var(--text-muted); margin-bottom: -.5rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .6rem .8rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); font-family: inherit; font-size: .95rem;
}
.contact-form input[type="file"] { padding: .4rem 0; border: none; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button[type="submit"] { align-self: flex-start; }
.contact-form-row { display: flex; gap: 1rem; }
.contact-form-row .contact-form-field { flex: 1; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 600px) {
  .contact-form-row { flex-direction: column; gap: 1rem; }
}

.help-item { margin-bottom: 1.5rem; }
.help-item h3 { font-size: 1rem; margin-bottom: .35rem; }
.help-item p { color: var(--text-muted); line-height: 1.6; margin: 0; }

dialog { border: none; border-radius: 10px; padding: 1.5rem; width: 320px; background: var(--surface); color: var(--text); }
#reportModal, #rateModal, #viewRatingModal { width: min(560px, 90vw); max-width: 560px; }
#bookingDialog { width: min(920px, 94vw); max-width: 920px; max-height: 88vh; overflow-y: auto; }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog form label { display: block; margin: .75rem 0 .25rem; font-size: .85rem; }
dialog form input { width: 100%; padding: .5rem; border-radius: 6px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); }
.actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }
.actions button { padding: .5rem 1rem; border-radius: 6px; border: none; cursor: pointer; }
#submitBtn { background: var(--primary); color: #fff; }
#cancelBtn { background: transparent; color: var(--text-muted); }
.error { color: var(--danger-text); font-size: .85rem; min-height: 1em; }

/* ===== Desktop top menu, tidied =====
   One line, every item the same style (the <button> items used to render as filled
   pills next to plain links), compact upcoming-class pill, shorter account button.
   Desktop only - the mobile drawer (max-width: 720px) is untouched. */
@media (min-width: 721px) {
  .nav { padding: .7rem 1.5rem; gap: .75rem; }
  .brand-link { order: 0; }
  .nav-persistent { order: 1; margin-left: 0; }
  .nav nav { order: 2; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; gap: .15rem .1rem; }

  .nav nav .nav-link, .nav nav .nav-training-btn, .nav nav button.nav-link {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    font-size: .82rem; font-weight: 600; padding: .45rem .7rem; border-radius: 8px;
    background: transparent; color: var(--text-muted); border: none; box-shadow: none; transform: none;
    cursor: pointer; text-decoration: none; font-family: inherit;
  }
  .nav nav .nav-link:hover, .nav nav .nav-training-btn:hover, .nav nav button.nav-link:hover {
    background: var(--surface-alt); color: var(--text); transform: none; box-shadow: none;
  }
  .nav nav a.nav-link::after { display: none; }
  .nav nav .nav-link.is-active { background: rgba(99,102,241,.14); color: var(--primary); }

  /* "class starting soon / live" - a small pill instead of a long red text link */
  .nav nav .nav-drawer-upcoming {
    display: inline-flex; white-space: nowrap; padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
    background: var(--danger-bg); border: 1px solid var(--danger-text);
  }
  .nav nav .nav-drawer-upcoming.nav-drawer-upcoming-live { background: var(--success-bg); border-color: var(--success-text); }
  .nav nav .nav-drawer-upcoming-info { flex-direction: row; }

  /* account button: avatar + a short name, set apart from the links by a thin divider */
  .nav nav .account-menu { margin-inline-start: .5rem; padding-inline-start: .75rem; border-inline-start: 1px solid var(--border); }
  #accountMenuName { font-size: .8rem; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-menu-btn { white-space: nowrap; }
}
@media (min-width: 721px) {
  .lang-toggle { flex-direction: row; white-space: nowrap; gap: .35rem; padding: .38rem .65rem; font-size: .78rem; }
}
@media (min-width: 721px) and (max-width: 1380px) {
  #accountMenuName { display: none; }
  .account-menu-btn { padding: .3rem; }
}
@media (min-width: 721px) and (max-width: 1200px) {
  .nav nav .nav-link, .nav nav .nav-training-btn, .nav nav button.nav-link { padding: .42rem .55rem; font-size: .8rem; }
}

/* Desktop: no "class starting soon" pill in the menu - the Dashboard item carries a blinking red dot instead
   (the mobile drawer keeps its card). */
@media (min-width: 721px) {
  .nav nav .nav-drawer-upcoming { display: none !important; }
  .nav nav .nav-link.has-upcoming::before {
    content: ""; position: absolute; top: .22rem; inset-inline-end: .12rem; width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger-text); box-shadow: 0 0 0 2px var(--surface, #fff); animation: navDot 1.4s ease-in-out infinite;
  }
}
@media (max-width: 720px) {
  .nav nav .nav-link.has-upcoming::before {
    content: ""; position: absolute; top: .55rem; inset-inline-end: .9rem; width: 9px; height: 9px; border-radius: 50%; background: var(--danger-text);
  }
}
@keyframes navDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .nav nav .nav-link.has-upcoming::before { animation: none; } }
