/* ==========================================================================
   CMC MD PLLC — shared design system (tokens + header/nav/footer + motion)
   Clone of https://www.cmc-md.org (source platform: Wix). Owned by the
   orchestrator. Page subagents append ONLY under a "page:<slug>" banner and
   never edit the sections above that banner.
   ========================================================================== */

:root {
  /* palette (sampled from source screenshots + Wix chat theme config) */
  --teal: #39bacc;
  --teal-dark: #2ba3b5;
  --teal-darker: #1f8b9c;
  --mint: #ecf6f7;         /* light section background */
  --mint-2: #e4f2f4;
  --ink: #17181a;          /* near-black footer / band */
  --ink-2: #1a1617;
  --text: #1d2224;         /* primary body text */
  --muted: #55636a;        /* secondary body text */
  --heading: #14181b;      /* near-black headings on light */
  --white: #ffffff;
  --line: #e6ecee;

  /* typography */
  --font-head: "DM Sans", "Segoe UI", Arial, sans-serif;
  --font-body: "Lato", "Segoe UI", Arial, sans-serif;

  /* rhythm */
  --maxw: 1200px;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 6px 18px rgba(20,40,50,.08);
  --shadow-md: 0 14px 40px rgba(20,40,50,.14);
  --section-y: 88px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1rem; }

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

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-head);
  text-transform: none;
  color: var(--teal);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 46px; height: 14px;
  display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='14' viewBox='0 0 46 14'%3E%3Cpath d='M0 7h13l2.5-5.5 2 11 2.5-8 1.5 2.5H46' fill='none' stroke='%2339bacc' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.eyebrow::before { transform: scaleX(-1); }
.eyebrow.left::before { display: none; }

.section { padding: var(--section-y) 0; }
.section.mint { background: var(--mint); }
.center { text-align: center; }
.lead { color: var(--muted); font-size: 1.06rem; max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .98rem;
  cursor: pointer;
  border: 0;
  transition: background-color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.btn-pill {
  background: var(--teal);
  color: var(--white);
  padding: 13px 26px;
  border-radius: var(--radius-pill);
}
.btn-pill:hover { background: var(--teal-dark); color: var(--white); text-decoration: none; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--teal-darker);
  border: 2px solid var(--teal);
  padding: 11px 24px;
  border-radius: var(--radius-pill);
}
.btn-outline:hover { background: var(--teal); color: var(--white); text-decoration: none; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--heading);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.02rem;
  justify-self: start;
}
.phone-link:hover { text-decoration: none; color: var(--teal-darker); }
.phone-ic {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.brand { justify-self: center; }
.brand img { height: 62px; width: auto; }
.topbar-cta { justify-self: end; }

.nav-toggle {
  display: none;
  background: var(--teal);
  color: #fff;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.mainnav { background: var(--teal); }
.nav-list {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 62px);
}
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block;
  padding: 15px 4px;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .98rem;
}
.nav-list > li > a:hover { color: #fff; text-decoration: none; }

/* dropdown submenu */
.has-sub > a::after {
  content: "▾";
  font-size: .7em;
  margin-left: 6px;
  vertical-align: middle;
}
.subnav {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%) translateY(8px);
  min-width: 288px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 60;
}
/* NOTE: .subnav hides only the NAV FLYOUT (no page copy lives inside it); the
   links remain in the DOM and reachable, and the footer repeats every target. */
.has-sub:hover .subnav,
.has-sub:focus-within .subnav {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.subnav li a {
  display: block;
  padding: 10px 22px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .95rem;
  white-space: nowrap;
}
.subnav li a:hover { background: var(--mint); color: var(--teal-darker); text-decoration: none; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--ink); color: #cfd6d9; }
.newsletter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.nl-inner { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.newsletter h3 { color: #fff; margin: 0; font-size: 1.5rem; }
.nl-form {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-pill);
  padding: 5px 5px 5px 20px;
}
.nl-form input {
  background: transparent;
  border: 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: .95rem;
  min-width: 190px;
  outline: none;
}
.nl-form input::placeholder { color: #9aa4a8; }
.footer-cols {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.2fr 1fr;
  gap: 34px;
}
.fcol h4 { color: #fff; font-size: 1.15rem; margin: 0 0 20px; }
.fcol ul { list-style: none; margin: 0; padding: 0; }
.fcol li { margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.fcol a { color: #cfd6d9; }
.fcol a:hover { color: var(--teal); text-decoration: none; }
.fcol .tick { color: var(--teal); flex: 0 0 auto; }
.foot-ic { color: var(--teal); flex: 0 0 auto; margin-top: 2px; }
.footer-bottom {
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .86rem;
  color: #9aa4a8;
}

/* ==========================================================================
   HERO (shared base for internal-page hero band)
   ========================================================================== */
.page-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.page-hero .hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(10,20,24,.42);
  z-index: 1;
}
.page-hero .hero-inner { position: relative; z-index: 2; color: #fff; padding: 70px 24px; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,.92); margin-left: auto; margin-right: auto; }

/* ==========================================================================
   MOTION — pure-CSS on-load reveals (always end visible: the keyframe runs
   unconditionally and fill-mode both leaves the element at its 100% state).
   No stylesheet rule ever leaves real content hidden.
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.reveal { animation: fadeUp .7s ease both; }
.reveal.d1 { animation-delay: .12s; }
.reveal.d2 { animation-delay: .24s; }
.reveal.d3 { animation-delay: .36s; }
.reveal.d4 { animation-delay: .48s; }

/* ---------- accordion (FAQ) ---------- */
.accordion details {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  background: #fff;
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--heading);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "⌄";
  font-size: 1.3rem;
  line-height: 1;
  transition: transform .25s ease;
  color: var(--muted);
}
.accordion details[open] summary::after { transform: rotate(180deg); }
.accordion .acc-body { padding: 0 24px 20px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   SERVICES SIDEBAR MENU (service detail pages)
   ========================================================================== */
.svc-menu {
  background: var(--mint);
  border-radius: 14px;
  padding: 22px 20px;
  margin-bottom: 30px;
}
.svc-menu ul { list-style: none; margin: 0; padding: 0; }
.svc-menu li { margin-bottom: 12px; }
.svc-menu li:last-child { margin-bottom: 0; }
.svc-menu a {
  display: block;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .95rem;
  text-align: center;
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  transition: background-color .22s ease, transform .2s ease;
}
.svc-menu a:hover { background: var(--teal-dark); color: #fff; text-decoration: none; transform: translateY(-2px); }
.svc-menu a[aria-current="page"] { background: var(--ink); color: #fff; }
.svc-menu a[aria-current="page"]:hover { background: var(--ink); transform: none; }

/* ==========================================================================
   LIGHT PAGE HERO (dark copy over a light photo)
   ========================================================================== */
.page-hero.hero-light::after { background: rgba(255,255,255,.62); }
.page-hero.hero-light .hero-inner { color: var(--text); }
.page-hero.hero-light h1 { color: var(--heading); }
.page-hero.hero-light .lead { color: var(--muted); }

/* ==========================================================================
   TESTIMONIAL CARDS (home / about / testimonials page)
   ========================================================================== */
.tst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; margin: 44px 0 40px; }
.tst-card { margin: 0; position: relative; }
.tst-bubble {
  background: var(--teal);
  color: #fff;
  border-radius: 18px;
  padding: 24px 24px 30px;
  position: relative;
  text-align: left;
  box-shadow: var(--shadow-md);
}
.tst-bubble::after {
  content: "";
  position: absolute;
  left: 34px; bottom: -14px;
  border-width: 14px 14px 0 0;
  border-style: solid;
  border-color: var(--teal) transparent transparent transparent;
}
.tst-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tst-name { font-family: var(--font-head); font-weight: 700; }
.stars { color: #ffd24a; letter-spacing: 1px; font-size: .95rem; }
.tst-bubble blockquote { margin: 0; font-size: .98rem; line-height: 1.55; }

/* ==========================================================================
   BLOG
   ========================================================================== */
.blog-list { display: grid; gap: 34px; margin-top: 40px; }
.post-card {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card .pc-media { overflow: hidden; }
.post-card .pc-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .pc-body { padding: 28px 30px; display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.post-meta img { width: 34px; height: 34px; border-radius: 50%; }
.post-meta .pm-name { font-family: var(--font-head); font-weight: 700; color: var(--text); display: block; font-size: .9rem; }
.post-card h2 { font-size: 1.45rem; margin-bottom: 12px; }
.post-card h2 a { color: var(--heading); }
.post-card h2 a:hover { color: var(--teal-darker); text-decoration: none; }
.post-card p { color: var(--muted); font-size: .96rem; margin: 0 0 18px; }
.post-card .pc-more { margin-top: auto; font-family: var(--font-head); font-weight: 700; color: var(--teal-darker); }

.post-wrap { max-width: 820px; margin: 0 auto; }
.post-wrap .post-hero-img { width: 100%; border-radius: 16px; margin-bottom: 34px; }
.post-wrap h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 40px 0 14px; }
.post-wrap h3 { font-size: clamp(1.1rem, 2vw, 1.28rem); margin: 30px 0 10px; }
.post-wrap p { color: var(--text); }
.post-wrap ul { color: var(--text); padding-left: 22px; margin: 0 0 1rem; }
.post-wrap li { margin-bottom: 8px; }
.post-back { display: inline-block; margin-top: 40px; }
.post-nav { border-top: 1px solid var(--line); margin-top: 46px; padding-top: 26px; }

/* ==========================================================================
   FLAT TEAL ICONS (why-choose-us / our-values)
   ========================================================================== */
.ic { width: 46px; height: 46px; color: var(--teal); display: block; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  :root { --section-y: 60px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .newsletter { justify-content: center; text-align: center; }
}
@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }
  .topbar-cta { display: none; }
  .nav-toggle { display: inline-block; justify-self: end; }
  .mainnav { display: none; }
  .mainnav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px; }
  .nav-list > li > a { padding: 12px 4px; }
  .subnav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: rgba(255,255,255,.16);
    min-width: 0;
    padding: 4px 0 4px 14px;
  }
  .subnav li a { color: #fff; }
  .footer-cols { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .tst-grid { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr; }
  .post-card .pc-media { max-height: 260px; }
}
