/* =========================================================================
   Hydralive Therapy — Licensee Microsite Template
   Shared site styles. Layout and spacing for each block live inline in the
   HTML (exported from the design canvas); this file holds what is shared:
   tokens, type scale, responsive overrides, and interactive states.

   Contents
   1. Design tokens
   2. Base + type scale
   3. Header: nav, active page, Services dropdown, mobile menu, mobile CTA
   4. Responsive overrides (900px tablet, 640px phone)
   5. Home page mobile behaviors (swipe rows, card sizing)
   6. FAQ accordions
   7. Accessibility helpers
   ========================================================================= */

/* 1. Design tokens ------------------------------------------------------ */
:root {
  --navy: #212d65;
  --sky: #54c2eb;
  --surface: #ffffff;
  --surface-tint: #def6ff;
  --surface-warm: #efeeeb;
  --heading: #212d65;
  --ink: #272727;
  --ink-muted: #636363;
  --link: #0c7297;
  --action: #54c2eb;
  --on-action: #212d65;
  --action-secondary: #212d65;
  --on-action-secondary: #ffffff;
  --line: #e0e0e0;
  --line-strong: #212d65;
  --focus-ring: #212d65;
  --font-sans: "Montserrat", Calibri, Helvetica, Arial, sans-serif;
  --space-1: 8px;
  --space-2: 15px;
  --space-3: 25px;
  --space-4: 40px;
  --space-5: 75px;
  --radius-sm: 7px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-pill: 50px;
  --shadow-card: 0px 10px 20px 0px rgba(0, 0, 0, 0.1);
}

/* 2. Base + type scale --------------------------------------------------- */
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: #0c7297; }
a:hover { color: #212d65; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.t-display { margin: 0; font-size: 56px; line-height: 64px; font-weight: 300; letter-spacing: -0.5px; }
.t-h2 { margin: 0; font-size: 40px; line-height: 48px; font-weight: 400; }
/* Blog posts use a slightly smaller headline so long titles fit. */
.page-post .t-display { font-size: 48px; line-height: 58px; }

/* 3. Header ---------------------------------------------------------------- */
/* Active section in the main nav (set with aria-current on each page). */
.site-nav [aria-current="page"],
.site-nav .is-current {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 8px !important;
  text-decoration-color: #54c2eb !important;
}

/* Services dropdown */
.nav-dd { position: relative; }
.nav-dd__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: #212d65;
}
.nav-dd__btn svg { transition: transform .2s; }
.nav-dd__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dd__menu {
  position: absolute; top: calc(100% + 14px); left: -18px; z-index: 20;
  min-width: 240px; margin: 0; padding: 10px; list-style: none;
  background: #ffffff; border: 1px solid #e0e0e0; border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.nav-dd__menu[hidden] { display: none; }
.nav-dd__menu a {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: #212d65; text-decoration: none; font-weight: 600;
}
.nav-dd__menu a:hover { background: #def6ff; }
.nav-dd__menu a[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 6px; text-decoration-color: #54c2eb;
}

/* Hamburger button (shown at 900px and below) */
.menu-btn { display: none !important; }

/* Mobile menu panel */
.mobile-menu {
  border-top: 1px solid #e0e0e0; background: #ffffff;
  padding: 8px 24px 20px; font-weight: 600;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu > ul > li { border-bottom: 1px solid #e0e0e0; }
.mobile-menu a, .mobile-menu .mobile-menu__label {
  display: block; padding: 14px 0; color: #212d65; text-decoration: none; font-size: 17px;
}
.mobile-menu .mobile-menu__sub a { padding: 10px 0 10px 16px; font-size: 15px; font-weight: 500; }
.mobile-menu a[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 6px; text-decoration-color: #54c2eb;
}

/* Full-width primary CTA under the header bar on phones */
.cta-bar { display: none; }

/* 4. Responsive overrides ---------------------------------------------------- */
@media (max-width: 900px) {
  .site-nav { display: none !important; }
  .menu-btn { display: inline-flex !important; }
  .bento-feature { grid-column: auto !important; grid-row: auto !important; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}
@media (max-width: 640px) {
  .t-display { font-size: 38px; line-height: 46px; }
  .page-post .t-display { font-size: 34px; line-height: 42px; }
  .t-h2 { font-size: 30px; line-height: 38px; }
  .sec { padding-top: 56px !important; padding-bottom: 56px !important; }
  .hide-sm { display: none !important; }

  .cta-desk { display: none !important; }
  .cta-bar { display: block !important; }
  .cta-bar a, .cta-bar button {
    display: flex !important; justify-content: center; width: 100%; box-sizing: border-box;
  }
}

/* 5. Home page mobile behaviors ---------------------------------------------- */
@media (max-width: 640px) {
  /* Horizontal swipe rows (services, testimonials) */
  .hl-swipe {
    display: flex !important; gap: 16px !important;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -24px; padding: 4px 24px 24px; scrollbar-width: none;
  }
  .hl-swipe::-webkit-scrollbar { display: none; }
  .hl-swipe-card { flex: 0 0 80%; scroll-snap-align: center; }

  /* Featured service card matches the other cards on phones */
  .bf-img { flex: none !important; min-height: 0 !important; aspect-ratio: 3 / 2; font-size: 14px !important; }
  .bf-body { padding: 20px !important; gap: 6px !important; }
  .bf-title { font-size: 18px !important; line-height: 24px !important; }
  .bf-desc { font-size: 14px !important; line-height: 20px !important; }
  .bf-link { display: none !important; }

  /* "Why choose us" image goes square */
  .sq-sm { height: auto !important; aspect-ratio: 1 / 1; }

  /* Blog teasers: show the first one only */
  .one-sm .post-teaser ~ .post-teaser { display: none !important; }
}

/* 6. FAQ accordions (native <details>) ---------------------------------------- */
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }

/* 7. Accessibility helpers --------------------------------------------------------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 7px;
  background: #212d65; color: #ffffff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #ffffff; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
