/* ==========================================================
   Advanced Health Physical Therapy — brand: blue #2b3a8f · red #d9342b
   ========================================================== */

:root {
  --blue: #2b3a8f;
  --blue-dark: #1f2b6b;
  --blue-soft: #eef1fb;
  --red: #d9342b;
  --red-dark: #b52921;
  --red-soft: #fdf0ef;
  --gold: #f5b82e;
  --gold-dark: #c98f10;
  --gold-soft: #fdf6e3;
  --ink: #22283f;
  --ink-soft: #5a6178;
  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --line: #e3e7f3;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(34, 40, 63, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand img { display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--blue); text-decoration: none; }

.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 999px;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: #e9e3da; /* fallback while the first slide loads */
  color: var(--ink);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active { opacity: 1; }

/* light touch: keep the photo visible, help the text with a narrow fade only */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.55) 18%, rgba(255, 255, 255, 0.22) 48%, rgba(255, 255, 255, 0) 68%);
}

.hero-inner {
  position: relative;
  padding: 130px 0 150px;
  max-width: 780px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--blue-soft);
  color: var(--blue-dark);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 18px;
  color: var(--blue-dark);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 0 4px rgba(255, 255, 255, 0.9);
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 56ch;
  color: var(--ink);
  margin-bottom: 32px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.95), 0 0 4px rgba(255, 255, 255, 0.9);
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 999px;
  transition: transform 0.15s, background 0.2s;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 52, 43, 0.35);
}

.btn-primary:hover { background: var(--red-dark); }

.btn-ghost {
  color: var(--blue-dark);
  border: 2px solid var(--blue);
  background: rgba(255, 255, 255, 0.65);
}

.btn-ghost:hover { background: #fff; }

.btn-light {
  background: #fff;
  color: var(--blue);
  font-size: 1.05rem;
}

.btn-light:hover { background: var(--blue-soft); }

/* ===== Sections ===== */
.section { padding: 84px 0; }

.section-alt { background: var(--bg-alt); }

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 14px;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 33%, var(--gold) 33%, var(--gold) 66%, var(--blue) 66%);
}

.section-lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin-bottom: 36px;
  max-width: 70ch;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: start;
  margin-top: 24px;
}

.about-text p { margin-bottom: 18px; color: var(--ink-soft); font-size: 1.05rem; }

.badge-line { display: flex; flex-direction: column; gap: 10px; }

.badge {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid #d6ddf5;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 700;
}

.badge-red {
  background: #fdf0ef;
  color: var(--red-dark);
  border-color: #f5d3d0;
}

.about-side { display: grid; gap: 22px; }

.about-photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}

.feature-card {
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
}

.feature-card h3 { margin-bottom: 12px; font-size: 1.15rem; }

.feature-card ul { list-style: none; }

.feature-card li {
  padding: 7px 0 7px 26px;
  position: relative;
  font-size: 0.95rem;
  opacity: 0.95;
}

.feature-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 800;
}

/* ===== Programs ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* toy-block colour cycle: red, gold, blue */
.card:nth-child(3n+1) { border-top-color: var(--red); }
.card:nth-child(3n+2) { border-top-color: var(--gold); }
.card:nth-child(3n+2) .card-icon { background: var(--gold-soft); }

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 38px rgba(34, 40, 63, 0.13);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.icon-blue { background: var(--blue-soft); }
.icon-red { background: #fdf0ef; }

.card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--blue-dark); }

.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ===== Mission ===== */
.mission {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  color: #fff;
  padding: 76px 0;
  text-align: center;
}

.mission h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 16px;
}

.mission h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 72px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 33%, var(--gold) 33%, var(--gold) 66%, #fff 66%);
}

.mission p {
  max-width: 72ch;
  margin: 0 auto 30px;
  font-size: 1.12rem;
  opacity: 0.94;
}

/* ===== Facilities gallery ===== */
#facilities { background: var(--gold-soft); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.gallery img:hover { transform: scale(1.03); }

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
  max-width: 1180px;
}

.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}

.team-card img,
.team-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 24px;
  /* transparent border = gap; box-shadow = the coloured ring around it */
  border: 8px solid transparent;
  box-shadow: 0 0 0 5px var(--blue);
}

/* colour-cycled photo rings, matching the toy block */
.team-card:nth-child(3n+1) img,
.team-card:nth-child(3n+1) .team-placeholder { box-shadow: 0 0 0 5px var(--red); }
.team-card:nth-child(3n+2) img,
.team-card:nth-child(3n+2) .team-placeholder { box-shadow: 0 0 0 5px var(--gold); }

.team-placeholder {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 3.6rem;
  font-weight: 800;
}

.team-card h3 { font-size: 1.3rem; color: var(--blue-dark); }

.team-card p { color: var(--ink-soft); font-size: 1rem; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 44px;
  align-items: start;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.form-field { display: grid; gap: 7px; }

.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-field textarea { resize: vertical; min-height: 120px; }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 58, 143, 0.14);
  background: #fff;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: #9aa2bd; }

/* honeypot — visually removed but still submittable by bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-form .btn { justify-self: start; }

.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.form-status {
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 1.4em;
  margin: 0;
}

.form-status.ok { color: #1a8f4b; }
.form-status.err { color: var(--red); }

.contact-info { display: grid; gap: 20px; }

.info-block {
  background: var(--bg-alt);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 16px 20px;
}

.info-block:nth-child(3n+1) { border-left-color: var(--red); background: var(--red-soft); }
.info-block:nth-child(3n+2) { border-left-color: var(--gold); background: var(--gold-soft); }
.info-block:nth-child(3n)   { border-left-color: var(--blue); background: var(--blue-soft); }

.info-block h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.info-block p { color: var(--ink-soft); }

/* ===== Footer ===== */
.site-footer {
  background: #1a2150;
  color: #aab3d9;
  padding: 34px 0;
  border-top: 6px solid;
  border-image: linear-gradient(90deg, var(--red) 33%, var(--gold) 33%, var(--gold) 66%, var(--blue) 66%) 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-logo {
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
}

.site-footer p { font-size: 0.9rem; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-inner { padding: 70px 0 80px; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }

  .section { padding: 60px 0; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 15px 24px;
    border-top: 1px solid var(--line);
  }

  .nav-cta { border-radius: 0; text-align: center; }
}
