/* Shared responsive refinement — loaded after page-specific styles. */
:root {
  --container: 1240px;
  --radius: 18px;
  --radius-sm: 10px;
  --fs-h2: clamp(1.65rem, 1.4rem + 1.35vw, 2.6rem);
  --shadow-card: 0 5px 18px rgba(18, 35, 33, .07);
  --page-gutter: clamp(1rem, 3vw, 2rem);
}

/* Calm, consistent page rhythm and legible type. */
html { scroll-padding-top: 88px; }
body { letter-spacing: normal; }
.container { padding-inline: var(--page-gutter); }
main { min-width: 0; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 1.6rem + 2.2vw, 3.7rem); line-height: 1.12; letter-spacing: -.04em; }
h2 { line-height: 1.2; letter-spacing: -.025em; margin-bottom: .85rem; }
h3 { line-height: 1.3; }
p, li, address, dd, td { overflow-wrap: anywhere; }
.section, .canva-home .section { padding-block: clamp(2.25rem, 4.7vw, 4.25rem); }
.section-tight { padding-block: 1.5rem; }
.section-head, .section-head-wide { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.section-head > :last-child, .prose > :last-child { margin-bottom: 0; }
.prose { max-width: 75ch; }
.prose h2 { margin-top: 1.8rem; }
.prose h3 { margin-top: 1.25rem; }
.breadcrumbs { padding-block: .75rem; font-size: .84rem; }
.breadcrumbs ol { gap: .35rem .55rem; }
.breadcrumbs li { min-width: 0; }
.breadcrumbs + main > .section:first-child { padding-top: clamp(1.25rem, 2.8vw, 2.5rem); }
.eyebrow { letter-spacing: .055em; }
.grid { gap: clamp(.9rem, 2vw, 1.5rem); }
.grid > *, .card, .btn-group > *, .prose, .footer-top > * { min-width: 0; }
.grid-2 { grid-template-columns: minmax(0,1fr); }
.grid-3 { grid-template-columns: minmax(0,1fr); }
.grid-4 { grid-template-columns: minmax(0,1fr); }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 800px) { .grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); } .grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.card { gap: .75rem; padding: var(--sp-5); }
.card p, .card address { font-size: .95rem; line-height: 1.55; }
.card h3 { font-size: 1.12rem; }
.card-link:hover { box-shadow: none; }
.card-cta { padding-top: .2rem; }
.btn { text-align: center; max-width: 100%; min-height: 44px; padding: .75rem 1rem; line-height: 1.3; }
.btn-group { gap: .6rem; }
.btn-group + .grid, .btn-group + .card { margin-top: 1.5rem; }
.faq-item summary { padding-block: 1rem; line-height: 1.4; }
.faq-item summary > span { flex-shrink: 0; }
.cta-band { padding: clamp(1.5rem, 4vw, 3rem); }
.cta-band .btn-group { justify-content: center; }
.hours-table { table-layout: auto; font-size: .95rem; }
.hours-table th, .hours-table td { vertical-align: top; padding: .65rem .5rem; }
.hours-table th { color: var(--charcoal); }
.site-photo { border-radius: var(--radius); }
video, iframe { max-width: 100%; }

/* Navigation: prevent desktop links competing for space at tablet widths. */
.site-header, .site-header .header-inner { background: #fff; }
.site-header { backdrop-filter: none; }
.site-header .header-inner { min-height: 72px; gap: .9rem; }
.site-header .logo-mark { height: 44px; }
.primary-nav > ul { gap: clamp(.65rem, 1.1vw, 1rem); }
.primary-nav > ul > li > a, .primary-nav .nav-more-toggle { font-size: .9rem; }
.primary-nav > ul > li > a[aria-current="page"], .mobile-nav a[aria-current="page"] { color: var(--teal-dark); font-weight: 750; }
.header-actions { flex-shrink: 0; gap: .55rem; }
.header-actions .btn { white-space: nowrap; }
.primary-nav .mega-menu { left: 0; transform: none; }
.primary-nav .nav-more-menu { right: 0; left: auto; transform: none; }
.mobile-nav { max-height: calc(100dvh - 72px); }
.mobile-nav > ul { padding-inline: var(--page-gutter); }
.mobile-nav > ul > li > a { min-height: 48px; display: flex; align-items: center; }
.mobile-nav .nav-more-menu { position: static; transform: none; box-shadow: none; width: 100%; }
.mobile-nav .nav-more-menu a { padding: .6rem; white-space: normal; }
@media (max-width: 1199px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav.is-open { display: block !important; }
}
@media (min-width: 1200px) { .header-actions .btn-secondary { display: inline-flex; } }

/* Homepage: a readable, compact grid, retaining the original photos. */
.canva-home h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.7rem); line-height: 1.15; }
.canva-hero-copy { padding-top: clamp(2rem, 4.5vw, 3.5rem); }
.canva-hero h1 { font-size: clamp(2.45rem, 5.3vw, 4.75rem); line-height: 1.08; }
.canva-section-heading { align-items: baseline; margin-bottom: 1.25rem; gap: .25rem 1rem; }
.canva-dentist-list { gap: .85rem; }
.canva-dentist-list a { box-shadow: none; border-radius: var(--radius); }
.canva-dentist-list .dentist-card-photo { border-radius: 12px; }
.canva-dentist-name { line-height: 1.3; }
.canva-treatment-links { gap: 1rem; }
.canva-treatment-links a { border-radius: var(--radius); }
.canva-treatment-links span { font-size: 1rem; padding: .95rem; }
.canva-branch-grid { gap: 1rem; }
.canva-branch { gap: .85rem; padding: .75rem; align-items: stretch; border-radius: var(--radius); }
.canva-branch-photo { min-height: 8.25rem; }
.canva-branch h3 { line-height: 1.25; font-size: 1.06rem; }
.canva-branch h3 a { text-decoration: none; }
.canva-branch-info { padding: .1rem 0; }
.canva-branch .canva-text-link { min-height: 36px; }
.canva-booking h2 { margin-bottom: .75rem; }

/* Directory and individual treatment pages. */
.services-directory-intro .services-directory-categories { gap: .5rem; }
.services-directory-categories a { border-radius: 10px; font-size: .9rem; }
.services-directory-group .services-directory-grid { gap: 1rem; }
.services-directory-card h3 { text-wrap: initial; }
.services-directory-card .treatment-card-content { padding: 1rem; }
.services-directory-card .treatment-card-cta { color: var(--teal-dark); }
.treatment-detail > .section { padding-block: clamp(1.5rem, 3.4vw, 3rem); }
.treatment-detail > .section:first-of-type { background: #f5faf8; }
.treatment-detail .treatment-hero-photo { max-width: 440px; justify-self: end; }
.treatment-detail .prose h2 { margin-top: 1.5rem; }
.treatment-detail .steps > .step { min-width: 0; }
.treatment-detail .faq-item { background: #fff; }
.treatment-detail .hint.container { padding-top: .5rem; }

/* Doctor profiles and branch pages. */
.dentist-directory .dentist-branch-groups { gap: 1rem; align-items: start; }
.dentist-directory .dentist-branch-group { padding: 1rem; }
.dentist-directory .dentist-branch-group h2 { font-size: 1.3rem; margin-bottom: .8rem; }
.dentist-directory-cards, .branch-dentist-cards { gap: .75rem; }
.dentist-directory-cards .dentist-card, .branch-dentist-cards .dentist-card { min-width: 0; padding: .65rem; }
.dentist-card h3 { font-size: 1rem; text-wrap: initial; }
.dentist-card-role { font-size: .875rem; }
.dentist-profile-intro h1, .dentist-profile-intro h1.dentist-full-name { font-size: clamp(2.35rem, 4.4vw, 4.4rem); line-height: 1.1; }
.dentist-profile-layout { gap: clamp(1.5rem, 3.5vw, 3rem); }
.dentist-profile-role { letter-spacing: .06em; }
.dentist-profile-portrait { max-width: 460px; }
.dentist-profile-directory-portrait { max-width: 420px; }
.dentist-profile-details-layout, .dentist-bio-overview { align-items: start; }
.dentist-introduction-video .video-frame { max-width: 800px; margin-inline: auto; }
.branch-hero-photo { height: auto; min-height: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.branch-location-grid { gap: 1rem; }
.branch-location-info { align-content: start; }
.branch-review-card, .branch-directions { padding: 1.25rem; }
.branch-review-note { font-size: .8rem; }
.branch-map-heading p { font-size: .9rem; }
.branch-card { overflow: hidden; }
.branch-card .branch-card-image { flex-shrink: 0; aspect-ratio: 4/3; }
.photo-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 1rem; }
.branch-panel-logos a, .home-panel-logos a { border-radius: 12px; }
.panel-entry .panel-branches { gap: .4rem; }

/* Supporting pages and footer. */
.case-comparison, .smile-story { border-radius: var(--radius); box-shadow: none; }
.case-tab { border-radius: 10px; }
.case-tabs { gap: .5rem; }
.case-caption p { font-size: .95rem; }
.article-hero-image { object-fit: contain; background: var(--off-white); }
article.section > .prose, article.section > .container.prose { max-width: 780px; }
.footer-top { padding-block: clamp(2rem, 4vw, 3.5rem); gap: 1.5rem; }
.footer-col ul { gap: .6rem; }
.footer-col a { font-size: .9rem; line-height: 1.45; }
.footer-brand p { color: #b7c7c4; }
.footer-brand .hint, .footer-bottom { color: #a8b8b5; }
.footer-bottom a { color: #c1d1ce; }
@media (max-width: 959px) {
  .footer-top { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-brand { grid-column: 1 / -1; padding-bottom: .75rem; border-bottom: 1px solid #34504c; }
  .footer-brand p { max-width: 58ch; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

/* Mobile: compact spacing, complete touch targets and predictable columns. */
@media (max-width: 719px) {
  html { scroll-padding-top: 76px; }
  .site-header .header-inner { min-height: 64px; padding-block: .5rem; }
  .site-header .logo-mark { height: 40px; }
  .mobile-nav { max-height: calc(100dvh - 64px); }
  .section, .canva-home .section { padding-block: 2rem; }
  .card { padding: 1rem; }
  .branch-card-image { width: calc(100% + 2rem); margin: -1rem -1rem .4rem; }
  .canva-hero h1 { font-size: clamp(2.35rem, 9.5vw, 3.6rem); }
  .canva-hero-copy { padding-top: 1.75rem; }
  .canva-hero-actions { gap: .5rem; }
  .canva-hero-actions .btn { flex: 1 1 135px; max-width: 100%; }
  .canva-section-heading { align-items: flex-start; }
  .canva-section-heading .canva-text-link { min-height: 40px; }
  .canva-dentist-list li { flex-basis: calc((100% - .85rem)/2); }
  .canva-dentist-list a { padding: .4rem .4rem .7rem; }
  .canva-dentist-name { font-size: .95rem; }
  .canva-treatment-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
  .canva-treatment-links span { padding: .65rem; font-size: .94rem; }
  .canva-branch-grid { grid-template-columns: 1fr; }
  .branch-dentist-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dentist-profile-layout { gap: 1.35rem; }
  .dentist-profile-intro h1, .dentist-profile-intro h1.dentist-full-name { font-size: clamp(2.1rem, 8vw, 3.3rem); }
  .dentist-profile-directory-portrait, .dentist-profile-portrait { width: min(100%,350px); }
  .dentist-profile-facts { gap: .9rem; padding: 1rem; }
  .treatment-detail .treatment-hero-photo { width: 100%; max-width: 420px; justify-self: center; grid-row: 1; }
  .treatment-detail > .section:first-of-type .grid { gap: 1.15rem; }
  .services-directory-card .treatment-card-content { padding: .7rem; }
  .services-directory-card .treatment-card-image { flex-shrink: 0; }
  .branch-map-panel .map-embed, .branch-map-panel iframe { height: 320px; min-height: 320px; }
  .branch-review-card .btn, .branch-directions .btn { width: 100%; }
  .btn-group > .btn { flex: 1 1 145px; }
  .sticky-mobile-bar { padding-inline: .65rem; }
  .sticky-mobile-bar-btn { gap: .25rem; min-width: 0; padding-inline: .25rem; }
  .sticky-mobile-bar-btn svg { flex-shrink: 0; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .footer-bottom { flex-direction: column; gap: .4rem; }
}
@media (max-width: 359px) {
  .dentist-directory-cards, .branch-dentist-cards { grid-template-columns: 1fr; }
  .dentist-profile-facts { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .sticky-mobile-bar-btn { font-size: .76rem; }
}
