:root {
  --blue: #2f6fb5;
  --blue-dark: #12355b;
  --blue-mid: #1f5a96;
  --sky: #73a3de;
  --tint: #eef4fb;
  --text: #25303b;
  --muted: #5b6875;
  --radius: 10px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font: 400 1rem/1.65 "Open Sans", system-ui, sans-serif;
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1, h2 { font-family: "Oswald", "Open Sans", sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.icon {
  width: 40px; height: 40px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--blue-dark); color: #fff;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { color: #fff; text-decoration: none; font: 500 1.25rem "Oswald", sans-serif; letter-spacing: .03em; }
.nav { display: flex; gap: 28px; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a:focus-visible { border-bottom-color: var(--sky); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; }

/* Header right side: menu, language switch and (on phones) the hamburger */
.header-right { display: flex; align-items: center; gap: 24px; }

/* Slim top bar: full width, language switch pinned to the far right edge */
.topbar { background: #0c2742; display: flex; justify-content: flex-end; padding: 4px 24px; }

/* English | Español language switch */
.lang { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: #9db8d8; }
.lang button {
  background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 4px 2px; font: inherit; color: #cfe0f5; cursor: pointer;
}
.lang button:hover, .lang button:focus-visible { color: #fff; border-bottom-color: var(--sky); }
.lang button[aria-pressed="true"] { color: #fff; border-bottom-color: #fff; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: var(--blue); color: #fff; text-decoration: none; font-weight: 700;
  border: 2px solid var(--blue); transition: background .15s, color .15s;
}
.btn:hover, .btn:focus-visible { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline { background: transparent; color: var(--blue); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--blue-dark); color: #fff; }

/* Hero */
.hero {
  background: #eaf2fa url("images/hero.jpeg?v=2") right center / cover no-repeat;
  min-height: 520px; display: flex; align-items: center;
}
.hero-inner { padding-block: 64px; }
.hero-copy { max-width: 540px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); color: var(--blue-dark); }
.hero p { font-size: 1.1rem; }
/* Notice under the hero buttons: Patient Portal is for existing patients only */
.hero .portal-note {
  margin: 18px 0 0; padding: 12px 16px; font-size: .95rem; line-height: 1.5;
  background: #fff1f0; border: 1px solid #e8b4b0; border-left: 5px solid #c62828; border-radius: 6px;
  color: #8e1a1a;
}
.portal-note strong { color: #c62828; }
.portal-note a { color: #8e1a1a; font-weight: 700; }

.social { display: flex; gap: 14px; list-style: none; margin: 28px 0 0; padding: 0; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--blue-dark); box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transition: background .15s, color .15s;
}
.social a:hover, .social a:focus-visible { background: var(--blue-dark); color: #fff; }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Highlights */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); color: #fff; text-align: center; }
.highlight { padding: 48px 32px; }
.highlight .icon { margin: 0 auto 12px; width: 48px; height: 48px; }
.highlight h2 { font-size: 1.4rem; }
.highlight p { margin: 0; }
.h1 { background: #3f7fc2; }
.h2 { background: var(--blue-mid); }
.h3 { background: var(--blue-dark); }

/* Sections */
.section { padding: 80px 0; }
.section-head { max-width: 820px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); color: var(--blue-dark); }
.section-head p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-img { width: 100%; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(18,53,91,.15); }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.feature-list li { display: flex; gap: 18px; }
.feature-list .icon { color: var(--blue); }
.feature-list h3 { font-size: 1.15rem; margin-bottom: .25em; }
.feature-list p { margin: 0; color: var(--muted); }

/* Services */
.services { background: var(--blue-dark); color: #fff; }
.services .section-head h2 { color: #fff; }
.services .section-head p { color: #d6e3f2; text-align: left; }
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.service-grid li {
  display: flex; align-items: center; gap: 16px;
  padding: 24px; border-radius: var(--radius);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
}
.service-grid .icon { width: 44px; height: 44px; color: var(--sky); }
.service-grid h3 { margin: 0; font-size: 1.05rem; }

/* Care of heart */
.care { display: grid; grid-template-columns: 1fr 1fr; }
.care-img { background: url("images/care.jpeg") center / cover no-repeat; min-height: 360px; }
.care-copy { padding: 64px clamp(24px, 6vw, 80px); align-self: center; }
.care-copy h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); color: var(--blue-dark); }

/* Doctor */
.doctor { background: var(--tint); }
.doctor-card { margin: 0 auto; max-width: 420px; text-align: center; }
.doctor-card img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(18,53,91,.2); }
.doctor-card figcaption { margin-top: 16px; }
.doctor-card strong { display: block; font: 500 1.4rem "Oswald", sans-serif; text-transform: uppercase; color: var(--blue-dark); }
.doctor-card span { color: var(--muted); }

/* Reviews */
.reviews { padding: 56px 0; text-align: center; background: #fff; border-top: 1px solid #dbe5f1; }
.reviews h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--blue-dark); }
.reviews p { color: var(--muted); max-width: 520px; margin-inline: auto; }
.reviews .btn-row { justify-content: center; }
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 12px; color: #f5b400; }
.stars svg { width: 28px; height: 28px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: stretch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; align-content: start; }
.contact-list li { display: flex; gap: 16px; }
.contact-list .icon { width: 32px; height: 32px; color: var(--blue); }
.contact-list strong { display: block; color: var(--blue-dark); }
.contact-list small { display: block; color: var(--muted); }
.map { width: 100%; min-height: 340px; border: 0; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(18,53,91,.15); }

/* Footer */
.site-footer { background: #2b2f33; color: #d5d9de; text-align: center; padding: 40px 0; font-size: .9rem; }
.site-footer p { margin: 0 0 1em; }
.site-footer .copy { margin: 0; color: #9aa1a9; }
.site-footer a { color: var(--sky); }

/* Tablet */
@media (max-width: 900px) {
  .highlights { grid-template-columns: 1fr; }
  .split, .contact-grid, .care { grid-template-columns: 1fr; }
  .care-img { min-height: 260px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 56px 0; }
}

/* Mobile */
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--blue-dark); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .header-right { gap: 12px; }
  .brand { font-size: 1.05rem; }
  .hero { background-image: linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)), url("images/hero.jpeg?v=2"); background-position: center; min-height: 0; }
  .hero-inner { padding-block: 48px; }
  .service-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
