/* Fixes on top of the original site's styles (styles.css is the original, unchanged).
   Only the changes Michael asked for, plus small technical ones. */

html { scroll-behavior: smooth; }
#booking-section, #faq { scroll-margin-top: 90px; }
[hidden] { display: none !important; }
html.menu-open { overflow: hidden; }
.preview-note { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: #f0fdfa; color: #115e59; font-size: 14px; }

/* 1. Mobile header: the contact bar is hidden on phones, but the menu bar still sat 28px down,
      leaving a gap at the top. Pin it to the top and tighten it a little. */
@media (max-width: 767px) {
  .site-navigation { top: 0 !important; padding-top: 8px !important; padding-bottom: 8px !important; }
}

/* 2. Mobile home hero: on phones the photo covers the whole hero without being cropped.
      It uses a portrait version of the same photo (img/hero-mobile.jpg: the two scenes re-stacked
      along the diagonal, built-in text removed). Title, tagline and buttons sit together in the middle. */
@media (max-width: 767px) {
  .home-hero { height: auto !important; display: grid !important; grid-template-columns: 100%; grid-template-rows: 1fr auto auto auto 1fr; padding-top: 56px; }
  .home-hero > .relative.z-10, .home-hero > .relative.z-10 > div { display: contents; }
  .home-hero picture { display: contents; }
  .home-hero > .absolute.inset-0 { position: relative !important; inset: auto !important; grid-row: 1 / -1; grid-column: 1; aspect-ratio: 900 / 1274; }
  .home-hero > .absolute.inset-0 img { height: 100% !important; object-position: 50% 0; filter: brightness(.85) contrast(1.05); }
  .home-hero > .absolute.inset-0 > div { background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,.45) 70%, rgba(0,0,0,.25) 100%) !important; }
  .home-hero h1, .home-hero h1 + p, .home-hero-actions { position: relative; z-index: 1; }
  .home-hero h1 { grid-row: 2; grid-column: 1; margin: 0 0 16px !important; padding: 0 16px; font-size: 2.5rem !important; line-height: 1.1 !important; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
  .home-hero h1 + p { grid-row: 3; grid-column: 1; padding: 0 16px; margin-bottom: 24px !important; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
  .home-hero-actions { grid-row: 4; grid-column: 1; padding: 0 16px; gap: 12px !important; }
  .home-hero-scroll-indicator { display: none; }
}

/* 4. Desktop: the teal contact bar scrolled away while the white menu bar stayed 28px down,
      so the page showed through the gap. Keep both bars fixed at the very top. */
@media (min-width: 768px) and (min-height: 501px) {
  .navigation-contact-bar { position: fixed !important; top: 0; left: 0; right: 0; }
  #root { padding-top: 28px; }
}

/* 5. Home services on phones: two cards per row instead of one long column. */
@media (max-width: 767px) {
  #services .grid.grid-cols-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #services .grid.grid-cols-1 > div { padding: 20px 12px; }
  #services .grid.grid-cols-1 > div > div:first-child { width: 48px; height: 48px; margin-bottom: 12px; }
  #services .grid.grid-cols-1 h3 { font-size: 0.95rem; line-height: 1.3; }
}

/* 3. About page: photo and credentials first, then Eric's story, then the contact box (phones/tablets).
      Less empty space at the top, a bigger photo, and Designation/Languages in smaller text under it. */
@media (max-width: 1023px) {
  .about-row > :first-child { display: contents; }
  .about-row > :first-child > :first-child { order: 1; width: 100%; }
  .about-row > :nth-child(2) { order: 2; width: 100%; }
  .about-row > :first-child > :nth-child(2) { order: 3; width: 100%; }
  .page-about-therapist .about-row .grid { display: block !important; max-width: 420px; margin: 0 auto; }
}
.page-about-therapist main > div:first-child { padding-top: 6rem; }
.page-about-therapist main .text-center.mb-16 { margin-bottom: 2rem; }
@media (min-width: 768px) { .page-about-therapist main > div:first-child { padding-top: 8.5rem; } }
.page-about-therapist .about-row .grid > div:nth-child(2) { margin-top: 12px !important; padding: 12px 14px !important; }
.page-about-therapist .about-row .grid > div:nth-child(2) > * + * { margin-top: 8px !important; }
.page-about-therapist .about-row .grid > div:nth-child(2) h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.page-about-therapist .about-row .grid > div:nth-child(2) p { font-size: 0.8125rem; line-height: 1.45; }
.page-about-therapist .about-row .grid > div:nth-child(2) .rounded-full.shrink-0 { width: 28px !important; height: 28px !important; }
.page-about-therapist .about-row .grid > div:nth-child(2) .rounded-full.shrink-0 svg { width: 16px; height: 16px; }

/* 6. Home "Our Mission" items on phones: two side by side and the third centred under them,
      instead of three tall cards in a column. */
@media (max-width: 767px) {
  .page-index .text-center.mb-16:has(+ .mission-features) { margin-bottom: 2rem; }
  .mission-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
  .mission-features > div { padding: 18px 14px !important; text-align: center; }
  .mission-features > div > div:first-child { width: 44px; height: 44px; margin: 0 auto 10px !important; }
  .mission-features h3 { font-size: 1rem !important; line-height: 1.3; margin-bottom: 6px !important; }
  .mission-features p { font-size: 0.875rem; line-height: 1.45 !important; }
  .mission-features > div:nth-child(3) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
}

/* 7. About page on phones and tablets:
      - the title line ("Licensed Occupational Therapist & Certified Hand Therapist") gets a soft teal
        band and larger, bolder type, so the top no longer reads as empty space;
      - "Patient-Centered Philosophy" and "Have a question for Eric?" become one box with a thin line between. */
@media (max-width: 767px) { .page-about-therapist main > div:first-child { padding-top: 5rem; padding-bottom: 3rem; } .page-about-therapist .about-row { margin-bottom: 0 !important; } }
@media (max-width: 1023px) {
  .about-intro { margin: 0 auto 1.5rem !important; max-width: 640px; padding: 22px 20px; border-radius: 16px;
    background: linear-gradient(135deg, #e3eee9 0%, #f3f8f6 60%, #ffffff 100%); border: 1px solid #d4e7e1; }
  .about-intro h1:empty { display: none; }
  .about-intro p { font-size: 1.375rem !important; line-height: 1.3; font-weight: 700 !important; color: #2f3f38 !important; text-wrap: balance; }
  .about-intro p::before { content: ""; display: block; width: 40px; height: 3px; border-radius: 2px; background: #4a6358; margin: 0 auto 12px; }
  .about-philosophy { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important;
    background: linear-gradient(180deg, #4a6358 0%, #42574e 100%) !important; box-shadow: 0 -4px 14px rgba(0,0,0,.06) !important; }
  .about-contact { position: relative; margin-top: -2rem !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important;
    background: linear-gradient(180deg, #42574e 0%, #3a4c44 100%) !important; box-shadow: 0 10px 15px -3px rgba(0,0,0,.12) !important; }
  .about-contact::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: rgba(255,255,255,.25); }
}

/* 8. Phones: less empty space between sections across the whole site
      (the original spacing was sized for desktop). The mobile menu panel is left alone. */
@media (max-width: 767px) {
  #root main .py-20, #root main .py-16 { padding-top: 2rem; padding-bottom: 2rem; }
  #root main .pt-32, #root main .pt-24 { padding-top: 5rem; }
  #root main .pt-40 { padding-top: 5.5rem; }
  #root main .pb-20 { padding-bottom: 2.5rem; }
  .page-pricing p.text-transparent.select-none { display: none; }  /* invisible desktop spacer in the Private-Pay card */
  #root main .mb-24, #root main .mb-20 { margin-bottom: 2.5rem; }
  #root main .mb-16 { margin-bottom: 2rem; }
  #root main .mb-12 { margin-bottom: 1.5rem; }
  #root main .mt-12 { margin-top: 1.5rem; }
  #root main .space-y-20 > :not([hidden]) ~ :not([hidden]) { margin-top: 2.5rem; }
  #root main .space-y-10 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
  #root main .min-h-screen, #root main .min-h-\[60vh\] { min-height: 0; }
  footer .py-12 { padding-top: 2.5rem; padding-bottom: 2rem; }
  footer .mb-12 { margin-bottom: 1.5rem; }
  footer .pt-8 { padding-top: 1.25rem; }
  footer .mb-6 { margin-bottom: 0.875rem; }
}
@media (max-width: 767px) {
  .page-pricing #root main .lg\:pb-28 { padding-bottom: 4.5rem; }  /* the cards below overlap this banner on purpose; keep room for its text */
}

/* 9. Home hero, desktop: photo without built-in text (img/hero-desktop.webp); the photo's tagline is real text
      in the corners so it never gets cropped. */
.hero-tag { position: absolute; z-index: 5; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero-eyebrow { font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.hero-serif { font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif; font-weight: 400; }
.hero-serif em { color: #b9d3c6; }
.hero-tag-tl { left: clamp(24px, 4vw, 72px); top: calc(28px + 76px + 4vh); }
.hero-tag-tl .hero-serif { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.08; margin: 12px 0 0 -.04em; }
.hero-rule { width: 48px; height: 2px; background: #8fb5a4; margin-top: 16px; }
.hero-tag-br { right: clamp(24px, 4vw, 72px); bottom: clamp(28px, 5vh, 56px); text-align: center; }
.hero-tag-br .hero-eyebrow { padding-left: .22em; }  /* balances the trailing letter-spacing so both lines share one center */
.hero-tag-br .hero-serif { font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; margin-top: 10px; }
/* wide screens: the corners, like the original photo. Smaller laptop windows: same corners, a bit smaller,
   clear of the centered title and buttons. Phones: hidden (the hero there is a different layout). */
.home-hero:has(.hero-tag) .home-hero-scroll-indicator { display: none; }
@media (max-width: 1359px), (max-height: 779px) {
  .hero-tag-tl { top: calc(28px + 76px + 2vh); }
  .hero-tag-tl .hero-rule { display: none; }
  .hero-tag-br { bottom: clamp(24px, 5vh, 48px); }
  .hero-tag-tl .hero-serif, .hero-tag-br .hero-serif { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.1; }
  .hero-tag-tl .hero-serif br:first-of-type { display: none; }
  .hero-eyebrow { font-size: 11px; }
}
@media (max-width: 767px) { .hero-tag { display: none; } }

/* 10. Desktop and tablet: tighter spacing between and inside sections (phones keep section 8).
       Only the large Tailwind gaps are reduced; cards, text and the hero are unchanged. */
@media (min-width: 768px) {
  #root main .md\:py-32 { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  #root main .md\:py-24 { padding-top: 4rem; padding-bottom: 4rem; }
  #root main .py-20 { padding-top: 4rem; padding-bottom: 4rem; }
  #root main .py-16 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  #root main .pb-20 { padding-bottom: 4rem; }
  #root main .mb-24 { margin-bottom: 3.5rem; }
  #root main .mb-20 { margin-bottom: 3rem; }
  #root main .mb-16 { margin-bottom: 2.5rem; }
  #root main .mb-12 { margin-bottom: 2rem; }
  #root main .mt-12 { margin-top: 2rem; }
  #root main .space-y-20 > :not([hidden]) ~ :not([hidden]) { margin-top: 3.5rem; }
}
@media (min-width: 1024px) {
  #root main .lg\:py-20 { padding-top: 4rem; padding-bottom: 4rem; }
  #root main .lg\:pb-20 { padding-bottom: 4rem; }
  #root main .lg\:pt-40 { padding-top: 8.5rem; }
}

/* 11. Booking form (now live): hidden spam trap and the sent/error message. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; padding: 12px 16px; border-radius: 12px; font-size: 15px; line-height: 1.45; background: #f0fdfa; color: #115e59; }
.form-status.is-error { background: #fef2f2; color: #991b1b; }

/* ===== REVIEW PASS (Nov 24): items Michael approved from the site review. Markup for these is in src/review_pass.py. ===== */

/* 12. Header between 1024 and 1535px wide: the menu did not fit beside the logo, so the logo text wrapped (two lines on
       laptops, four on sideways tablets) and "Book Appointment" was cut off at 1024. The logo text now never wraps.
       1024-1279: the phone-style menu button. 1280-1535: the full menu, using the whole width with slightly closer links. */
@media (min-width: 1024px) { .site-navigation a.group { flex-shrink: 0; margin-right: 12px; } }
@media (max-width: 359px) { .site-navigation a.group .flex-col span:first-child { font-size: 15px; } }  /* very narrow phones: keep room for the menu button */
.site-navigation a.group .flex-col span { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .site-navigation .desktop-navigation { display: none !important; }
  .site-navigation .mobile-menu-toggle { display: block !important; }
}
@media (min-width: 1280px) and (max-width: 1535px) {
  .site-navigation > .container { max-width: none; }
  .site-navigation .desktop-navigation { gap: 16px; }
}
@media (min-width: 1280px) and (max-width: 1379px) {
  .site-navigation .desktop-navigation { gap: 12px; }
  .site-navigation .desktop-navigation > a { font-size: 13px; letter-spacing: 0; }
}

/* 13. Phone menu: solid white, so the page no longer shows through behind the links. */
#mobile-menu { background: #fff !important; }

/* 14. Readability: the gray used for most body text was too faint (3.8:1). Same darker gray as the About page (5.9:1).
       The Mission paragraph was also in a thin weight. The services button's white text sits on a slightly deeper gradient. */
.text-warmGray-600 { color: #6c645b !important; }
.page-index main .font-light { font-weight: 400; }
.page-index #services a.from-teal-500.to-blue-500 { background-image: linear-gradient(to right, #47705f, #2a62d4) !important; }
.page-index #services a.from-teal-500.to-blue-500:hover { background-image: linear-gradient(to right, #3d6152, #2354b8) !important; }

/* 15. Home service cards open the Services page (the whole card is the link). */
.service-card { cursor: pointer; }
.service-card .card-link { position: absolute; inset: 0; border-radius: inherit; }
.service-card .card-link:focus-visible { outline: 2px solid #4a6358; outline-offset: 2px; }

/* 16. About page: Eric's name as the page heading, the introduction in the site's own type and a little larger,
       and a booking button under the email button. */
.about-intro h1 { font-size: 2.25rem; line-height: 1.15; margin-bottom: .5rem; }
@media (max-width: 1023px) {
  .about-intro h1 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 6px; color: #2f3f38; }
  .about-intro h1::before { content: ""; display: block; width: 40px; height: 3px; border-radius: 2px; background: #4a6358; margin: 0 auto 12px; }
  .about-intro p { font-size: 1rem !important; font-weight: 600 !important; color: #4a6358 !important; }
  .about-intro p::before { display: none !important; }
}
.about-bio p { font-size: 1.0625rem; line-height: 1.7; color: #475569; margin: 0 0 1rem; }
.about-bio p:last-child { margin-bottom: 0; }
@media (min-width: 768px) { .about-bio p { font-size: 1.125rem; } }
.about-book { display: block; width: fit-content; margin: 12px auto 0; padding: 8px 24px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 8px;
  color: #fff; font-weight: 700; transition: background-color .15s; }
.about-book:hover { background: rgba(255,255,255,.14); }

/* 17. Products: the Amazon affiliate notice under the intro. */
.affiliate-note { max-width: 42rem; margin: 1rem auto 0; font-size: .875rem; line-height: 1.5; color: #6b7280; }

/* 18. Home, phones: "Breaking Down Barriers to" no longer leaves "to" alone on a line. */
@media (max-width: 767px) { .page-index main h2 { text-wrap: balance; } }

/* 19. Footer quick links: taller rows, easier to tap (36px instead of 20px). */
footer .footer-links > li + li { margin-top: 0 !important; }
footer .footer-links a { padding: 8px 0; }

/* 20. Phones held sideways (short, wide screens): the teal contact bar covered the top of the logo and the hero
       taglines ran into the buttons. Hide both there, and pin the header to the top. */
@media (min-width: 768px) and (max-height: 500px) {
  .navigation-contact-bar { display: none !important; }
  .site-navigation { top: 0 !important; }
  .hero-tag { display: none; }
}

/* 21. Insurance & Payment: "Superbill eligible" is a small tag under the Out-of-Network heading (was its own line, with an
       invisible spacer line in the Private-Pay card to match), so both lists start right under their headings. */
.price-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.superbill-tag { display: inline-block; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
/* Laptops and up (cards side by side, headings on one line): the tag hangs just under the heading without adding height,
   so both headings sit at the same height and both lists start at the same height. */
@media (min-width: 1024px) {
  .price-head { position: relative; }
  .superbill-tag { position: absolute; top: 100%; left: 0; margin-top: 2px; }
}
