/* V16: qualifications first, clearer photography and tactile treatment rails. */
.dental-ambient { background: url('../images/dental-doodle-pattern.svg') 0 0 / 680px 680px repeat; opacity: 1; }
.dental-ambient > .ambient-icon { display: none; }
.hero-qualification { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid #cdd9ec; border-radius: 16px; background: #eef3fc; text-align: left; margin: 0 0 18px; }
.hero-qualification > span { font-size: 28px; }
.hero-qualification strong,.hero-qualification div > span { display: block; }
.hero-qualification strong { font-size: 18px; color: #1e3470; line-height: 1.4; }
.hero-qualification div > span { font-size: 13px; color: #304461; line-height: 1.6; }
.hero-specialist-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; text-align: left; }
.hero-specialist-links a { padding: 14px; background: var(--soft-surface); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 13px; }
.hero-specialist-links a:nth-child(2) { border-top-color: var(--red); }
.hero-specialist-links :is(span,strong,small) { display: block; }
.hero-specialist-links span { font-size: 15px; line-height: 1.4; }
.hero-specialist-links strong { color: var(--blue); font-size: 14px; margin-top: 4px; }
.hero-specialist-links small { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.hero-photo-details { display: grid; grid-template-columns: auto 1fr; gap: 9px; margin-top: 10px; }
.hero-photo-details .hero-hours-badge,.hero-photo-details .hero-location-card { position: static; inset: auto; margin: 0; width: auto; min-width: 0; box-shadow: none; border: 1px solid var(--line); padding: 10px 12px; border-radius: 13px; background: var(--soft-surface); }
.hero-photo-details .hero-hours-badge { border-left: 3px solid var(--red); }
.hero-photo-details .hero-location-card strong { font-size: 16px; }
.hero-photo-details .hero-location-card small { font-size: 11px; }
.hero-photo-details .hero-hours-badge strong { font-size: 12px; }
.hero-photo-details .hero-hours-badge small { font-size: 10px; }
.hero-specialist-links a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.qualification-note { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); background: var(--soft-surface); border-radius: 12px; margin-bottom: 18px; }
.qualification-note > span:first-child { font-size: 27px; }
.qualification-note :is(strong,small) { display: block; line-height: 1.5; }
.qualification-note strong { font-size: 16px; }
.qualification-note small { font-size: 12px; }
.doctor-card-body h3 .name-degrees { font-size: 18px; letter-spacing: .025em; }
.credential-copy h3 small { font-size: 20px; color: var(--blue); margin-top: 10px; }
@media (min-width: 821px) {
  .hero-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.06fr); width: min(1480px,calc(100% - 166px)); gap: 30px; }
  .hero-copy { text-align: left; }
  .hero-copy > .eyebrow,.hero-copy > .hero-specialty,.hero-copy > .hero-mantra { justify-content: flex-start; }
  .hero-copy > .hero-tagline { margin-left: 0; max-width: none; }
  .hero-copy > .hero-experience { margin-left: 0; }
  .hero-copy > h1 { font-size: clamp(60px,6.3vw,90px); }
  .hero-photo-frame { height: max(420px,calc(100svh - 208px)); border-radius: 100px 100px 22px 22px; }
  .hero-visual { align-self: center; }
  .hero-visual::before { display: none; }
}
/* Real horizontal scrolling; the following help panel remains below the rail. */
.home-treatment-stack.swipe-track { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(290px,calc((100% - 40px) / 2.7)); gap: 20px; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 5px 0 18px; scroll-snap-type: x mandatory; scroll-padding-inline: 0; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #647ba8 transparent; }
.home-treatment-stack .home-treatment-card { display: flex; flex-direction: column; width: auto; min-width: 0; max-width: none; min-height: 0; margin: 0; border: 1px solid var(--line); border-radius: 20px; position: relative; top: auto; transform: none; scroll-snap-align: start; background: var(--soft-surface); }
.home-treatment-stack .home-treatment-media { height: 230px; min-height: 0; flex: 0 0 230px; }
.home-treatment-stack .home-treatment-media img { height: 100%; width: 100%; object-fit: cover; }
.home-treatment-stack .home-treatment-copy { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.home-treatment-stack .home-treatment-copy h3 { font-size: 28px; line-height: 1.13; margin-block: 10px 14px; }
.home-treatment-stack .home-treatment-copy p { font-size: 15px; line-height: 1.65; }
.home-treatment-stack .home-treatment-copy > strong { margin-top: auto; font-size: 13px; padding: 10px 13px; }
.home-treatment-stack .home-treatment-copy ul { margin-block: 15px; }
.home-treatment-more { margin-top: 20px; min-height: 0; padding: 32px; border-radius: 20px; }
.home-treatment-more h3 { font-size: clamp(27px,3vw,38px); }
.swipe-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; }
.swipe-controls p { margin: 0; font-size: 14px; color: var(--ink); }
.swipe-controls > div { display: flex; align-items: center; gap: 10px; }
.swipe-controls button { width: 44px; height: 44px; background: var(--soft-surface); border: 1px solid var(--line); border-radius: 50%; color: var(--blue); font-size: 22px; cursor: pointer; }
.swipe-controls button:disabled { opacity: .45; cursor: default; }
.swipe-controls button:focus-visible,.swipe-track:focus-visible,.mobile-swipe-track:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.swipe-controls [data-swipe-status] { min-width: 45px; text-align: center; font-size: 13px; }
.mobile-swipe-controls { display: none; }
.contact-booking-panel { padding-block: 50px; background: #eaf0fb; }
.contact-booking-panel > .section-shell { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.contact-booking-panel h2 { font-size: clamp(32px,4vw,48px); margin: 15px 0; }
.contact-booking-panel p { max-width: 65ch; line-height: 1.7; font-size: 17px; }
html[data-theme="dark"] .hero-qualification { background: #243952; border-color: #627d9c; }
html[data-theme="dark"] .hero-qualification :is(strong,div > span) { color: #f2f6ff; }
html[data-theme="dark"] .contact-booking-panel { background: #18283c; }
@media (max-width: 820px) {
  .dental-ambient { opacity: 1; background-size: 540px 540px; }
  .hero-grid { display: flex; flex-direction: column; min-height: calc(100svh - 144px); padding-block: 12px 16px; }
  .hero-copy { display: contents; }
  .hero-copy > .hero-qualification { order: 4; width: calc(100% - 32px); padding: 8px 12px; gap: 8px; margin: 0 auto 8px; }
  .hero-qualification > span { font-size: 22px; }
  .hero-qualification strong { font-size: 13px; }
  .hero-qualification div > span { font-size: 11px; }
  .hero-copy > .hero-specialty { order: 5; }
  .hero-visual { order: 6; width: calc(100% - 24px); max-width: 600px; min-height: 0; margin: 0 auto 8px; }
  .hero-photo-frame { position: relative; inset: auto; height: clamp(290px,43svh,440px); width: 100%; border-radius: 26px; }
  .hero-photo-frame > img { object-position: center 38%; }
  .hero-visual::before { display: none; }
  .hero-photo-details { grid-template-columns: 1fr; gap: 5px; margin-top: 6px; }
  .hero-photo-details .hero-hours-badge { justify-content: center; text-align: center; padding: 7px 10px; }
  .hero-photo-details .hero-hours-badge svg { width: 18px; height: 18px; }
  .hero-photo-details .hero-hours-badge strong,.hero-photo-details .hero-hours-badge small { display: inline; font-size: 11px; }
  .hero-photo-details .hero-hours-badge small::before { content: " · "; }
  .hero-photo-details .hero-location-card { justify-content: center; padding: 7px 10px; }
  .hero-photo-details .hero-location-card strong { font-size: 14px; }
  .hero-photo-details .hero-location-card small { font-size: 10px; }
  .hero-copy > .hero-mantra { order: 7; }
  .hero-copy > .hero-experience { order: 8; }
  .hero-copy > .hero-actions { order: 9; }
  .hero-copy > .hero-specialist-links { display: none; }
  .home-treatment-stack.swipe-track { grid-auto-columns: 88%; gap: 14px; }
  .home-treatment-stack .home-treatment-media { height: 225px; flex-basis: 225px; }
  .home-treatment-stack .home-treatment-copy { padding: 20px; }
  .home-treatment-more { padding: 25px; }
  .mobile-swipe-controls { display: flex; width: calc(100% - 32px); margin: 0 auto 12px; }
  body[data-page="treatments"] .treatment-bento-scroll.mobile-swipe-track { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 88%; gap: 14px; width: calc(100% - 32px); max-height: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 18px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
  body[data-page="treatments"] .treatment-bento-scroll .treatment-bento-card { width: auto; min-width: 0; max-width: none; margin: 0; grid-column: auto; grid-row: auto; grid-template-columns: 1fr; grid-template-rows: 230px 1fr; border: 1px solid var(--line); border-radius: 20px; scroll-snap-align: start; }
  body[data-page="treatments"] .treatment-bento-scroll .treatment-bento-card > img { width: 100%; height: 230px; object-fit: cover; }
  body[data-page="treatments"] .treatment-bento-copy { padding: 22px; }
  body[data-page="treatments"] .treatment-bento-copy h2 { font-size: 28px; }
  .contact-booking-panel > .section-shell { grid-template-columns: 1fr; gap: 20px; }
  .contact-booking-panel .primary-button { width: 100%; }
}
.home-credentials,.treatment-bento-section,.home-contact-match,
html[data-theme="dark"] :is(.home-credentials,.treatment-bento-section,.home-contact-match) { background: var(--surface-wash); }
@media (min-width: 821px) and (max-height: 760px) {
  .hero-copy > h1 { font-size: 60px; margin-bottom: 10px; }
  .hero-copy > .hero-tagline { font-size: 14px; margin-bottom: 10px; }
  .hero-qualification { padding: 9px 12px; margin-bottom: 10px; }
  .hero-qualification strong { font-size: 15px; }
  .hero-copy > .hero-specialty,.hero-copy > .hero-mantra { margin-bottom: 10px; }
  .hero-specialist-links { margin-top: 10px; }
  .hero-specialist-links a { padding: 10px 12px; }
}

/* V17: targeted Home refinements at each breakpoint. */
@media (max-width: 820px) {
  .hero-section .hero-copy > .hero-actions { display: none; }
  .hero-section .hero-copy > .eyebrow { margin-bottom: 4px; line-height: 1.25; }
  .hero-section .hero-copy > h1 { margin-top: 0; margin-bottom: 7px; line-height: 1.02; }
  .hero-section .hero-copy > .hero-tagline { margin-top: 0; margin-bottom: 8px; font-size: 16px; line-height: 1.25; }
  .hero-section .hero-copy > .hero-qualification { margin-top: 0; margin-bottom: 8px; padding-block: 8px; }
  .hero-section .hero-qualification strong { line-height: 1.25; }
  .hero-section .hero-qualification div > span { line-height: 1.3; margin-top: 3px; }
  .hero-section .hero-copy > .hero-specialty { margin-top: 0; margin-bottom: 9px; line-height: 1.2; }
  .hero-section .hero-copy > .hero-mantra { margin-block: 2px 5px; line-height: 1.2; }
  .hero-section .hero-copy > .hero-experience { margin-top: 0; margin-bottom: 5px; line-height: 1.3; }
}
@media (min-width: 821px) {
  .hero-photo-details { position: relative; grid-template-columns: 1fr; }
  .hero-photo-details .hero-hours-badge {
    position: absolute; inset: auto auto calc(100% + 26px) 18px; z-index: 2;
    width: max-content; max-width: calc(100% - 36px); padding: 16px 18px;
    display: flex; align-items: center; gap: 12px; border-radius: 16px;
    border: 1px solid #d3ddee; border-left: 4px solid #b62038;
    background: #fff; color: #172840; box-shadow: 0 8px 24px rgb(18 35 61 / 14%);
    animation: hero-hours-float 6s ease-in-out infinite alternate;
  }
  .hero-photo-details .hero-hours-badge > svg { width: 28px; height: 28px; flex: 0 0 28px; color: #243b80; }
  .hero-photo-details .hero-hours-badge > span { display: grid; gap: 5px; }
  .hero-photo-details .hero-hours-badge > span::before { content: "CLINIC HOURS"; color: #243b80; font-size: 11px; font-weight: 800; letter-spacing: .08em; line-height: 1.3; }
  .hero-photo-details .hero-hours-badge strong { display: block; color: #172840; font-size: clamp(16px,1.45vw,21px); line-height: 1.35; }
  .hero-photo-details .hero-hours-badge small { display: block; color: #172840; font-size: clamp(15px,1.2vw,18px); font-weight: 750; line-height: 1.35; }
  .hero-photo-details .hero-location-card { position: static; width: 100%; justify-content: center; text-align: center; padding: 12px; }
  html[data-theme="dark"] .hero-photo-details .hero-hours-badge { background: #18283c; border-color: #657c9b; border-left-color: #ef8295; }
  html[data-theme="dark"] .hero-photo-details .hero-hours-badge :is(strong,small,svg),html[data-theme="dark"] .hero-photo-details .hero-hours-badge > span::before { color: #fff; }
}
@keyframes hero-hours-float { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hero-photo-details .hero-hours-badge { animation: none !important; } }
