/* theme.css — MP Weight Loss Clinic theme layered OVER Bootstrap 5.
 * Reproduces the original's clean, calm medical look (Lato, navy headings,
 * terracotta eyebrows, sage-green CTA pills, soft white rounded cards on cool
 * light-grey sections) using Bootstrap structure + these tokens. */

:root {
  /* --- Brand palette (from capture/theme.json + screenshot sampling) --- */
  --brand-primary: #7f9568;        /* sage-green CTA pill */
  --brand-primary-dark: #6b7f57;   /* CTA hover */
  --brand-accent: #c05530;         /* terracotta eyebrow / accents */
  --brand-dark: #273647;           /* navy headings + dark sections */
  --brand-navy-deep: #1f2c3a;      /* deepest navy */
  --brand-body: #4a4a4a;           /* body text */
  --brand-muted: #657386;          /* muted slate text */
  --brand-light: #f5f7fa;          /* cool light section bg */
  --brand-light-2: #f1f1f1;        /* utility bar grey */
  --brand-border: #e7ebf0;         /* card / divider border */

  /* --- Typography --- */
  --font-base: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-base);
  --font-size-base: 1rem;

  /* --- Map onto Bootstrap's CSS variables --- */
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 127, 149, 104;
  --bs-body-font-family: var(--font-base);
  --bs-body-font-size: var(--font-size-base);
  --bs-body-color: var(--brand-body);
  --bs-link-color: var(--brand-accent);
  --bs-link-hover-color: var(--brand-primary-dark);
  --bs-border-color: var(--brand-border);
}

body {
  font-family: var(--font-base);
  color: var(--brand-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.15;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }
.lead { color: var(--brand-muted); font-size: 1.15rem; }

/* Keep headings legible on dark/colored sections. */
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6 {
  color: #fff;
}

/* --- Eyebrow / pre-title (small uppercase terracotta label above a heading) --- */
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  font-size: .78rem;
  color: var(--brand-accent);
  margin-bottom: .75rem;
}
.section-dark .eyebrow { color: #e6b8a6; }

/* --- Buttons --- */
.btn { font-weight: 700; border-radius: 50rem; padding: .65rem 1.6rem; letter-spacing: .02em; }
.btn-sm { padding: .4rem 1.1rem; }
.btn-lg { padding: .85rem 2rem; }
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
}
.btn-accent {
  --bs-btn-bg: var(--brand-accent);
  --bs-btn-border-color: var(--brand-accent);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #a8492a;
  --bs-btn-hover-border-color: #a8492a;
  --bs-btn-hover-color: #fff;
  color: #fff;
}
.btn-outline-navy {
  --bs-btn-color: var(--brand-dark);
  --bs-btn-border-color: #c7cfda;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-hover-color: #fff;
}
.btn-outline-light {
  --bs-btn-hover-color: var(--brand-dark);
}

a { color: var(--brand-accent); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); }

/* --- Section helpers --- */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-light { background: var(--brand-light); }
.section-dark { background: var(--brand-dark); color: rgba(255,255,255,.85); }
.section-dark p, .section-dark li { color: rgba(255,255,255,.82); }
.section-dark .text-muted { color: rgba(255,255,255,.6) !important; }

/* --- Cards --- */
.card {
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  box-shadow: 0 6px 24px rgba(39,54,71,.06);
}
.card-body { padding: 1.75rem; }
.feature-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  box-shadow: 0 6px 24px rgba(39,54,71,.06);
  height: 100%;
}
.icon-badge {
  width: 3rem; height: 3rem; border-radius: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(127,149,104,.14); color: var(--brand-primary-dark);
  font-size: 1.35rem; margin-bottom: 1rem;
}
.icon-badge.accent { background: rgba(192,85,48,.12); color: var(--brand-accent); }
.section-dark .icon-badge { background: rgba(255,255,255,.1); color:#fff; }

/* Stat block (Local / Texas / Clear / Ongoing) */
.stat h3 { color: var(--brand-primary); font-size: 1.6rem; }
.section-dark .stat h3 { color: #b9c8a6; }

/* --- Header / utility bar --- */
.utility-bar {
  background: var(--brand-light-2);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.utility-bar a {
  color: var(--brand-dark); font-weight: 700; text-decoration: none;
  padding: .55rem .9rem; display: inline-block;
}
.utility-bar a:hover { color: var(--brand-accent); }

.site-navbar {
  background: #fff;
  box-shadow: 0 1px 0 rgba(39,54,71,.06);
  padding-top: .5rem; padding-bottom: .5rem;
}
.site-navbar .navbar-brand img { height: 42px; width: auto; }
.site-navbar .nav-link {
  color: var(--brand-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
  padding: .5rem .85rem;
  text-align: center;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: var(--brand-accent); }
.site-navbar .dropdown-menu {
  border: 1px solid var(--brand-border);
  border-radius: .75rem;
  box-shadow: 0 12px 32px rgba(39,54,71,.12);
  padding: .5rem;
}
.site-navbar .dropdown-item {
  border-radius: .5rem; font-weight: 600; font-size: .9rem;
  color: var(--brand-dark); padding: .5rem .85rem;
}
.site-navbar .dropdown-item:hover { background: var(--brand-light); color: var(--brand-accent); }
.site-navbar .dropdown-header {
  text-transform: uppercase; letter-spacing: .08em; font-size: .7rem;
  color: var(--brand-muted); font-weight: 800;
}
@media (min-width: 1200px) {
  .site-navbar .nav-link { white-space: nowrap; }
}

/* --- Footer --- */
.site-footer { background: var(--brand-navy-deep); color: rgba(255,255,255,.7); }
.site-footer h5 { color:#fff; font-size: 1rem; text-transform: uppercase; letter-spacing:.06em; }
.site-footer a:not(.btn) { color: rgba(255,255,255,.72); }
.site-footer a:not(.btn):hover, .site-footer a:not(.btn):focus { color:#fff; }
.site-footer .btn-link { color:#fff; }
.footer-badge { max-width: 120px; height:auto; }

/* --- Accordion (FAQ) --- */
.accordion { --bs-accordion-border-color: var(--brand-border); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(127,149,104,.2); }
.accordion-button { font-weight: 700; color: var(--brand-dark); }
.accordion-button:not(.collapsed) { color: var(--brand-dark); background: var(--brand-light); }
.accordion-button:focus { border-color: var(--brand-primary); }

/* --- Hero --- */
.hero-card {
  background:#fff; border-radius: 1.25rem;
  box-shadow: 0 18px 50px rgba(39,54,71,.10);
}
.hero-banner img { width:100%; height:auto; display:block; }

/* ====== Image fit helpers (keep — required by the picture() wrapper) ====== */
picture { display: contents; }
.ratio > picture > img,
.ratio > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
img { max-width: 100%; height: auto; }
.object-cover   { object-fit: cover;   }
.object-contain { object-fit: contain; background: transparent; }
.card img, .feature-card img { object-fit: contain; max-width: 100%; }
.photo-frame { background: transparent; border-radius: .5rem; overflow: hidden; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; }
.photo-frame img.object-cover { object-fit: cover; }
.photo-frame--square { aspect-ratio: 1 / 1; }
@media (max-width: 767.98px) {
  .photo-frame:not(.photo-frame--square) { height: auto !important; aspect-ratio: 4 / 3; }
}
