/* =========================================================
   Drs Cohen, Freinkel & Associates — Inner pages
   Loaded after styles.css; builds on its tokens and components.
   ========================================================= */

/* ---------- Page hero ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(4rem, 2.5rem + 5vw, 7rem) 0 clamp(3.5rem, 2rem + 4vw, 5.5rem); background: var(--navy); }
.page-hero__content { max-width: 44rem; }
.page-hero__title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -.035em; color: var(--white);
  text-shadow: 0 2px 28px rgba(0, 32, 59, .6); text-wrap: balance;
}
.page-hero .rule { margin-bottom: 0; }
.page-hero .btn { --bd: rgba(255, 255, 255, .35); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }
.page-hero .btn:hover { --bd: rgba(255, 255, 255, .7); }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.page-hero .container { position: relative; }

/* Concentric rings around the page's service icon, echoing the service card icons */
.page-hero__art {
  position: absolute; top: 50%; right: max(var(--gutter), calc((100vw - var(--container)) / 2 + 2rem)); z-index: -1;
  width: 360px; height: 360px; margin-top: -200px;
  display: grid; place-items: center;
}
.page-hero__art::before, .page-hero__art::after {
  content: ""; position: absolute; border-radius: 50%; animation: hero-pulse 4.8s var(--ease) infinite;
  inset: 0; border: 1px solid rgba(159, 209, 240, .35);
}
.page-hero__art::after { animation-delay: 2.4s; }
.page-hero__ring { position: absolute; border-radius: 50%; }
.page-hero__ring--outer { inset: -70px; border: 46px solid rgba(79, 168, 222, .1); }
.page-hero__ring--dash { inset: 52px; border: 1.5px dashed rgba(159, 209, 240, .45); animation: hero-spin 40s linear infinite; }
.page-hero__badge {
  position: relative; display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%;
  background: var(--white); color: var(--navy); font-size: 3.2rem;
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .1), 0 0 0 26px rgba(255, 255, 255, .05), 0 30px 60px -20px rgba(0, 0, 0, .55);
}
.page-hero__badge img, .page-hero__badge .icon { width: 64px; height: 64px; }

/* Heartbeat trace: a faint baseline with a bright pulse travelling along it */
.page-hero__ecg {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: -1; width: 100%; height: 110px;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.page-hero__ecg-base { stroke: rgba(159, 209, 240, .16); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.page-hero__ecg-pulse {
  stroke: var(--sky-300); stroke-width: 2.25; vector-effect: non-scaling-stroke;
  stroke-dasharray: .14 .86; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(79, 168, 222, .9));
  animation: hero-trace 5.5s linear infinite;
}

@keyframes hero-trace { to { stroke-dashoffset: 0; } }
@keyframes hero-spin { to { transform: rotate(360deg); } }
@keyframes hero-pulse {
  0% { transform: scale(.55); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-300); }
.crumbs li { display: inline-flex; align-items: center; gap: .6rem; }
.crumbs li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.crumbs a { color: rgba(255, 255, 255, .85); transition: color .2s; }
.crumbs a:hover { color: var(--white); }
.crumbs [aria-current] { color: var(--sky-300); }

/* ---------- Prose ---------- */
.prose { color: var(--text); }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); line-height: 1.25; font-weight: 700;
  letter-spacing: -.02em; color: var(--navy); text-wrap: balance;
  margin-top: clamp(2.5rem, 4vw, 3.25rem);
}
.prose h2::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; margin-top: .9rem;
  background: linear-gradient(90deg, var(--navy) 0 60%, var(--sky) 60%);
}
.prose h2 + * { margin-top: 1.25rem; }
.prose h3 { font-size: 1.12rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em; margin-top: 2rem; }
.prose .lead { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

.checklist { display: grid; gap: .7rem; }
.checklist li {
  position: relative; padding: .85rem 1.1rem .85rem 3.1rem; border-radius: var(--radius-sm);
  background: var(--sky-50); border: 1px solid var(--sky-100); color: var(--ink); font-weight: 500; line-height: 1.6;
}
.checklist li::before {
  content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.prose-figure { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 16 / 9; margin: clamp(2rem, 4vw, 2.75rem) 0 0; }
.prose-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.prose-figure:hover img { transform: scale(1.04); }

.callout {
  display: flex; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--sky); box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* Closing call to action at the end of an article */
.cta-card {
  position: relative; overflow: hidden; isolation: isolate; margin-top: clamp(2.75rem, 5vw, 3.5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: var(--radius-lg);
  background: var(--navy); color: rgba(255, 255, 255, .86); box-shadow: var(--shadow-lg);
}
.cta-card::before {
  content: ""; position: absolute; right: -110px; bottom: -150px; width: 340px; height: 340px; border-radius: 50%; z-index: -1;
  border: 50px solid rgba(79, 168, 222, .14);
}
.cta-card p { font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); line-height: 1.5; font-weight: 600; color: var(--white); max-width: 34rem; text-wrap: balance; }
.cta-card p a { color: var(--white); border-bottom: 1.5px solid var(--sky); }
.cta-card p a:hover { color: var(--sky-300); }
.cta-card .btn { --bd: rgba(255, 255, 255, .35); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); margin-top: 1.5rem; }
.cta-card .btn:hover { --bd: rgba(255, 255, 255, .7); }

/* ---------- Article + sidebar layout ---------- */
.page-body { background: linear-gradient(180deg, var(--sky-50), var(--white) 520px); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.sidebar { display: grid; gap: 1.5rem; }

.side-card {
  padding: 1.75rem; border-radius: var(--radius-lg); background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.side-card__title { font-size: 1.12rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em; line-height: 1.35; }
.side-card .rule { margin: .9rem 0 1.25rem; width: 44px; }
.side-card--form { position: relative; overflow: hidden; border: 0; box-shadow: var(--shadow); }
.side-card--form::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--navy), var(--sky)); }

.contact-list { display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: flex-start; gap: .9rem; min-width: 0; }
.contact-list .quickbar__icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1rem; }
.contact-list .hours { width: 100%; }

.service-nav { display: grid; gap: .35rem; }
.service-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem .9rem; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.4;
  transition: background-color .2s, color .2s;
}
.service-nav a .icon { color: var(--sky); transition: transform .25s var(--ease); }
.service-nav a:hover { background: var(--sky-50); color: var(--navy); }
.service-nav a:hover .icon { transform: translateX(3px); }
.service-nav a[aria-current="page"] { background: var(--navy); color: var(--white); }
.service-nav a[aria-current="page"] .icon { color: var(--sky-300); }

/* ---------- Form ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem 1rem;
  font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--sky-50); border: 1.5px solid var(--sky-100); border-radius: var(--radius-sm);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none; padding-right: 2.75rem; cursor: pointer;
  background: var(--sky-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23013d6c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 1rem center / 16px no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--sky-300); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background-color: var(--white); border-color: var(--sky); box-shadow: 0 0 0 4px rgba(79, 168, 222, .18); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__note { font-size: .78rem; line-height: 1.6; color: var(--muted); }
.form__note a { color: var(--navy); font-weight: 600; }
.form__note a:hover { color: var(--sky); }
.form .btn { margin-top: .25rem; }

/* ---------- About ---------- */
.intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.intro__grid .story__img--main { aspect-ratio: 4 / 3.6; }

.profile-list { display: grid; gap: 1.75rem; }
.profile {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.profile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.profile .doctor__photo { aspect-ratio: auto; min-height: 100%; }
.profile .doctor__photo::after { inset: 0 0 0 auto; width: 4px; height: auto; background: linear-gradient(180deg, var(--navy), var(--sky)); }
.profile:hover .doctor__photo img { transform: scale(1.05); }
.profile__body { padding: clamp(1.75rem, 3vw, 2.5rem); align-self: center; }
.profile__name { font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem); font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.25; }
.profile__creds { margin-top: .5rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); line-height: 1.6; }
.profile__body .rule { margin: 1rem 0 1.1rem; }
.profile__body p:not(.profile__creds) { font-size: 1rem; }

.find__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.map-card { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--sky-100); min-height: 360px; }
.map-card iframe { display: block; width: 100%; height: 100%; min-height: 360px; }

/* ---------- Contact ---------- */
.contact-intro { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.contact-intro > div { padding: 1.75rem; min-width: 0; }
.contact-intro > div + div { border-left: 1px solid var(--line); }
.contact-intro .quickbar__icon { margin-bottom: 1rem; }
.contact-intro .quickbar__text { font-size: .9rem; }
.contact-intro .hours { font-size: .85rem; margin-top: .35rem; }

.fees { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.fees > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1rem 1.25rem; }
.fees > div + div { border-top: 1px solid var(--line); }
.fees > div:nth-child(odd) { background: var(--sky-50); }
.fees dt { color: var(--ink); font-weight: 500; line-height: 1.5; }
.fees dd { flex: none; font-size: 1.05rem; font-weight: 700; color: var(--navy); }

/* ---------- Legal ---------- */
.legal { max-width: 52rem; margin-inline: auto; }
.legal address { line-height: 1.8; }

/* Book banner on inner pages sits on white */
.book--plain { background: var(--white); padding-top: var(--section); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .contact-intro { grid-template-columns: 1fr 1fr; }
  .contact-intro > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 960px) {
  .page-hero__art { display: none; }
  .page-hero__ecg { height: 80px; bottom: 8px; opacity: .8; }
  .layout { grid-template-columns: 1fr; }
  /* Sidebar drops below the article, booking form still first */
  .layout { gap: 3rem; }
  .intro__grid, .find__grid { grid-template-columns: 1fr; }
  .find__grid .map-card { order: -1; }
  .intro__grid .story__media { max-width: 600px; }
  .profile { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .contact-intro { grid-template-columns: 1fr; }
  .contact-intro > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .contact-intro > div:nth-child(3) { grid-column: auto; }
  .profile { grid-template-columns: 1fr; }
  .profile .doctor__photo { aspect-ratio: 4 / 3.4; min-height: 0; }
  .profile .doctor__photo img { object-position: 50% 20%; }
  .profile .doctor__photo::after { inset: auto 0 0; width: auto; height: 4px; background: linear-gradient(90deg, var(--navy), var(--sky)); }
}

@media (max-width: 640px) {
  .page-hero__actions .btn, .cta-card .btn { flex: 1 1 100%; width: 100%; white-space: normal; text-align: center; }
  .side-card { padding: 1.4rem; }
  .field-row { grid-template-columns: 1fr; }
  .fees > div { flex-direction: column; gap: .2rem; }
}

.prose-figure--lead { margin: 0 0 2rem; }
.prose-figure--lead + .lead { margin-top: 0; }
.intro__grid .story__img--main img { object-position: 45% 50%; }

/* ---------- Contact: full-width booking form ---------- */
.form-section { padding-top: 0; }
.form-panel {
  position: relative; overflow: hidden; padding: clamp(1.75rem, 4vw, 3.25rem);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.form-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--navy), var(--sky)); }
.form-panel .section-head { margin-bottom: 2rem; }
.form--wide { grid-template-columns: repeat(6, 1fr); gap: 1.25rem 1.5rem; }
.form--wide .field { grid-column: span 2; }
.form--wide .field:nth-child(4), .form--wide .field:nth-child(5) { grid-column: span 3; }
.form--wide .field--full { grid-column: 1 / -1; }
.form--wide textarea { min-height: 150px; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.form__foot .btn { margin-top: 0; min-width: 220px; }

@media (max-width: 960px) {
  .form--wide { grid-template-columns: 1fr 1fr; }
  .form--wide .field, .form--wide .field:nth-child(4), .form--wide .field:nth-child(5) { grid-column: span 1; }
  .form--wide .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .form--wide { grid-template-columns: 1fr; }
  .form--wide .field, .form--wide .field:nth-child(4), .form--wide .field:nth-child(5) { grid-column: 1 / -1; }
  .form__foot { flex-direction: column-reverse; align-items: stretch; }
  .form__foot .btn { width: 100%; }
}
/* Map follows the reader down the contact content on desktop */
@media (min-width: 961px) {
  .page-body .sidebar .map-card:only-child { position: sticky; top: calc(var(--header-h) + 42px + 1.5rem); min-height: 460px; }
  .page-body .sidebar .map-card:only-child iframe { min-height: 460px; }
}

/* Service pages: the booking form sticks while the article is read, then the
   rest of the sidebar (contact, services) scrolls in below it near the end.
   The wrapper fills the spare sidebar height so the form has room to travel.
   The form always sticks by its top (just below the scrolled header) so the
   heading stays in view. */
@media (min-width: 961px) {
  .page-body .layout { align-items: stretch; }
  .page-body .sidebar { display: flex; flex-direction: column; }
  .page-body .sidebar__sticky { flex: 1 0 auto; }
  .page-body .sidebar__sticky > .side-card--form { position: sticky; top: calc(70px + 42px + 1rem); }
}
