/* ═══ SHARED NAV/TOPBAR/MEGA/FOOTER — /includes/head-nav.css ═══ */
/* Cherrydale Family Dental — adapted from Lansdowne system */

/* TOPBAR */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 36px; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-inner { margin: 0 auto; padding: 0 48px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.topbar-left { display: flex; gap: 8px; align-items: center; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.topbar-left .sep { color: rgba(255,255,255,.15); }
.topbar-left a { color: rgba(255,255,255,.7); transition: color .2s; text-decoration: none; }
.topbar-left a:hover { color: var(--white); }
.topbar-phone { font-weight: 600; color: rgba(255,255,255,.9) !important; letter-spacing: .06em; }
.topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar-right a { font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.45); transition: color .2s; text-decoration: none; }
.topbar-right a:hover { color: var(--white); }
.topbar-cta { color: var(--warm) !important; font-weight: 500; }
.topbar-cta:hover { color: #e8b76a !important; }
.hide-mobile { }

/* NAV */
.nav { position: fixed; top: 36px; left: 0; right: 0; z-index: 190; height: 64px; background: var(--white); border-bottom: 1px solid var(--pearl); transition: all .35s ease; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; max-width: none; }
.nav.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,.05); border-bottom-color: transparent; }
.nav-brand { font-family: var(--serif); font-size: 1.32rem; font-weight: 500; color: var(--ink); letter-spacing: -.005em; white-space: nowrap; text-decoration: none; }
.nav-brand em { font-style: normal; font-weight: 300; color: var(--accent); }
.nav-links { display: flex; gap: 0; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a { font-family: var(--sans); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cloud); font-weight: 400; transition: color .25s; text-decoration: none; padding: .9rem 1rem; display: flex; align-items: center; gap: .35em; white-space: nowrap; }
.nav-links > li > a:hover { color: var(--ink); }
.nav-cta { padding: 11px 28px !important; background: var(--accent); color: var(--white) !important; border: 0; border-radius: 5px; font-size: .66rem !important; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; transition: all .25s; }
.nav-cta:hover { background: var(--accent-hover); box-shadow: 0 4px 14px rgba(26,107,138,.2); transform: translateY(-1px); color: var(--white) !important; }

/* CHEVRON */
.nav-chevron { width: 10px; height: 6px; transition: transform .3s ease; opacity: .5; }
.nav-item-group:hover .nav-chevron { transform: rotate(180deg); opacity: 1; }

/* MEGA MENU */
.nav-mega { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); min-width: 680px; background: rgba(17,24,32,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(26,107,138,.15); border-top: 2px solid rgba(26,107,138,.35); border-radius: 0 0 6px 6px; box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 0 0 1px rgba(26,107,138,.06); padding: 2rem 2.2rem 1.8rem; opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(8px); transition: opacity .3s ease, transform .3s ease, visibility .3s ease; pointer-events: none; z-index: 9999; }
.nav-item-group:hover > .nav-mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.nav-item-group::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; display: none; }
.nav-item-group:hover::after { display: block; }

.nav-mega-inner { display: grid; gap: 1.8rem; }
.nav-mega-inner.cols-3 { grid-template-columns: 1fr 1fr 1.3fr; }

.nav-mega-col h4 { font-family: var(--sans); font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem 0; padding-bottom: .55rem; border-bottom: 1px solid rgba(26,107,138,.18); font-weight: 500; }
.nav-mega-col ul { list-style: none; margin: 0; padding: 0; }
.nav-mega-col ul li { margin-bottom: .15rem; }
.nav-mega-col ul a { font-family: var(--sans); font-size: .82rem; color: rgba(255,255,255,.78); text-decoration: none; padding: .4rem 0; display: block; transition: color .2s ease, transform .2s ease; letter-spacing: .03em; }
.nav-mega-col ul a:hover { color: var(--accent); transform: translateX(3px); }

/* MEGA FEATURE CARD */
.nav-mega-feature { background: rgba(26,107,138,.06); border: 1px solid rgba(26,107,138,.16); border-radius: 5px; overflow: hidden; transition: border-color .3s ease, box-shadow .3s ease; }
.nav-mega-feature:hover { border-color: rgba(26,107,138,.42); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.nav-mega-feature-img { height: 140px; background-size: cover; background-position: center; }
.nav-mega-feature-body { padding: 1rem 1.1rem 1.1rem; }
.nav-mega-feature-eyebrow { font-family: var(--sans); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: .35rem; }
.nav-mega-feature h5 { font-family: var(--serif); font-size: 1.1rem; color: #fff; margin: 0 0 .4rem 0; font-weight: 500; line-height: 1.3; }
.nav-mega-feature p { font-family: var(--sans); font-size: .78rem; color: rgba(255,255,255,.55); margin: 0 0 .7rem 0; line-height: 1.55; }
.nav-mega-feature-link { font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; transition: gap .25s ease; }
.nav-mega-feature-link:hover { gap: .7em; }
.nav-mega-feature-link svg { transition: transform .25s ease; }
.nav-mega-feature-link:hover svg { transform: translateX(2px); }

/* HAMBURGER + MOBILE NAV */
.hamburger { display: none; cursor: pointer; z-index: 200; background: none; border: none; padding: 8px; margin-right: -8px; }
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--charcoal); margin: 5px 0; transition: all .3s; }
.mobile-nav-overlay { position: fixed; inset: 0; z-index: 195; background: rgba(17,24,32,.97); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; opacity: 0; pointer-events: none; transition: opacity .3s ease; overflow-y: auto; padding: 60px 20px; }
.mobile-nav-overlay.open { opacity: 1; pointer-events: all; }
.mobile-nav-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: var(--white); font-size: 2rem; cursor: pointer; font-family: var(--sans); font-weight: 300; line-height: 1; padding: 8px; }
.mobile-nav-close:hover { color: var(--accent); }
.mobile-nav-overlay > a { font-family: var(--serif); font-size: 1.5rem; color: var(--white); font-weight: 300; letter-spacing: .02em; transition: color .3s; text-decoration: none; }
.mobile-nav-overlay > a:hover { color: var(--accent); }
.mobile-nav-divider { width: 30px; height: 1px; background: var(--accent); opacity: .3; }
.mobile-cta-row { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; margin-top: 8px; }
.mobile-cta { display: block; text-align: center; padding: 14px 24px; border: 1px solid rgba(26,107,138,.5); border-radius: 999px; font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--white); text-decoration: none; transition: all .3s; }
.mobile-cta:hover { border-color: var(--accent); background: rgba(26,107,138,.12); }
.mobile-cta-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.mobile-cta-primary:hover { background: var(--accent-hover); }
.mobile-nav-meta { margin-top: 16px; text-align: center; }
.mobile-nav-meta p { font-family: var(--sans); font-size: .68rem; color: rgba(255,255,255,.25); margin: 0; line-height: 1.8; letter-spacing: .04em; }

/* Mobile sub-overlay (slides over main overlay) */
.mobile-sub-overlay { display: none; }
@media (max-width: 1024px) {
.mobile-sub-overlay { display: flex; position: fixed; inset: 0; z-index: 200; background: rgba(17,24,32,.98); flex-direction: column; align-items: center; justify-content: center; gap: 18px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; transform: translateX(100%); padding: 60px 20px; overflow-y: auto; }
.mobile-sub-overlay.open { opacity: 1; pointer-events: all; transform: translateX(0); }
}
.mobile-sub-back { background: none; border: none; color: var(--accent); font-family: var(--sans); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; position: absolute; top: 20px; left: 20px; padding: 8px; transition: opacity .2s; }
.mobile-sub-back:hover { opacity: .7; }
.mobile-sub-title { font-family: var(--serif); font-size: 1.8rem; color: var(--accent); font-weight: 300; margin-bottom: 8px; }
.mobile-sub-overlay > a { font-family: var(--sans); font-size: 1.1rem; color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; letter-spacing: .03em; }
.mobile-sub-overlay > a:hover { color: var(--white); }
.mobile-sub-cta-row { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; margin-top: 24px; }

/* FOOTER */
.footer { padding: 72px 0; background: var(--ink); position: relative; }
.footer::before { display: none; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 0 48px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-brand { font-family: var(--serif); font-size: 1.2rem; color: var(--white); font-weight: 300; text-decoration: none; }
.footer-brand em { font-style: normal; color: rgba(255,255,255,.4); }
.footer-links { display: flex; gap: 28px; }
.footer-links a { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.4); transition: color .2s; text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-meta { max-width: 1320px; margin: 24px auto 0; padding: 0 48px; text-align: center; }
.footer-meta p { color: rgba(255,255,255,.35); font-size: .8rem; }
.footer-meta a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-meta a:hover { color: var(--white); }
.footer-copy { max-width: 1320px; margin: 16px auto 0; padding: 20px 48px 0; text-align: center; border-top: 1px solid rgba(255,255,255,.08); font-size: .7rem; color: rgba(255,255,255,.25); }
.footer-copy a { color: rgba(255,255,255,.35); text-decoration: none; }

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
  .topbar-inner { padding: 0 16px; }
  .topbar-left .hide-mobile { display: none; }
  .topbar-left .show-mobile { display: inline !important; }
  .topbar-right .hide-mobile { display: none; }
  .topbar-right .show-mobile { display: inline !important; }
  .nav { padding: 0 20px; }
  .nav-links { display: none !important; }
  .hamburger { display: block; }
  .footer-inner { padding: 0 24px; flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-meta { padding: 0 24px; }
  .footer-copy { padding: 20px 24px 0; }
}
