/* ============================================================
   DAVID WEI MD — SHARED STYLESHEET
   davidweimd.com
   ============================================================ */

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

:root {
  --navy:       #0d1f35;
  --navy-mid:   #1a3352;
  --navy-light: #243d5c;
  --gold:       #b8945a;
  --gold-light: #d4b07a;
  --gold-dim:   rgba(184,148,90,0.15);
  --cream:      #f7f4ef;
  --cream-dark: #ede9e1;
  --text:       #2a2a2a;
  --text-muted: #6b6b6b;
  --white:      #ffffff;
  --section-pad: clamp(5rem, 8vw, 9rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 17px;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.1;
}

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a07840;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.section-title.light { color: var(--white); }

.gold-rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 2.5rem;
}

/* ---- LAYOUT ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

section { padding: var(--section-pad) 0; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 2px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(184,148,90,0.5);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(13,31,53,0.3);
}
.btn-outline-dark:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--cream);
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem;
  height: 68px;
  background: rgba(13,31,53,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,148,90,0.15);
  transition: height 0.3s;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--cream);
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo em { color: var(--gold); font-style: normal; }
.nav-center { display: flex; align-items: center; list-style: none; }
.nav-item { position: relative; }
.nav-item > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(247,244,239,0.85);
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 1rem;
  height: 68px;
  transition: color 0.2s;
}
.nav-item > a:hover,
.nav-item > a.active { color: var(--gold-light); }
.chevron { font-size: 0.5rem; opacity: 0.5; transition: transform 0.2s; }
.nav-item:hover > a .chevron { transform: rotate(180deg); }
.dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 210px;
  background: #091624;
  border: 1px solid rgba(184,148,90,0.2);
  border-top: 2px solid var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 300;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 0.7rem 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.6);
  text-decoration: none;
  transition: all 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { color: var(--gold-light); background: rgba(184,148,90,0.08); padding-left: 1.6rem; }
.nav-cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.55rem 1.35rem;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  margin-left: 0.75rem;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--gold-light); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 300;
  position: relative;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
}

/* ---- PAGE HERO/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: var(--navy);
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 90% at 80% 50%, rgba(184,148,90,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 2; }

.page-hero-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 4.5vw, 3.5rem);
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.page-hero-desc {
  font-size: 1.1rem;
  line-height: 1.9;
  color: rgba(247,244,239,0.85);
  max-width: 560px;
}

/* ---- FOOTER ---- */
footer {
  background: var(--navy);
  padding-top: 5rem;
}

.footer-inner, .footer-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem) 4rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 4rem;
  border-bottom: 1px solid rgba(184,148,90,0.12);
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--cream);
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.footer-name span { color: var(--gold); }

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(247,244,239,0.45);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(184,148,90,0.25);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247,244,239,0.45);
  text-decoration: none;
  transition: all 0.3s;
}
.footer-socials a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.footer-nav-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.footer-nav ul { list-style: none; }
.footer-nav ul li { margin-bottom: 0.65rem; }
.footer-nav ul li a {
  font-size: 0.84rem;
  color: rgba(247,244,239,0.5);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-nav ul li a:hover { color: var(--gold-light); }

.footer-contact p {
  font-size: 0.82rem;
  color: rgba(247,244,239,0.5);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.footer-contact strong { color: rgba(247,244,239,0.75); font-weight: 400; }
.footer-contact a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-contact a:hover { color: var(--gold); }

.footer-logos {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  border-bottom: 1px solid rgba(184,148,90,0.08);
}

.footer-logos a {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.3);
  text-decoration: none;
  transition: color 0.25s;
}
.footer-logos a:hover { color: rgba(247,244,239,0.65); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(247,244,239,0.25);
  letter-spacing: 0.04em;
}

/* ---- REVEAL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-inner, .footer-main { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 900px) {
  .nav-center { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(9,22,36,0.99); padding: 1rem 0 1.5rem; border-bottom: 1px solid rgba(184,148,90,0.2); gap: 0; z-index: 199; }
  .nav-item > a { padding: 0.75rem 2rem; height: auto; font-size: 0.82rem; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-top: none; background: rgba(255,255,255,0.04); padding-left: 1rem; }
  .nav-hamburger { display: flex; }
  nav { padding: 0 1.25rem !important; }
  .nav-hamburger { padding: 12px !important; gap: 5px !important; }
  .nav-hamburger span { width: 26px !important; height: 2px !important; }
  .nav-cta { display: none; }
  .footer-inner, .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- SHARED NAV JS ---- */

/* Mobile nav open state */
.nav-center.nav-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: #0b1a2e;
  padding: 0.5rem 0 2rem;
  border-top: 1px solid rgba(184,148,90,0.15);
  z-index: 9999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile nav items — consistent alignment */
.nav-center.nav-open .nav-item { width: 100%; }
.nav-center.nav-open .nav-item > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.75rem;
  height: auto;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(247,244,239,0.85);
}
.nav-center.nav-open .nav-item > a:hover { color: var(--gold-light); }

/* Mobile dropdowns — collapsible, hidden by default */
.nav-center.nav-open .dropdown {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  background: rgba(255,255,255,0.03);
  padding: 0 0 0 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.nav-center.nav-open .dropdown.open {
  max-height: 300px;
}
.nav-center.nav-open .dropdown a {
  padding: 0.65rem 1.75rem 0.65rem 2.5rem;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: block;
  color: rgba(247,244,239,0.55);
}
.nav-center.nav-open .dropdown a:hover { color: var(--gold-light); }

/* Chevron rotation when open */
.nav-center.nav-open .nav-item.dropdown-open > a .chevron { transform: rotate(180deg); }

/* Remove inline Clinical Care padding on mobile */
@media (max-width: 900px) {
  .nav-center.nav-open .nav-item[style*="margin-left"] { margin-left: 0 !important; border-left: none !important; padding-left: 0 !important; }
  .nav-center.nav-open .nav-item[style*="margin-left"] > a { color: rgba(184,148,90,0.85) !important; font-size: 0.82rem !important; }
}

/* ---- FOOTER BRAND (shared across all pages) ---- */
.footer-brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--white); font-weight: 400; margin-bottom: 0.35rem; }
.footer-brand-name em { color: var(--gold); font-style: normal; }
.footer-brand-sub { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(247,244,239,0.28); margin-bottom: 0.75rem; }
.footer-brand-desc { font-size: 0.83rem; line-height: 1.85; color: rgba(247,244,239,0.42); margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 0.5rem; }
.social-btn { width: 33px; height: 33px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(184,148,90,0.16); display: flex; align-items: center; justify-content: center; color: rgba(247,244,239,0.45); text-decoration: none; font-size: 0.78rem; transition: all 0.2s; }
.social-btn:hover { background: rgba(184,148,90,0.14); color: var(--gold-light); border-color: rgba(184,148,90,0.38); }

/* ---- REVIEWS ---- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--cream-dark); border: 1px solid var(--cream-dark); margin-top: 3rem; }
.review-card { background: var(--white); padding: 2.5rem 2rem; }
.review-stars { display: flex; gap: 3px; margin-bottom: 1rem; }
.review-stars span { color: var(--gold); font-size: 0.75rem; }
.review-text { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); font-style: italic; font-weight: 300; margin-bottom: 1.25rem; }
.review-text::before { content: '\201C'; }
.review-text::after { content: '\201D'; }
.review-author { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 900px) { .reviews-grid { grid-template-columns: 1fr; } }

/* Contact open-to grid responsive */
@media (max-width: 900px) {
  .open-to-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  .open-to-grid { grid-template-columns: 1fr !important; }
}

/* ---- FOOTER COLUMNS (shared) ---- */
.footer-col-title { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.88rem; color: rgba(247,244,239,0.65); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.72rem; color: rgba(247,244,239,0.22); }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 0.72rem; color: rgba(247,244,239,0.22); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: rgba(247,244,239,0.5); }
