/* ==========================================================================
   Resolutions Wellness Group — main stylesheet
   Mobile-first. Brand colors from Brand Colors.pdf
   ========================================================================== */

:root {
  --navy: #00335f;
  --navy-web: #003366;
  --navy-soft: #0a4677;
  --navy-deep: #002548;
  --green: #339966;
  --green-muted: #4a805e;
  --ink: #1c2b3a;
  --body-text: #3d4d5c;
  --bg: #ffffff;
  --bg-alt: #f4f7f9;
  --border: #e1e8ed;

  --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --container: 1200px;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(0, 51, 95, 0.08);

  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body-text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  margin: 0 0 .6em;
  line-height: 1.25;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; }
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
section { padding: 56px 0; }
.text-muted { color: #6b7f8f; }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: 12px 26px;
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #2c8757; text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); text-decoration: none; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px 20px;
}
.logo-link { display: flex; align-items: center; }
.logo-link img { height: 55px; width: auto; }

.nav-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
}
.nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.main-nav {
  position: fixed;
  inset: 0 0 0 30%;
  background: var(--navy);
  padding: 100px 32px 32px;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.main-nav.is-open { transform: translateX(0); }
.main-nav ul { display: flex; flex-direction: column; gap: 4px; }
.main-nav a {
  display: block;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 14px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a:focus-visible { background: rgba(255,255,255,.1); }
.main-nav a[aria-current="page"] { background: var(--green-muted); }

.lang-switch {
  display: flex;
  gap: 10px;
  padding: 10px 16px 22px;
}
.lang-switch .lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: 0 18px 0 0;
  text-decoration: none;
  transition: background .15s ease, opacity .15s ease;
}
.lang-switch .lang-pill:hover { text-decoration: none; opacity: .9; }
.lang-switch .lang-pill .flag-icon {
  width: 40px;
  height: 40px;
  margin: -1px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.6);
}
.lang-switch .lang-pill span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}
.lang-switch .lang-pill.is-inactive { background: #99a3ab; }
.lang-switch .lang-pill.is-inactive .flag-icon { filter: grayscale(55%); opacity: .85; }
.lang-switch .lang-pill.is-inactive span { color: #f0f2f3; }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,20,40,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 15;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-backdrop { display: none; }
  .header-top { padding: 20px; }
  .main-nav {
    position: static;
    inset: auto;
    width: 100%;
    background: var(--navy);
    padding: 0;
    transform: none;
    transition: none;
    overflow: visible;
  }
  .main-nav ul { flex-direction: row; justify-content: center; gap: 2px; }
  .main-nav a {
    font-size: 1rem;
    padding: 16px 22px;
    border-radius: 0;
  }
  .lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0;
  }
}

/* ==========================================================================
   Hero
   Mobile (<800px): cropped photo + real HTML text panel (reconstructed so
   copy stays readable on small screens).
   Desktop (>=800px): the designer's original flattened banner, untouched —
   only re-encoded to webp/jpg for weight. The text panel below stays in
   the DOM but is visually hidden (not display:none) so screen readers
   still get the copy that's baked into the image for sighted users.
   ========================================================================== */
.hero { display: block; padding: 0; margin-top: 19px; }
.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.23 / 1;
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,51,95,0) 55%, rgba(0,51,95,.85) 100%);
}
.hero-panel {
  background: var(--navy);
  color: #fff;
  padding: 36px 24px;
}
.hero-panel p {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.4;
  margin: 0;
  max-width: 46ch;
}
.hero-panel h3 {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 14px;
}
.hero-panel--center { text-align: center; justify-content: center; }
.hero-panel--center p { margin-inline: auto; }

@media (min-width: 800px) {
  .hero-media { aspect-ratio: 3.72 / 1; }
  .hero-media::after { content: none; }
  /* Copy is already baked into the desktop image; keep it for screen
     readers only, using a clip technique instead of display:none. */
  .hero-panel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Experimental bilingual hero (see render_hero() in functions.php):
     real, translatable text next to the authentic photo+gradient crop,
     instead of the baked-text full image. */
  .hero--bilingual { display: grid; grid-template-columns: 64% 36%; min-height: 460px; }
  .hero--bilingual .hero-media { aspect-ratio: auto; height: 100%; }
  .hero--bilingual .hero-panel {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 48px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    display: flex;
    align-items: center;
  }
}
@media (min-width: 1200px) { .hero--bilingual { min-height: 520px; } }

/* ==========================================================================
   Reusable section layouts
   ========================================================================== */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .split.reverse > :first-child { order: 2; }
}
.split img { margin-inline: auto; }

.two-col {
  display: grid;
  gap: 40px;
}
@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; } }

.list-check li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}
.list-plain li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.list-plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 12px;
  height: 17px;
  background: url('/assets/img/icons/leaf-mark.webp') center / contain no-repeat;
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.list-check--leaf li::before {
  top: 2px;
  width: 12px;
  height: 17px;
  border-radius: 0;
  background: url('/assets/img/icons/leaf-mark.webp') center / contain no-repeat;
}

.faq-item { margin-bottom: 22px; }
.faq-item h4 { color: var(--navy); margin-bottom: 4px; }

/* ---------- Service / icon cards ---------- */
.card-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .card-grid { grid-template-columns: 1fr 1fr; gap: 48px 40px; } }

.service-card { text-align: center; }
.service-card .icon-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
  min-height: 72px;
}
.service-card .icon-row img { height: 77px; width: auto; }
.service-card h3 { margin-bottom: 10px; }
.service-card ul { text-align: left; max-width: 420px; margin-inline: auto; }

/* ---------- Document / download cards ---------- */
.doc-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .doc-grid { grid-template-columns: repeat(3, 1fr); } }

.doc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: box-shadow .15s ease, transform .15s ease;
}
.doc-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.doc-card .doc-icon { width: 52px; height: auto; }
.doc-card .doc-name { font-family: var(--font-heading); font-weight: 600; font-size: .85rem; color: #000; text-transform: uppercase; letter-spacing: .02em; }
.doc-card .doc-meta { font-size: .75rem; color: #7b8b98; }

/* ---------- Contact ---------- */
.contact-block h3 { margin-top: 28px; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
}
@media (min-width: 640px) { .map-frame { aspect-ratio: 16/10; } }

.info-line { margin-bottom: 8px; }
.placeholder { color: #b5541f; font-style: italic; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 720px; margin-top: 24px; }
.form-row { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--body-text);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(51, 153, 102, .15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.field-error {
  display: block;
  color: #b3261e;
  font-size: .82rem;
  margin-top: 6px;
}
.form-success {
  background: #eaf6ee;
  border: 1px solid var(--green);
  color: #205e3c;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  max-width: 720px;
}
.form-alert {
  background: #fdeceb;
  border: 1px solid #d64545;
  color: #8a241b;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  max-width: 720px;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .btn-primary { border: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #b9cbdb;
  font-size: .88rem;
  padding: 36px 0 20px;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-grid a { color: #b9cbdb; }
.footer-grid a:hover { color: #fff; }
.footer-sitemap li { margin-bottom: 8px; }
.footer-logo { height: 34px; width: auto; margin-bottom: 10px; filter: brightness(0) invert(1); opacity: .9; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  padding-top: 18px;
  font-size: .8rem;
}
.footer-bottom a { color: #9fb4c6; }

/* ---------- Utility ---------- */
.bg-alt { background: var(--bg-alt); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
