/* Shared presentation for the home, services and team profiles. */
:root { --interactive-line: #829698; }
:focus-visible { outline: 3px solid #167589; outline-offset: 3px; }
.reveal, .reveal.in-view { opacity: 1; transform: none; transition: none; }
.nav-dropdown .nav-dropdown-menu { display: none; }
.nav-dropdown.open .nav-dropdown-menu { display: grid; visibility: visible; opacity: 1; }
.nav-links { overscroll-behavior: contain; }
.main-nav .brand img { width: clamp(66px, 7vw, 80px); height: auto; }
.desktop-floating-actions { display: none; }

.provider-jump { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--navy); font-weight: 700; font-size: .94rem; }
.provider-jump:hover { text-decoration: underline; text-underline-offset: .22em; }
.slideshow-toggle {
  position: absolute; z-index: 2; left: 20px; top: 20px;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--cream); color: var(--navy); cursor: pointer;
}
.slideshow-toggle[hidden] { display: none; }
.hero-slideshow:not(.is-ready) img { animation: none; }
.hero-slideshow.is-paused img { animation-play-state: paused; }
@media (max-width: 580px) {
  .slideshow-toggle { left: calc(50% - 40px); top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .slideshow-toggle { display: none; }
}

.intro-section .section-heading, .team-section .section-heading { margin-bottom: 32px; }
.service-card { min-height: 218px; padding: 25px; }
.service-card > i { width: 45px; height: 45px; margin-bottom: 17px; font-size: 1.25rem; }
.service-card p { margin-top: 8px; }
.service-card .service-link { margin-top: 12px; }
.doctor-entry { display: flex; flex: 1; flex-direction: column; color: var(--navy); }
.doctor-entry:focus-visible { outline-offset: -4px; }
.doctor-info .service-link { margin-top: auto; padding-top: 12px; }
.doctor-card:hover, .service-card:hover, .doctor-card:hover .doctor-photo img { transform: none; }
.service-card, .provider-link, .doctor-entry { transition: box-shadow 160ms, border-color 160ms; }
.service-card:is(:hover,:focus-visible), .provider-link:is(:hover,:focus-visible) { border-color: var(--interactive-line); }
.doctor-entry:is(:hover,:focus-visible) .service-link { text-decoration: underline; }
.service-link i { transition: transform 160ms ease-out; }
.service-card:is(:hover,:focus-visible) .service-link i, .doctor-entry:is(:hover,:focus-visible) .service-link i { transform: translateX(3px); }
.service-card:active, .doctor-entry:active, .provider-link:active { box-shadow: inset 0 0 0 2px var(--interactive-line); }
.provider-jump { margin-top: 8px; text-decoration: underline; text-underline-offset: .24em; }
.specialty-copy .provider-jump + .hero-actions { margin-top: 16px; }
.profile-layout { position: relative; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); grid-template-areas: "crumb photo" "title photo" "details photo"; gap: 14px 6%; align-content: center; }
.profile-layout .breadcrumbs { grid-area: crumb; margin: 0 0 10px; }
.profile-heading { grid-area: title; align-self: end; }
.profile-heading h1 { font-size: clamp(2.4rem,5vw,4.6rem); }
.profile-heading .eyebrow { margin: 0 0 10px; }
.profile-layout .profile-portrait { grid-area: photo; align-self: center; }
.profile-details { grid-area: details; }
.profile-details .profile-services { margin: 0 0 16px; }
.profile-details .profile-bio { margin: 0; }
.profile-book { margin-top: 24px; }
.site-options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.site-options .location-block { display: block; margin: 0; padding: clamp(20px,3vw,38px); }
.site-options .location-copy h3 { margin: 0; font-size: clamp(1.55rem,2.8vw,2.3rem); }
.site-options .location-meta { margin: 18px 0; }
.site-gallery { margin-top: 16px; border-top: 1px solid var(--line); }
.site-gallery summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; }
.site-gallery summary::-webkit-details-marker { display: none; }
.site-gallery summary span, .faq-item summary span { transition: transform 160ms ease; }
.site-gallery[open] summary span { transform: rotate(180deg); }
.site-gallery .location-gallery { grid-template-columns: 1.2fr 1fr; grid-template-rows: repeat(2,95px); gap: 8px; }
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; }
.lightbox:not([open]) { display: none; }
.lightbox[open] { visibility: visible; opacity: 1; }
.lightbox::backdrop { background: #10283f; }
@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .ink-writing {
    -webkit-mask: var(--ink-lines);
    mask: var(--ink-lines);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img { animation: gallery-in 300ms cubic-bezier(.2,.72,.24,1); }
  @keyframes gallery-in { from { opacity: .2; scale: .965; } to { opacity: 1; scale: 1; } }
}
.agenda-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px,5vw,72px); align-items: start; }
.agenda-copy p { margin: 16px 0 22px; max-width: 46ch; }
.agenda-calendar { padding: clamp(20px,3vw,38px); background: white; border-radius: 20px; border: 1px solid var(--line); }
.agenda-calendar h3 { margin-bottom: 16px; }
.agenda-calendar .doctoralia-container { min-height: 0; }
.agenda-calendar .doctoralia-container > a { min-height: 56px; padding: 8px 14px; text-align: center; color: var(--navy); text-decoration: underline; text-underline-offset: .2em; }
.mobile-booking-bar { visibility: hidden; opacity: 0; pointer-events: none; }
:where(.booking-bar-visible):not(.menu-open):not(.lightbox-open) .mobile-booking-bar { visibility: visible; opacity: 1; pointer-events: auto; }

@media (max-width: 820px) {
  .menu-open .nav-links { max-height: calc(100dvh - 76px); overflow: auto; }
}
@media (max-width: 760px) {
  .profile-layout { grid-template-columns: 82px minmax(0,1fr); grid-template-areas: "crumb crumb" "photo title" "details details"; gap: 14px; }
  .profile-layout .profile-portrait { width: 82px; border-radius: 16px; }
  .profile-heading { align-self: center; }
  .profile-heading h1 { font-size: clamp(1.75rem,6vw,2.6rem); }
  .profile-heading .eyebrow { font-size: .7rem; letter-spacing: .07em; margin-bottom: 5px; }
  .profile-heading .eyebrow > span { display: none; }
  .site-options, .agenda-layout { grid-template-columns: 1fr; }
  .site-options .location-copy > p { margin-top: 8px; }
}
@media (max-width: 580px) {
  .section { padding: 48px 0; }
  .section-heading, .section-heading.centered { margin-bottom: 22px; }
  .intro-section .section-heading, .team-section .section-heading { margin-bottom: 18px; }
  .services-grid, .team-grid { gap: 9px; }
  .service-card { display: grid; grid-template-columns: 36px minmax(0,1fr) 18px; grid-template-areas: "icon title link" "icon desc link"; gap: 2px 10px; align-items: center; min-height: 0; padding: 12px; border-radius: 13px; }
  .service-card > i { grid-area: icon; width: 36px; height: 36px; margin: 0; font-size: 1.1rem; }
  .service-card h3 { grid-area: title; font-size: 1.15rem; }
  .service-card p { grid-area: desc; margin: 0; font-size: .84rem; line-height: 1.35; }
  .service-card .service-link { grid-area: link; margin: 0; font-size: 0; gap: 0; }
  .service-card .service-link i, .doctor-info .service-link i { font-size: 1.1rem; }
  .doctor-card { border-radius: 13px; }
  .doctor-entry { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 13px; align-items: center; padding: 10px 12px; }
  .doctor-photo { height: 74px; border-radius: 9px; }
  .doctor-photo > span, .doctor-info small { display: none; }
  .doctor-info { display: grid; grid-template-columns: 1fr 14px; align-items: center; padding: 0; gap: 3px 5px; }
  .doctor-info h3 { font-size: 1.2rem; }
  .doctor-info p { grid-column: 1; margin: 0; font-size: .77rem; text-transform: none; letter-spacing: normal; }
  .doctor-info .service-link { grid-column: 2; grid-row: 1 / 3; margin: 0; padding: 0; gap: 0; font-size: 0; }
  .mobile-booking-bar { bottom: max(9px, env(safe-area-inset-bottom)); transform: translateY(10px); transition: opacity 190ms, transform 190ms, visibility 190ms; }
  .booking-bar-visible .mobile-booking-bar { transform: none; }
  body:has(.mobile-booking-bar) { padding-bottom: max(70px, calc(64px + env(safe-area-inset-bottom))); }
  .profile-page .specialty-hero { padding: 26px 0 44px; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-gallery[open] .location-gallery, .faq-item[open] > p, .nav-dropdown.open .nav-dropdown-menu {
    animation: detail-in 240ms ease-out;
  }
  @keyframes detail-in { from { opacity: .35; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }

  .hero-message-banner .hero-lead {
    animation: hero-lead-in 650ms ease-out;
  }
  @keyframes hero-lead-in { from { opacity: .6; } to { opacity: 1; } }

  /* A solid first frame beneath the other two prevents a flash between photos. */
  .hero-slideshow.is-ready img { animation-name: clinic-crossfade; }
  .hero-slideshow.is-ready img:first-child { animation-name: none; opacity: 1; transform: none; }
  @keyframes clinic-crossfade {
    0% { opacity: 0; transform: scale(1.015); }
    7%, 34% { opacity: 1; }
    42%, 100% { opacity: 0; transform: scale(1.055); }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .service-card .service-link i, .doctor-entry .service-link i { transform: none !important; }
}

.doctor-photo picture, .profile-portrait picture { display: contents; }

@media screen and (max-width: 820px) and (orientation: portrait) {
  .hero-grid-stacked .hero-message-banner::before {
    inset: -6px;
    filter: blur(2px);
  }
  .hero-grid-stacked .hero-message-banner::after {
    background-color: rgba(255, 248, 234, .08);
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 248, 234, .4);
  }
}

.profile-layout-wide .profile-portrait img { aspect-ratio: 4 / 3; object-fit: contain; }
@media (max-width: 760px) {
  .profile-layout-wide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumb" "title" "photo" "details"; }
  .profile-layout-wide .profile-portrait { width: 100%; }
}
