/* =====================================================================
   Dr. Majd Safadi — ELEMENTOR BRIDGE  (dark mode)
   ---------------------------------------------------------------------
   Layer 3 of the HTML→Elementor conversion. Loaded AFTER custom.css so
   its corrections always win. Reconciles the "Bio-Digital Zen" design
   system (which targets elements by class) with Elementor's wrapper DOM
   (.e-con / .elementor-widget-container / .elementor-heading-title …).

   Scope: every rule is prefixed with .drmajd-elementor (body class added
   only on Elementor-built pages) so the static mockup template is never
   touched. Grows as each section is converted.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. Wrapper neutralisation
   ------------------------------------------------------------------ */
.drmajd-elementor .elementor-widget-container {
  margin: 0;
}
/* Heading colour/size are now set per-widget (title_color + typography) so the
   Elementor Style tab stays editable — no global heading override here. */
/* Elementor containers are flex by default; restore CSS-grid layouts.
   Only display is forced — grid-template-columns (incl. responsive)
   stays owned by custom.css. */
.drmajd-elementor .hero-grid,
.drmajd-elementor .bento,
.drmajd-elementor .ladder,
.drmajd-elementor .tier,
.drmajd-elementor .pains,
.drmajd-elementor .pain--wide,
.drmajd-elementor .ledger,
.drmajd-elementor .ledger__grid,
.drmajd-elementor .footer-grid,
.drmajd-elementor .stat-row,
.drmajd-elementor .editorial,
.drmajd-elementor .bio-stations {
  display: grid !important;
}
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover{
	border: 1px solid var(--glass-brd);
    background: var(--glass-bg-2);
}
/* The boxed inner wrapper Elementor injects must not re-introduce padding
   or width caps inside our full-bleed sections. */
.drmajd-elementor .section > .e-con-inner,
.drmajd-elementor .hero > .e-con-inner {
  width: 100%;
  max-width: none;
  padding: 0;
}

/* ---------------------------------------------------------------------
   1. Native Button  →  brand .btn
   _css_classes on a Button lands on the wrapper, so style the inner <a>.
   ------------------------------------------------------------------ */
.drmajd-elementor .btnw .elementor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.drmajd-elementor .btnw--lg .elementor-button {
  padding: 18px 42px;
  font-size: 1.05rem;
}
.drmajd-elementor .btnw--primary .elementor-button {
  background: linear-gradient(135deg, var(--teal), #5aa6ab);
  color: var(--deep);
  box-shadow: 0 10px 30px -10px var(--teal-glow);
}
.drmajd-elementor .btnw--primary .elementor-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px var(--teal-glow);
}
.drmajd-elementor .btnw--ghost .elementor-button {
  background: var(--glass-bg-2);
  color: var(--text);
  border-color: var(--glass-brd);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.drmajd-elementor .btnw--ghost .elementor-button:hover {
  border-color: var(--glass-brd-h);
  color: var(--teal);
  transform: translateY(-3px);
}
/* Button arrow icon (Font Awesome) — flips on hover like the mockup. */
.drmajd-elementor .btnw .elementor-button-icon {
  transition: transform 0.35s var(--ease);
}
.drmajd-elementor .btnw .elementor-button:hover .elementor-button-icon {
  transform: translateX(-5px);
}
.drmajd-elementor .btnw--block .elementor-button {
  width: 100%;
}

/* ---------------------------------------------------------------------
   2. Typography is now per-widget (Heading typography + Text typography),
   editable in the Style tab. The bridge only resets Elementor's default
   trailing paragraph margin so the design spacing reads correctly.
   ------------------------------------------------------------------ */
.drmajd-elementor .elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------------
   4. Pillar / card icon box  →  native Icon widget
   The Icon widget sits inside a .card-ic container; size + colour the
   glyph to match the mockup's inline SVG.
   ------------------------------------------------------------------ */
.drmajd-elementor .card-ic .elementor-icon,
.drmajd-elementor .hero-float .ic .elementor-icon {
  color: inherit;
  font-size: 26px;
  background: none;
  padding: 0;
}
.drmajd-elementor .card-ic .elementor-widget-icon,
.drmajd-elementor .hero-float .ic .elementor-widget-icon {
  width: auto;
}
.drmajd-elementor .card-ic .elementor-icon i,
.drmajd-elementor .card-ic .elementor-icon svg {
  width: 1em;
  height: 1em;
}

/* ---------------------------------------------------------------------
   5. Hero visual — Image widget must fill the absolute .frame
   ------------------------------------------------------------------ */
.drmajd-elementor .hero-visual .frame .elementor-widget-image,
.drmajd-elementor .hero-visual .frame .elementor-widget-container,
.drmajd-elementor .hero-visual .frame .elementor-image {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  margin: 0;
}
.drmajd-elementor .hero-visual .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------
   6. Story slide cards (native image + text inside)
   ------------------------------------------------------------------ */
.drmajd-elementor .story-card .elementor-widget-image,
.drmajd-elementor .story-card .elementor-widget-image .elementor-widget-container,
.drmajd-elementor .story-card .elementor-image {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  margin: 0;
}
/* Keep the text content above the photo + overlay. */
.drmajd-elementor .story-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ---------------------------------------------------------------------
   7. Footer social row  →  native Icon widgets
   ------------------------------------------------------------------ */
.drmajd-elementor .social-row .elementor-icon {
  color: inherit;
  font-size: 18px;
  background: none;
}

/* ---------------------------------------------------------------------
   8. Section-head spacing helper (wrapper-side, safe)
   ------------------------------------------------------------------ */
.drmajd-elementor .eyebrow {
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------------
   8b. Scroll-reveal entrance (mirrors the mockup's [data-reveal]).
   custom.js adds `.in` when the element scrolls into view. Forced visible
   inside the Elementor editor by functions.php.
   ------------------------------------------------------------------ */
.drmajd-elementor .dm-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  will-change: transform, opacity;
}
.drmajd-elementor .dm-reveal.in {
  opacity: 1;
  transform: none;
}
.drmajd-elementor .dm-reveal-1 { transition-delay: 0.09s; }
.drmajd-elementor .dm-reveal-2 { transition-delay: 0.18s; }
.drmajd-elementor .dm-reveal-3 { transition-delay: 0.27s; }
.drmajd-elementor .dm-reveal-4 { transition-delay: 0.36s; }
.drmajd-elementor .dm-reveal-5 { transition-delay: 0.45s; }

/* ---------------------------------------------------------------------
   9. Header / footer FULL WIDTH
   Hello Elementor's own theme CSS caps .site-header:not(.dynamic-header)
   and .site-footer:not(.dynamic-footer) at 600/800/1140px — and our HFE
   containers reuse those class names. Force them edge-to-edge. (Unscoped
   on purpose: only our HFE templates output these classes, since HFE
   replaces Hello's native header/footer.)
   ------------------------------------------------------------------ */
.site-header,
.site-footer {
  max-width: 100% !important;
  margin-inline: 0 !important;
}

/* ---------------------------------------------------------------------
   10. Stat ledger — bespoke gradient number (an EFFECT, kept in CSS).
   Size/weight are editable via the Counter widget's Number typography;
   here we only apply the gradient-fill + RTL digit order.
   ------------------------------------------------------------------ */
.drmajd-elementor .stat__counter {
  width: auto;
}
.drmajd-elementor .stat__counter .elementor-counter-number-wrapper {
  justify-content: flex-start;
  direction: ltr; /* keep prefix+digits in order (e.g. "02", "+10") in RTL */
  line-height: 0.95;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--text) 0%, var(--teal) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------------
   11. Header navigation — HFE Navigation-Menu widget → dark .nav look
   ------------------------------------------------------------------ */
/* Header bar flex distribution: brand + cta stay intrinsic, nav fills. */
.site-header .container {
  align-items: center;
}
/* Elementor gives every container/widget width:100%; override so the bar's
   three columns (logo · menu · CTA) size to content and the menu fills. */
.site-header .container > .brand,
.site-header .container > .header-cta {
  flex: 0 0 auto;
  width: auto;
}
.site-header .container > .main-nav {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}
/* Desktop (≥1025px): force the menu into a real horizontal row.
   Below the breakpoint HFE shows a hamburger + column dropdown (left as-is). */
@media (min-width: 1025px) {
  .site-header .hfe-nav-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 4px;
  }
  .site-header .hfe-nav-menu .menu-item {
    display: inline-flex !important;
    float: none !important;
    margin: 0 !important;
  }
}
/* desktop links */
.site-header .hfe-nav-menu .menu-item a.hfe-menu-item {
  color: var(--text-muted) !important;
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px !important;
  border-radius: 10px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header .hfe-nav-menu .menu-item a.hfe-menu-item:hover,
.site-header .hfe-nav-menu .menu-item.current-menu-item a.hfe-menu-item {
  color: var(--teal) !important;
  background: transparent !important;
}
/* hamburger toggle (mobile) */
.site-header .hfe-nav-menu__toggle,
.site-header .hfe-menu-toggle {
  color: var(--text) !important;
  border: 1px solid var(--glass-brd);
  background: var(--glass-bg-2);
  border-radius: 12px;
  width: 46px;
  height: 46px;
}
.site-header .hfe-nav-menu-icon svg,
.site-header .hfe-nav-menu-icon i {
  color: var(--text);
}
/* RESPONSIVE: on ≤1080px use the mockup's full-screen overlay (.mobile-nav),
   not HFE's dropdown. Hide the whole HFE widget (incl. its own toggle) and
   show the mockup hamburger; custom.js + custom.css drive the overlay. */
@media (min-width: 1081px) {
  .site-header .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}
@media (max-width: 1080px) {
  .site-header .main-nav {
    display: none !important;
  }
  /* keep the CTA visible on mobile — just smaller (per request) */
/*   .site-header .header-cta {
    display: inline-flex !important;
  } */
  .site-header .header-cta .elementor-button {
    padding: 10px 16px;
    font-size: 0.82rem;
  }
  /* shrink the logo so logo + CTA + hamburger fit the bar */
  .site-header .brand img {
    height: 52px;
  }
}
@media (max-width: 420px) {
  .site-header .header-cta .elementor-button {
    padding: 9px 13px;
    font-size: 0.76rem;
  }
  .site-header .brand img {
    height: 44px;
  }
}

/* =====================================================================
   12. Bespoke text EFFECTS (size/colour stay per-widget & editable; these
   add only the outline-stroke / italic / image-fill that Elementor controls
   can't express).
   ===================================================================== */

/* Outlined stroke numbers — bio stations + ladder tiers. */
.drmajd-elementor .station__num .elementor-heading-title {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--teal);
}
.drmajd-elementor .station:hover .station__num .elementor-heading-title {
  color: var(--teal);
}
.drmajd-elementor .tier-level .elementor-heading-title {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(114, 189, 194, 0.4);
}
.drmajd-elementor .tier:first-child .tier-level .elementor-heading-title {
  -webkit-text-stroke-color: rgba(168, 218, 220, 0.55);
}

/* RTL digit order for the about stat-box counters (number colour/size are
   set on the Counter widget). */
.drmajd-elementor .stat-box .elementor-counter-number-wrapper {
  direction: ltr;
  justify-content: center;
}

/* Editorial visual — Image widget fills the aspect-ratio frame. */
.drmajd-elementor .editorial-visual .elementor-widget-image,
.drmajd-elementor .editorial-visual .elementor-widget-image .elementor-widget-container,
.drmajd-elementor .editorial-visual .elementor-image {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  margin: 0;
}
.drmajd-elementor .editorial-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Editorial quote caption — italic effect + above the photo overlay. */
.drmajd-elementor .editorial-quote {
  z-index: 2;
}
.drmajd-elementor .editorial-quote p {
  margin: 0;
  font-style: italic;
}

/* Card number label spacing before the icon. */
.drmajd-elementor .card .card-num + .card-ic {
  margin-block-start: 14px;
}

/* Timeline node — the dot lives in an HTML widget; take it fully out of flow
   so it sits on the rail beside the heading (not pushing the heading down). */
.drmajd-elementor .timeline .tl-item > .elementor-widget-html {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  margin: 0;
}
