/* ================================================================
   HERO — emotional entry + strong product highlight.
   The wave is STRUCTURAL: it defines the bottom of the hero and
   leads into the next section. Not a decorative divider.
   ================================================================ */
.hero {
  position: relative;
  padding: 72px 0 200px;
  background:
    radial-gradient(
      900px 540px at 92% 40%,
      rgba(var(--adah-accent-rgb), .42) 0%,
      rgba(var(--adah-accent-rgb), .18) 38%,
      transparent 72%
    ),
    radial-gradient(700px 420px at 6% 40%, rgba(var(--adah-secondary-rgb), .25), transparent 60%),
    var(--adah-surface-cream);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 2; }
.hero-inner > * { min-width: 0; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: var(--adah-t-eyebrow); letter-spacing: .12em;
  color: var(--adah-primary); text-transform: uppercase;
  padding: 6px 14px; background: rgba(var(--adah-primary-rgb),.08);
  border: 1px solid rgba(var(--adah-primary-rgb),.18);
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero .eyebrow::before { content:""; width:6px; height:6px; border-radius:999px; background: var(--adah-primary); }
.hero h1 {
  font: var(--adah-t-display); font-size: clamp(44px, 6vw, 72px);
  line-height: 1.08; color: var(--adah-tertiary);
  letter-spacing: -0.02em; margin: 0 0 22px;
  text-wrap: balance;
}
.hero h1 .flow { background: linear-gradient(95deg, var(--adah-wave-1), var(--adah-wave-4)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.hero p.lede { font: var(--adah-t-lead); color: var(--adah-ink-soft); font-size: 19px; margin: 0 0 32px; max-width: 520px; line-height: 1.65; }
.hero-ctas { display: flex; gap: 12px; align-items: center; }
.hero-trust { display: flex; gap: 22px; margin-top: 36px; font: var(--adah-t-caption); color: var(--adah-muted); flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--adah-primary); }

/* Hero product visual — page builder preview */
.hero-device {
  position: relative; aspect-ratio: 16/11;
  border-radius: 18px;
  background: var(--adah-natural);
  box-shadow:
    0 40px 80px -30px rgba(var(--adah-tertiary-rgb),.28),
    0 20px 40px -20px rgba(var(--adah-primary-rgb),.25),
    0 0 0 1px rgba(var(--adah-tertiary-rgb),.06);
  overflow: hidden;
  transform: rotate(-.6deg);
  display: flex; flex-direction: column;
}

/* ── Top toolbar ── */
.pb-bar {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: var(--adah-tertiary);
  flex: 0 0 auto;
}
.pb-bar .pb-logo { font-weight: 700; font-size: 11px; color: #fff; letter-spacing: .1em; padding-inline-end: 12px; border-inline-end: 1px solid rgba(255,255,255,.12); }
.pb-bar .pb-crumb { font-size: 10px; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 4px; }
.pb-bar .pb-crumb b { color: rgba(255,255,255,.9); font-weight: 600; }
.pb-bar .pb-crumb svg { opacity: .45; }
.pb-bar .spacer { flex: 1; }
.pb-bar .pb-devices { display: flex; gap: 2px; }
.pb-bar .pb-devices span { width: 22px; height: 22px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,.45); }
.pb-bar .pb-devices span.on { background: rgba(255,255,255,.12); color: #fff; }
.pb-bar .pb-undo { display: flex; gap: 2px; border-inline-end: 1px solid rgba(255,255,255,.12); padding-inline-end: 10px; margin-inline-end: 4px; }
.pb-bar .pb-undo span { width: 22px; height: 22px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,.45); }
.pb-bar .pb-save {
  height: 24px; padding: 0 12px; border-radius: 5px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
  font: 600 10px/1 var(--adah-font); border: 0; cursor: pointer;
  margin-inline-end: 4px;
}
.pb-bar .pb-publish {
  height: 24px; padding: 0 12px; border-radius: 5px;
  background: linear-gradient(95deg, var(--adah-primary), var(--adah-secondary));
  color: #fff; font: 700 10px/1 var(--adah-font); border: 0; cursor: pointer;
}

/* ── Main area ── */
.pb-main { flex: 1; display: flex; min-height: 0; }

/* Left panel — elements */
.pb-left {
  width: 52px; flex: 0 0 52px;
  background: #fff;
  border-inline-end: 1px solid rgba(var(--adah-tertiary-rgb),.07);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0;
  gap: 4px;
}
.pb-icon {
  width: 38px; height: 38px; border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; color: var(--adah-muted);
}
.pb-icon.on { background: var(--adah-mint-wash); color: var(--adah-primary); }
.pb-icon svg { width: 16px; height: 16px; }
.pb-icon span { font-size: 7px; font-weight: 700; letter-spacing: .04em; }
.pb-divider { width: 28px; height: 1px; background: var(--adah-line-soft); margin: 4px 0; }

/* Layers panel — slides out from left */
.pb-layers {
  width: 140px; flex: 0 0 140px;
  min-width: 0;
  background: #fff;
  border-inline-end: 1px solid rgba(var(--adah-tertiary-rgb),.07);
  display: flex; flex-direction: column;
  font-size: 10px;
}
.pb-layers .ph { padding: 10px 10px 6px; font-weight: 700; font-size: 9px; letter-spacing: .12em; color: var(--adah-muted); text-transform: uppercase; }
.pb-layer {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  color: var(--adah-ink-soft);
  font-size: 10px; font-weight: 500;
  cursor: pointer;
}
.pb-layer:hover { background: var(--adah-natural); }
.pb-layer.sel { background: var(--adah-mint-wash); color: var(--adah-tertiary); font-weight: 700; }
.pb-layer .layer-ico { width: 14px; height: 14px; border-radius: 3px; background: var(--adah-natural); color: var(--adah-muted); display: flex; align-items: center; justify-content: center; flex: none; }
.pb-layer.sel .layer-ico { background: var(--adah-primary); color: #fff; }
.pb-layer .indent { margin-inline-start: 12px; }

/* Center canvas */
.pb-canvas {
  flex: 1; min-width: 0;
  background: #EAEEF0;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.pb-page {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(var(--adah-tertiary-rgb),.12);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  position: relative;
}

/* Page section: hero */
.pps-hero {
  height: 110px;
  background: linear-gradient(135deg, var(--adah-wave-1) 0%, var(--adah-wave-4) 100%);
  position: relative;
  display: flex; align-items: flex-end;
  padding: 10px 14px;
}
.pps-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 100%, rgba(255,255,255,.25), transparent 60%);
}
.pps-hero .pt { font-weight: 700; font-size: 13px; color: #fff; }
.pps-hero .ps { font-size: 9px; color: rgba(255,255,255,.8); margin-top: 2px; }

/* selected section — blue outline + handles */
.pps-nav {
  height: 32px; background: #fff;
  border-bottom: 1px solid #EBF2F2;
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  position: relative;
}
.pps-nav .nav-logo { width: 20px; height: 8px; background: linear-gradient(90deg, var(--adah-wave-1), var(--adah-wave-4)); border-radius: 3px; }
.pps-nav .nav-links { display: flex; gap: 6px; margin-inline-start: auto; }
.pps-nav .nav-links span { width: 20px; height: 5px; background: #DDE7E7; border-radius: 3px; }
.pps-nav .nav-links span:last-child { width: 28px; height: 14px; background: var(--adah-primary); border-radius: 4px; }

/* the selected section gets the teal outline + resize handles */
.pps-selected {
  position: relative;
  outline: 1.5px solid var(--adah-primary);
  outline-offset: -1px;
}
.pps-selected::before {
  content: "hero · قسم الرئيسية";
  position: absolute; top: -18px; inset-inline-start: 0;
  font: 700 8px/1 var(--adah-font); color: #fff;
  background: var(--adah-primary); padding: 3px 7px; border-radius: 3px 3px 0 0;
  z-index: 2;
}
/* corner handles */
.pps-selected::after {
  content: "";
  position: absolute; top: -3px; inset-inline-end: -3px;
  width: 6px; height: 6px; border-radius: 1px;
  background: var(--adah-primary); border: 1.5px solid #fff;
  z-index: 2;
}
.handle {
  position: absolute; width: 6px; height: 6px; border-radius: 1px;
  background: var(--adah-primary); border: 1.5px solid #fff; z-index: 2;
}
.handle.tl { top: -3px; inset-inline-start: -3px; }
.handle.bl { bottom: -3px; inset-inline-start: -3px; }
.handle.br { bottom: -3px; inset-inline-end: -3px; }

/* page content below hero */
.pps-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pps-row { display: flex; gap: 8px; }
.pps-img { background: var(--adah-mint-wash); border-radius: 4px; }
.pps-line { height: 5px; background: #EBF2F2; border-radius: 3px; }
.pps-line.sm { width: 60%; }
.pps-line.xs { width: 38%; }
.pps-cta { height: 18px; width: 60%; background: var(--adah-primary); border-radius: 12px; }

/* Right props panel */
.pb-right {
  width: 150px; flex: 0 0 150px;
  min-width: 0;
  background: #fff;
  border-inline-start: 1px solid rgba(var(--adah-tertiary-rgb),.07);
  display: flex; flex-direction: column;
  font-size: 10px;
}
.pb-right .ph { padding: 10px 10px 6px; font-weight: 700; font-size: 9px; letter-spacing: .12em; color: var(--adah-muted); text-transform: uppercase; }
.prop-group { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.prop-row { display: flex; align-items: center; justify-content: space-between; }
.prop-row .lbl { font-size: 9px; color: var(--adah-muted); }
.prop-row .val { font-size: 9px; font-weight: 700; color: var(--adah-tertiary); }
.prop-row .val.teal { color: var(--adah-primary); }
.prop-swatch { display: flex; gap: 4px; margin-top: 2px; }
.prop-swatch span { width: 16px; height: 16px; border-radius: 4px; }
.prop-swatch span.sel { outline: 1.5px solid var(--adah-primary); outline-offset: 1px; }
.prop-sep { height: 1px; background: var(--adah-line-soft); margin: 2px 0; }
.prop-tabs { display: flex; border-bottom: 1px solid var(--adah-line-soft); }
.prop-tabs span { flex: 1; text-align: center; padding: 6px 0; font-size: 9px; font-weight: 700; color: var(--adah-muted); }
.prop-tabs span.on { color: var(--adah-primary); border-bottom: 1.5px solid var(--adah-primary); margin-bottom: -1px; }

/* Little floating badges on the hero device (confidence cues) */
.hero-badge {
  position: absolute; z-index: 3; background: #fff;
  box-shadow: 0 10px 24px -8px rgba(var(--adah-tertiary-rgb),.25), 0 0 0 1px rgba(var(--adah-tertiary-rgb),.04);
  border-radius: 14px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font: var(--adah-t-label); color: var(--adah-tertiary);
  animation: bob 6s ease-in-out infinite;
}
.hero-badge .ic { width: 32px; height: 32px; border-radius: 10px; background: var(--adah-mint-wash); color: var(--adah-primary); display: flex; align-items: center; justify-content: center; }
.hero-badge small { display: block; font: var(--adah-t-caption); color: var(--adah-muted); font-weight: 400; margin-top: 1px; }
.hero-badge.live { top: 12%; inset-inline-start: -36px; }
.hero-badge.live .ic { background: #E8F7ED; color: #2F8F4F; }
.hero-badge.pub { bottom: 18%; inset-inline-end: -28px; animation-delay: -3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* The hero wave — full-bleed SVG that transitions INTO the sticky story section */
.hero-wave { position: absolute; inset: auto 0 0 0; height: 180px; z-index: 1; pointer-events: none; }
.hero-wave svg { width: 100%; height: 100%; display: block; }

@media (max-width: 991.98px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  /* page builder: hide layers + right panel at tablet */
  .pb-layers, .pb-right { display: none; }
  /* device a touch less tall */
  .hero-device { aspect-ratio: 16/10; }
}
@media (max-width: 767.98px) {
  /* page builder: icon rail too, just toolbar + canvas */
  .pb-left { display: none; }
  .pb-bar .pb-crumb { display: none; }
  .hero-device { aspect-ratio: 16/12; }
}
