/* ==========================================================================
   TOGWEYNE NURSING HOME — DESIGN SYSTEM
   Palette drawn from Modogashe's dry-season horizon (sand, dusk-navy) with a
   clinical teal and a warm ochre accent. Signature motif: the "horizon-pulse"
   line — a skyline that briefly becomes a heartbeat — used in the hero,
   as section dividers, and along the footer edge.
   ========================================================================== */

:root {
  /* Color */
  --navy: #12194a;
  --navy-dark: #0B2233;
  --teal: #870101;
  --teal-dark: #0A5B55;
  --gold: #C68A2E;
  --gold-light: #E8B463;
  --sand: #F6F1E6;
  --sand-deep: #EEE4CE;
  --ink: #202324;
  --ink-soft: #4B5457;
  --line: #E3D9C2;
  --white: #FFFFFF;
  --danger: #B23A2E;
  --success: #1F7A4D;

  /* Type */
  --font-display: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  --font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(18, 49, 74, 0.08);
  --shadow-md: 0 10px 30px rgba(18, 49, 74, 0.12);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16.5px;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--gold); }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 0.75rem 1.25rem; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.78rem; color: var(--teal-dark);
  margin-bottom: 0.75rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); display: inline-block; }

.section { padding: var(--space-5) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3, .section--navy .eyebrow { color: #fff; }
.section--navy p { color: #C9D6DD; }
.section-head { max-width: 720px; margin: 0 auto var(--space-4); text-align: center; }
.section-head p { font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  border: 2px solid transparent; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-primary:hover { background: var(--gold-light); color: var(--navy-dark); }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-dark); color: #D9E2E7; font-size: 0.85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 0.45rem; padding-bottom: 0.45rem; flex-wrap: wrap; gap: 0.4rem; }
.topbar a { color: #D9E2E7; }
.topbar a:hover { color: var(--gold-light); }
.topbar-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar-links span { opacity: 0.7; margin-right: 0.35rem; }

header.site-header {
  background: #fff; position: sticky; top: 0; z-index: 500;
  box-shadow: 0 1px 0 var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark { width: 46px; height: 46px; flex-shrink: 0; }
.brand-text .name { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.15rem; display: block; }
.brand-text .slogan { font-size: 0.72rem; color: var(--teal-dark); font-weight: 700; letter-spacing: 0.03em; }

nav.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; gap: 0.35rem; margin: 0; padding: 0; align-items: center; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block; padding: 0.7rem 0.85rem; color: var(--navy); font-weight: 700; font-size: 0.94rem;
  border-radius: 8px;
}
.nav-list > li > a:hover, .nav-list > li.active > a { color: var(--teal-dark); background: var(--sand); }
.has-dropdown > a::after { content: " \25BE"; font-size: 0.7em; }
.dropdown {
  list-style: none; margin: 0; padding: 0.5rem; position: absolute; top: 100%; left: 0;
  background: #fff; min-width: 260px; box-shadow: var(--shadow-md); border-radius: var(--radius-md);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: 0.15s ease;
  border: 1px solid var(--line);
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 0.6rem 0.75rem; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.dropdown a:hover { background: var(--sand); color: var(--teal-dark); }
.nav-cta { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: min(320px, 85vw);
    background: #fff; flex-direction: column; align-items: stretch; padding: 5.5rem 1.25rem 2rem;
    transition: right 0.25s ease; box-shadow: var(--shadow-md); overflow-y: auto;
  }
  nav.main-nav.open { right: 0; }
  .nav-list { flex-direction: column; align-items: stretch; width: 100%; }
  .nav-list > li > a { padding: 0.85rem 0.5rem; border-bottom: 1px solid var(--line); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; background: var(--sand); }
  .has-dropdown.open .dropdown { display: block; }
  .has-dropdown > a::after { float: right; }
  .nav-cta { display: none; }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(11,34,51,0.5); z-index: 400; }
  .nav-overlay.show { display: block; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--sand) 0%, #fff 100%); overflow: hidden; position: relative; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-4); align-items: center; padding-top: var(--space-5); padding-bottom: var(--space-4); }
.hero h1 { margin-bottom: 0.5rem; }
.hero .lead { font-size: 1.12rem; max-width: 46ch; }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--navy); }
.hero-badges { display: flex; gap: 1.5rem; margin-top: var(--space-3); flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--navy); font-size: 0.92rem; }
.hero-badge svg { width: 22px; height: 22px; flex-shrink: 0; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

/* Horizon-pulse divider */
.horizon-divider { display: block; width: 100%; height: 46px; }
.horizon-divider path { fill: none; stroke: var(--gold); stroke-width: 2; }
.horizon-divider.on-navy path { stroke: var(--gold-light); opacity: 0.85; }

/* ---------- Stat strip ---------- */
.stat-strip { background: var(--navy); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); text-align: center; }
.stat-grid strong { font-family: var(--font-display); font-size: 2.1rem; color: var(--gold-light); display: block; }
.stat-grid span { font-size: 0.85rem; color: #C9D6DD; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-3); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-card { display: flex; flex-direction: column; height: 100%; }
.service-icon {
  width: 24px; height: 24px; border-radius: 14px; background: var(--sand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.service-icon svg { width: 28px; height: 28px; stroke: var(--teal-dark); }
.service-card h3 { margin-bottom: 0.4rem; }
.service-card p { flex-grow: 1; font-size: 0.95rem; }
.service-card .btn { align-self: flex-start; margin-top: 0.75rem; }

.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--sand-deep); color: var(--navy); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-teal { background: rgba(14,124,116,0.12); color: var(--teal-dark); }
.badge-gold { background: rgba(198,138,46,0.16); color: #8A5F1D; }

/* ---------- Why choose us ---------- */
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon { width: 24px; height: 24px; border-radius: 12px; background: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature-icon svg { width: 24px; height: 24px; stroke: #fff; }
.feature h4 { margin: 0 0 0.25rem; font-family: var(--font-body); color: var(--navy); font-size: 1.02rem; font-weight: 800; }
.feature p { font-size: 0.93rem; margin: 0; }

/* ---------- Testimonials ---------- */
.testimonial-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .testimonial-track { grid-template-columns: 1fr; } }
.testimonial-card { background: #fff; border-radius: var(--radius-md); padding: var(--space-3); border: 1px solid var(--line); position: relative; }
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 0.5rem; }
.testimonial-name { font-weight: 800; color: var(--navy); margin-top: 0.75rem; }
.testimonial-loc { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
th { background: var(--sand); color: var(--navy); font-family: var(--font-body); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.field .hint { font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; }
input, textarea, select {
  font: inherit; padding: 0.75rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { border-color: var(--teal); }
.required { color: var(--danger); }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-weight: 600; }
.alert-success { background: rgba(31,122,77,0.12); color: var(--success); border: 1px solid rgba(31,122,77,0.3); }
.alert-error { background: rgba(178,58,46,0.1); color: var(--danger); border: 1px solid rgba(178,58,46,0.3); }

/* ---------- Accordion (FAQ) ---------- */
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; }
.accordion-item summary {
  cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; background: var(--sand);
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after { content: "+"; font-size: 1.3rem; color: var(--teal-dark); }
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-item .accordion-body { padding: 1rem 1.25rem; font-size: 0.95rem; }

/* ---------- Page header (interior pages) ---------- */
.page-hero { background: var(--navy); color: #fff; padding: var(--space-4) 0 var(--space-3); position: relative; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero .eyebrow::before { background: var(--gold-light); }
.page-hero h1 { color: #fff; margin-bottom: 0.4rem; }
.breadcrumb { font-size: 0.85rem; color: #B9C7CE; }
.breadcrumb a { color: #B9C7CE; }
.breadcrumb a:hover { color: var(--gold-light); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; background: var(--sand-deep); display: flex; align-items: center; justify-content: center; }
.gallery-item svg { width: 40%; opacity: 0.55; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-dark); color: #C9D6DD; padding-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: var(--space-3); padding: var(--space-4) 0 var(--space-3); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-grid a { color: #C9D6DD; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.25rem 0; font-size: 0.82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.social-row { display: flex; gap: 0.6rem; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-row svg { width: 17px; height: 17px; stroke: #fff; }
.social-row a:hover { background: var(--teal); }

/* ---------- Floating action buttons (mobile-first contact) ---------- */
.floating-actions { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 600; display: flex; flex-direction: column; gap: 0.6rem; }
.fab { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.fab svg { width: 26px; height: 26px; }
.fab-whatsapp { background: #25D366; }
.fab-call { background: var(--gold); }
.fab svg { stroke: #fff; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.small { font-size: 0.85rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
