/* ============================================================
   Self-hosted Heebo variable font — Hebrew + Latin subsets
   ============================================================ */
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/heebo-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/heebo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   mobile-standard.css — global responsive + cross-browser defenses
   Loaded by every page on https://new.soulwaves.org/.
   Breakpoint convention: mobile = <= 767px, desktop = >= 768px.
   Phase 2 (2026-05-18): text-inflation lock, sticky-hover guard,
   sticky-header scroll buffer, fluid section padding.
   ============================================================ */

/* ===== 1) Text-inflation lock (block iOS/Android auto-resize) ===== */
html, body {
  -webkit-text-size-adjust: 100%;
     -moz-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

/* ===== 2) Sticky-header scroll buffer + smooth scroll ===== */
/* Heading lands flush against the 55px sticky header (no breathing gap)
   so anchored sections sit "right at the top" per spec. */
html {
  scroll-padding-top: 55px !important;
  scroll-behavior: smooth;
}

/* ===== 3) Native form-control + button appearance reset ===== */
button,
.btn,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select,
.choice-card,
.additional-card,
.contact-card,
.form-card,
section.card,
.wa-stick,
.hamburger {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

/* ===== 4) Hamburger button (48x48 min touch target) ===== */
.hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 48px; height: 48px;
  min-width: 48px; min-height: 48px;
  border-radius: 50%;
  background: #e8f1ef;
  color: #1b4d4d;
  border: 1px solid rgba(27,77,77,0.18);
  cursor: pointer;
  font-size: 1.5rem; line-height: 1;
  padding: 0;
  transition: background .15s, transform .15s;
}
.hamburger:focus-visible {
  outline: 3px solid #facc15; outline-offset: 2px;
}

/* ===== 5) Drawer overlay + sliding panel ===== */
.v2-drawer,
.drawer {
  position: fixed; inset: 0;
  background: rgba(11,42,58,0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 99990;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.v2-drawer.open, .drawer.open {
  opacity: 1; pointer-events: auto;
}
.v2-drawer-panel,
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 80vw; max-width: 320px;
  background: #fff;
  box-shadow: -8px 0 24px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform .25s ease-out;
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  box-sizing: border-box;
}
.v2-drawer.open .v2-drawer-panel,
.drawer.open .drawer-panel {
  transform: translateX(0);
}
.v2-drawer-close,
.drawer-close {
  align-self: flex-start;
  background: none; border: none;
  font-size: 1.5rem; line-height: 1;
  color: #0b2a3a; cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  min-width: 48px; min-height: 48px;
  -webkit-appearance: none; appearance: none;
}
.v2-drawer-close:focus-visible,
.drawer-close:focus-visible {
  outline: 2px solid #facc15;
}
.v2-drawer a,
.drawer a {
  display: block;
  padding: 0.85rem 0.5rem;
  font-size: 1.05rem;
  color: #0b2a3a;
  text-decoration: none;
  border-radius: 6px;
  border-bottom: 1px solid #e2e8f0;
  min-height: 48px;
  box-sizing: border-box;
}

/* ===== 6) Sticky WhatsApp pill — hidden by default, shown on mobile ===== */
.wa-stick { display: none; }

/* In-header WhatsApp badge — hidden by default, shown only in the mobile media query below */
.wa-badge { display: none; }

/* ============================================================
   MOBILE viewport (<= 767px)
   ============================================================ */
@media (max-width: 767px), (max-device-width: 480px) {

  /* === Permanent horizontal-spill prevention === */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  *, *::before, *::after {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  img, video, iframe, embed, object, picture {
    max-width: 100%; height: auto;
  }

  /* === Sticky header — compact 55px footprint, painted instantly by layout
     engine before any image/async asset arrives (eliminates FOUC). === */
  header.topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 55px !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
  }
  .topbar-inner {
    padding: 0.3rem 0.85rem !important;
  }
  /* Maximize screen real estate: hide the secondary brand-tag line on mobile
     so only the compact name remains beside the hamburger. */
  .brand-tag { display: none !important; }
  .brand-name { font-size: 0.95rem !important; line-height: 1.1; }
  /* Shrink the hamburger to match the compact header (~40px keeps a 44-48px
     tappable area when padding is counted, well within accessibility guidelines). */
  .hamburger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    font-size: 1.25rem !important;
  }
  /* Reserve the matching 55px below so content never starts under the header */
  body { padding-top: 55px !important; }

  /* Hide the bouncing chevron scroll-hint (visual noise on small screens) */
  .scroll-hint { display: none !important; }

  /* Therapy section image: on mobile move it AFTER the text/CTA block. On
     desktop the .flip class keeps image-right via grid placement (untouched). */
  .split.flip .split-image { order: 2 !important; }
  .split.flip .split-text  { order: 1 !important; }

  /* Tighten the gap between text block and image on mobile so the image sits
     right under the "למידע מלא על הטיפול" CTA instead of floating below a band. */
  .split { gap: 0.4rem !important; }
  .split-image { margin-top: 0 !important; }

  /* === Header swap: hide desktop nav, reveal hamburger === */
  .topnav { display: none !important; }
  .hamburger { display: inline-flex; }
  /* V5 base CSS switches topbar to column+flex-end on small screens which
     pushes hamburger to visual LEFT in RTL. Force back to row. */
  .topbar-inner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  /* Hide legacy V5 background-picker toolbar */
  .bg-switcher { display: none !important; }

  /* === Content parity on key service sections ===
     Purge any inherited body gradients / parallax backgrounds inside the
     two primary service anchors so text stays crisp + high-contrast. */
  #psychotherapy, #watsu {
    background-image: none !important;
    background-color: #f4f9f9 !important;
  }
  #psychotherapy *, #watsu * {
    position: relative;
    z-index: 1;
  }

  /* === Fluid section spacing — clamp() shrinks gracefully on small screens.
         Mobile keeps padding tight so the section heading sits right under
         the sticky header when scrolled to via anchor. */
  section.section,
  .section {
    padding-top:    clamp(12px, 3vw, 60px) !important;
    padding-bottom: clamp(35px, 5vw, 90px) !important;
  }
  /* When a section is the current URL target (#psychotherapy / #watsu etc.),
     squeeze its top padding even tighter so the heading sits flush with the
     header — "ממש צמוד לשורה העליונה". */
  .section:target {
    padding-top: 4px !important;
  }

  /* === Floating WA pill eliminated on mobile — replaced by in-header .wa-badge === */
  .wa-stick { display: none !important; }

  /* === In-header compact WA badge (sits to the visual LEFT of the hamburger) === */
  .wa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #25D366;
    border-radius: 25px;
    background: #fff;
    color: #075E54;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
  }
  .wa-badge svg {
    width: 14px;
    height: 14px;
    fill: #25D366;
    flex-shrink: 0;
    transition: fill .15s;
  }
  .wa-badge:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
  }
}

/* ============================================================
   DESKTOP / hover-capable devices (>= 768px)
   ============================================================ */
@media (min-width: 768px) and (min-device-width: 481px) {
  .hamburger { display: none; }
  .v2-drawer, .drawer { display: none !important; }
  .wa-stick { display: none !important; }
  .wa-badge { display: none !important; }
}

/* ============================================================
   HOVER CALIBRATION — apply hover transforms ONLY on devices
   that report hover capability. Prevents stuck-hover ghost
   states on touch screens after tap.
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .hamburger:hover {
    background: #c7dad6;
    transform: scale(1.05);
  }
  .wa-stick:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(18, 140, 126, 0.42), 0 2px 6px rgba(0, 0, 0, 0.14);
  }
  .wa-badge:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
  }
  .wa-badge:hover svg { fill: #fff; }
  .v2-drawer a:hover,
  .drawer a:hover {
    background: #e8f1ef;
    color: #1b4d4d;
  }
  .v2-drawer-close:hover,
  .drawer-close:hover {
    background: rgba(11,42,58,0.06);
  }
}

/* On pure-touch devices, defensively neutralize any inherited hover
   transforms from page-level CSS (choice-card, btn, cta-primary, etc.). */
@media (hover: none) and (pointer: coarse) {
  .hamburger:hover,
  .wa-stick:hover,
  .wa-badge:hover,
  .choice-card:hover,
  .cta-primary:hover,
  .btn:hover,
  .additional-card:hover,
  .topic-chip:hover {
    transform: none !important;
    filter: none !important;
  }
}
