/* ════════════════════════════════════════════
   DR DAVID MA — STYLESHEET v4  (clean rebuild)
   Source Serif 4 + Outfit  |  No legacy conflicts
════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Outfit:wght@300;400;500;600&display=swap');

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

:root {
  --navy:   #0c2340; --navy2:  #163756; --blue:   #1a5fa6;
  --sky:    #eaf3fc; --skymid: #cce2f6; --off:    #f6f9fc;
  --border: #dde8f4; --text:   #0c2340; --muted:  #536f8f;
  --serif:  'Source Serif 4', Georgia, serif;
  --sans:   'Outfit', system-ui, sans-serif;
  --r: 5px; --sh: 0 2px 12px rgba(12,35,64,0.07); --sh2: 0 8px 32px rgba(12,35,64,0.11);
}

html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: var(--sans); background: #fff; color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ══ UTILITY BAR ══ */
.util-bar { background: var(--navy2); border-bottom: 1px solid rgba(255,255,255,0.06); }
.util-inner { max-width: 1200px; margin: 0 auto; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; height: 34px; font-size: 0.68rem; color: rgba(255,255,255,0.45); }
.util-text { letter-spacing: 0.02em; }
.util-right { display: flex; align-items: center; gap: 1.2rem; }
.util-right a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color .15s; }
.util-right a:hover { color: #7ab8e8; }
.util-phone { color: #7ab8e8 !important; font-weight: 500; }
@media(max-width:768px){ .util-bar { display: none; } }

/* ══ SITE HEADER ══ */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 6px rgba(12,35,64,0.06); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 2px 16px rgba(12,35,64,0.12); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 5vw; display: flex; align-items: center; height: 76px; gap: 0.5rem; }
.header-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; margin-right: 1.5rem; }
.header-logo img { height: 68px; width: auto; display: block; }

/* ══ DESKTOP NAV ══ */
.desktop-nav { flex: 1; overflow: visible; }
.nav-list { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; height: 76px; }
.nav-item { display: flex; align-items: stretch; position: relative; }
.nav-link { display: flex; align-items: center; gap: 4px; padding: 0 0.78rem; font-size: 0.76rem; font-weight: 500; color: #3d5a7a; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, background .15s, border-color .15s; }
.nav-link:hover { color: var(--blue); background: var(--sky); }
.nav-item.active .nav-link { border-bottom-color: var(--blue); color: var(--navy); font-weight: 600; background: var(--sky); }
.caret { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .45; margin-top: 1px; flex-shrink: 0; transition: transform .2s; }
.nav-item:hover .caret { transform: rotate(180deg); }

/* ══ DROPDOWN PANEL ══ */
.dd-panel { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border); border-top: 2px solid var(--blue); border-radius: 0 0 6px 6px; box-shadow: 0 8px 28px rgba(12,35,64,0.13); z-index: 1100; min-width: 220px; animation: ddFade .15s ease; }
@keyframes ddFade { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.nav-item:hover .dd-panel, .nav-item:focus-within .dd-panel { display: block; }
.dd-link { display: block; padding: 0.55rem 1.1rem; font-size: 0.77rem; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); transition: background .1s, color .1s, padding-left .1s; white-space: nowrap; }
.dd-link:last-of-type { border-bottom: none; }
.dd-link:hover { background: var(--sky); color: var(--blue); padding-left: 1.4rem; }

/* ══ MEGA MENU ══ */
.dd-mega { left: -20px; min-width: 480px; }
.mega-cols { display: flex; }
.mega-col { flex: 1; border-right: 1px solid var(--border); }
.mega-col:last-child { border-right: none; }
.mega-col-head { padding: 0.5rem 1.1rem; font-size: 0.6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); background: var(--sky); border-bottom: 1px solid var(--skymid); }
.mega-footer { border-top: 2px solid var(--skymid); background: var(--off); border-radius: 0 0 6px 6px; }
.mega-footer a { display: block; text-align: center; padding: 0.52rem 1rem; font-size: 0.73rem; font-weight: 600; color: var(--blue); text-decoration: none; }
.mega-footer a:hover { color: var(--navy); background: var(--sky); }

/* ══ HEADER CTA ══ */
.header-cta { display: flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; padding: 0.52rem 1.1rem; border-radius: var(--r); font-size: 0.74rem; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; margin-left: 1rem; transition: background .2s; }
.header-cta:hover { background: var(--navy); }

/* ══ HAMBURGER ══ */
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; margin-left: 0.5rem; padding: 4px; flex-shrink: 0; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .25s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══ MOBILE NAV DRAWER ══ */
.mobile-nav { background: #fff; border-top: 2px solid var(--blue); overflow-y: auto; max-height: calc(100vh - 76px); position: absolute; left: 0; right: 0; box-shadow: 0 8px 24px rgba(12,35,64,0.15); z-index: 999; }
.mob-scroll { padding: 0.5rem 0 1.5rem; }
.mob-item { border-bottom: 1px solid var(--border); }
.mob-row { display: flex; align-items: center; padding: 0 1.2rem; }
.mob-link { flex: 1; display: block; padding: 0.88rem 0; font-size: 0.88rem; font-weight: 600; color: var(--navy); text-decoration: none; }
.mob-link:hover { color: var(--blue); }
.mob-toggle { background: none; border: none; cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background .15s; }
.mob-toggle:hover { background: var(--sky); }
.mob-caret-icon { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--navy); transition: transform .2s; }
.mob-toggle.open .mob-caret-icon { transform: rotate(180deg); }
.mob-sub { background: var(--off); border-top: 1px solid var(--border); }
.mob-sub-link { display: block; padding: 0.65rem 1.5rem 0.65rem 2rem; font-size: 0.81rem; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); transition: color .1s, background .1s, padding-left .1s; }
.mob-sub-link:last-child { border-bottom: none; }
.mob-sub-link:hover { color: var(--blue); background: var(--sky); padding-left: 2.4rem; }
.mob-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 1rem 1.2rem .5rem; background: var(--blue); color: #fff; padding: .85rem 1rem; border-radius: var(--r); font-size: 0.84rem; font-weight: 600; text-decoration: none; transition: background .2s; }
.mob-cta:hover { background: var(--navy); }
.mob-footer-links { display: flex; justify-content: center; gap: 1.5rem; padding: 0.5rem 1.2rem; }
.mob-footer-links a { font-size: 0.72rem; color: var(--muted); text-decoration: none; }
.mob-footer-links a:hover { color: var(--blue); }

/* ══ NAV RESPONSIVE ══ */
@media(max-width:1080px){ .nav-link { padding: 0 0.55rem; font-size: 0.71rem; } .header-logo img { height: 58px; } .header-inner { height: 68px; } .nav-list { height: 68px; } .mobile-nav { max-height: calc(100vh - 68px); } }
@media(max-width:900px){ .desktop-nav { display: none; } .header-cta { display: none; } .hamburger { display: flex; } .header-inner { height: 62px; } .header-logo img { height: 52px; } .mobile-nav { max-height: calc(100vh - 62px); } }

/* ══ PAGE BANNER ══ */
.page-banner { background: var(--navy); padding: 3rem 8vw; position: relative; overflow: hidden; }
.page-banner::after { content: ''; position: absolute; top: -80px; right: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,0.03); pointer-events: none; }
.page-banner-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.page-banner-tag { font-size: 0.67rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: #7ab8e8; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.45rem; }
.page-banner-tag::before { content: ''; width: 14px; height: 1.5px; background: #7ab8e8; border-radius: 2px; }
.page-banner h1 { font-family: var(--serif); font-size: clamp(1.7rem,3vw,2.7rem); font-weight: 400; color: #fff; line-height: 1.15; }
.page-banner h1 em { font-style: italic; color: #7ab8e8; }
.page-banner p { margin-top: 0.75rem; font-size: 0.9rem; font-weight: 300; color: rgba(255,255,255,0.6); max-width: 540px; line-height: 1.75; }

/* ══ BREADCRUMB ══ */
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.72rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ══ SECTIONS ══ */
.section { padding: 4rem 8vw; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-alt { background: var(--off); }
.section-navy { background: var(--navy); }
.section-label { font-size: 0.67rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.section-label::before { content: ''; width: 14px; height: 1.5px; background: var(--blue); border-radius: 2px; }
.section-navy .section-label { color: #7ab8e8; }
.section-navy .section-label::before { background: #7ab8e8; }
h2.sec-title { font-family: var(--serif); font-size: clamp(1.5rem,2.4vw,2.2rem); font-weight: 400; line-height: 1.2; color: var(--navy); }
h2.sec-title em { font-style: italic; color: var(--blue); }
.section-navy h2.sec-title { color: #fff; }
.section-navy h2.sec-title em { color: #7ab8e8; }

/* ══ BUTTONS ══ */
.btn { display: inline-block; padding: 0.6rem 1.5rem; border-radius: var(--r); font-size: 0.77rem; font-weight: 600; letter-spacing: .02em; text-decoration: none; transition: all .18s; cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--navy); }
.btn-outline { border: 1.5px solid var(--blue); color: var(--blue); background: transparent; } .btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--navy); } .btn-white:hover { background: var(--sky); }
.btn-outline-white { border: 1.5px solid rgba(255,255,255,0.35); color: #fff; background: transparent; } .btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.07); }

/* ══ TRUST BAR ══ */
.trust-bar { background: var(--sky); border-top: 1px solid var(--skymid); border-bottom: 1px solid var(--skymid); padding: 0.9rem 5vw; display: flex; gap: 2rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.trust-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.71rem; color: var(--muted); }
.trust-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

/* ══ CONDITION PAGE LAYOUT ══ */
.cp-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.cp-sidebar { position: sticky; top: 84px; }
.cp-sidebar-box { background: var(--sky); border: 1px solid var(--skymid); border-radius: 8px; padding: 1.4rem; margin-bottom: 1.2rem; }
.cp-sidebar-box h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.9rem; }
.cp-sidebar-box ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.cp-sidebar-box ul li a { font-size: 0.78rem; color: var(--navy); text-decoration: none; display: block; transition: color .15s; }
.cp-sidebar-box ul li a:hover { color: var(--blue); }
.cp-book-box { background: var(--navy); border-radius: 8px; padding: 1.4rem; }
.cp-book-box p { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 1rem; line-height: 1.6; }

/* ── Condition photo ── */
.cp-photo { float: right; width: 230px; margin: 0 0 1.2rem 1.8rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--sh); }
.cp-photo img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cp-photo-cap { font-size: 0.66rem; color: var(--muted); text-align: center; padding: 0.35rem 0.6rem; background: var(--off); border-top: 1px solid var(--border); line-height: 1.4; }
.clearfix::after { content: ''; display: table; clear: both; }
@media(max-width:820px){ .cp-photo { float: none; width: 100%; margin: 0 0 1.2rem; } .cp-photo img { height: 200px; } }

/* ── Condition sections ── */
.cp-sec { margin: 2rem 0 0.75rem; }
.cp-sec-hd { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.55rem; border-bottom: 1.5px solid var(--border); }
.cp-sec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.cp-sec-hd h2 { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--navy); line-height: 1.25; margin: 0; }
.cp-sec-hd h2 em { font-style: italic; color: var(--blue); }
.cp-intro, .cp-prose { font-size: 0.88rem; line-height: 1.8; color: #2d4e6e; font-weight: 300; margin-bottom: 0.7rem; }
.cp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.cp-panel { background: var(--off); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.2rem; }
.cp-panel-hd { font-size: 0.72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.6rem; }
.cp-panel ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.cp-panel ul li { font-size: 0.83rem; color: var(--muted); padding-left: 1rem; position: relative; }
.cp-panel ul li::before { content: '·'; position: absolute; left: 0; color: var(--blue); }
.cp-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.cp-tag { background: var(--sky); border: 1px solid var(--skymid); border-radius: 100px; padding: 0.2rem 0.7rem; font-size: 0.72rem; color: var(--navy); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; text-align: left; cursor: pointer; padding: 0.9rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.faq-item.open .faq-a { display: none; padding: 0 0 0.9rem; font-size: 0.85rem; line-height: 1.75; color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.loc-note { background: var(--sky); border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0; padding: 0.9rem 1.2rem; margin: 1.5rem 0; font-size: 0.83rem; color: var(--navy); line-height: 1.6; }
@media(max-width:900px){ .cp-layout { grid-template-columns: 1fr; } .cp-sidebar { position: static; } .cp-pair { grid-template-columns: 1fr; } }


.cp-float-h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; color: var(--navy); line-height: 1.25; margin: 0 0 0.8rem 0; }
.cp-float-h2 em { font-style: italic; color: var(--blue); }
/* ══ FOOTER ══ */
footer.main-footer { background: var(--navy); padding: 3.5rem 8vw 1.8rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-logo { height: 52px; width: auto; background: #fff; border-radius: 0; padding: 6px 12px; opacity: 1; margin-bottom: 0.9rem; display: block; box-sizing: content-box; }
.footer-tagline { font-size: 0.63rem; letter-spacing: .09em; text-transform: uppercase; color: #7ab8e8; margin: 0.3rem 0 0.8rem; }
.footer-desc { font-size: 0.76rem; color: rgba(255,255,255,0.28); line-height: 1.7; }
.footer-col h4 { font-size: 0.64rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: rgba(255,255,255,0.38); margin-bottom: 0.9rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col ul li a { font-size: 0.76rem; color: rgba(255,255,255,0.3); text-decoration: none; transition: color .15s; }
.footer-col ul li a:hover { color: #7ab8e8; }
.footer-bottom { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; flex-wrap: wrap; gap: 0.4rem; }
.footer-bottom p { font-size: 0.67rem; color: rgba(255,255,255,0.16); }

/* ══ REVEAL ══ */
.reveal { opacity: 1; transform: none; }


/* ══ PAGE RESPONSIVE ══ */
@media(max-width:1024px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:768px){ .section { padding: 3rem 5vw; } .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } .page-banner { padding: 2.5rem 5vw; } }
