/* Shared mobile and browser-zoom layout fixes for all public pages.
   Keep the original full-sized D&F logo and visual styling on wide screens. */
html { min-width: 0; }
body { min-width: 0; }
main, section, .section-inner, .split > *, .columns > *, .contact-layout > * { min-width: 0; }
img, svg { max-width: 100%; }
.section-title, .section-heading, .page-title, .page-subtitle,
.practice-title, .practice h2, .service-summary-main strong, .article h2,
.contact-detail strong, .callout h2, .leader-card h3, .roster-card span {
  overflow-wrap: break-word;
}

/* Reduce the long horizontal navigation before it meets the appointment button. */
@media (max-width: 1650px) and (min-width: 1181px) {
  .desktop-nav { gap: clamp(12px, 1.4vw, 23px); }
  .nav-link { font-size: clamp(17px, 1.2vw, 20px); }
}

/* At narrow viewports (also reached through browser zoom), use the mobile menu. */
@media (max-width: 1180px) {
  .site-header { height: 160px; }
  .brand { left: 4.5%; top: 10px; transform: scale(.56); transform-origin: top left; }

  .desktop-nav,
  .desktop-nav.open {
    position: absolute;
    top: 100px;
    left: 4%; right: 4%;
    z-index: 12;
    margin: 0;
    padding: 17px;
    background: rgba(13,12,10,.98);
    border: 1px solid rgba(205,171,117,.52);
    box-shadow: 0 15px 30px rgba(0,0,0,.55);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    white-space: normal;
  }
  .desktop-nav { display: none; }
  .desktop-nav.open { display: flex; }
  .desktop-nav .nav-link { display: block; padding: 12px; font-size: 21px; white-space: normal; }
  .desktop-nav .nav-link::after { bottom: 4px; }

  .appointment, .header-cta {
    top: 33px; right: 92px; width: auto; min-height: 46px;
    padding: 0 17px; gap: 11px; font-size: 11px; letter-spacing: .08em;
  }
  .mobile-menu-button, .menu-toggle {
    display: flex; position: absolute; z-index: 13;
    top: 33px; right: 4%; width: 46px; height: 46px;
    align-items: center; justify-content: center; flex-direction: column;
    gap: 5px; border: 1px solid #987649; background: rgba(0,0,0,.68);
  }
  .mobile-menu-button i { display: block; width: 19px; height: 1px; background: #e5c68f; }

  body[data-page="home"] .hero { display: flex; flex-direction: column; min-height: max(740px, 100svh); }
  body[data-page="home"] .hero .site-header { position: relative; flex: none; }
  body[data-page="home"] .hero-content {
    position: relative; top: auto; bottom: auto; left: auto;
    width: min(88%, 680px); margin: auto 0 9% 6%; padding-top: 26px;
  }
  body[data-page="home"] .hero-title { font-size: clamp(72px, 10vw, 112px); line-height: .83; }
  body[data-page="home"] .hero-actions { flex-wrap: wrap; }

  body:not([data-page="home"]) .page-hero { min-height: 610px; }
  body:not([data-page="home"]) .page-hero-inner { padding-top: 210px; }
  .columns, .contact-layout, .long-copy, .mission-grid, .leadership-grid { grid-template-columns: minmax(0,1fr); }
  .roster-grid { grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr)); }
}

@media (max-width: 800px) {
  body[data-page="home"] .hero { min-height: max(720px, 100svh); }
  body[data-page="home"] .hero-content { width: 88%; margin-bottom: 8%; }
  body[data-page="home"] .hero-title { font-size: clamp(65px, 12vw, 96px); white-space: normal; }
  body[data-page="home"] .hero-description { max-width: 40rem; }
  body[data-page="home"] .section { padding: 76px 6%; }
  body[data-page="home"] .split { grid-template-columns: minmax(0,1fr); }
  body[data-page="home"] .practice-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body:not([data-page="home"]) .section { padding: 76px 6%; }
  body:not([data-page="home"]) .page-title { font-size: clamp(62px, 10.5vw, 92px); }
  .values { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .practice-grid, .service-points { grid-template-columns: minmax(0,1fr); }
  .contact-form { width: 100%; }
  .callout-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .site-header { height: 132px; }
  .brand { left: 12px; top: 12px; transform: scale(.43); }
  .desktop-nav, .desktop-nav.open { top: 91px; left: 12px; right: 12px; }
  .desktop-nav .nav-link { font-size: 19px; padding: 11px; }
  .appointment, .header-cta {
    top: 25px; right: 68px; min-height: 41px; max-width: calc(100vw - 183px);
    padding: 0 10px; gap: 5px; font-size: 9px; letter-spacing: 0;
  }
  .appointment .arrow, .header-cta .arrow { font-size: 17px; }
  .mobile-menu-button, .menu-toggle { top: 25px; right: 13px; width: 41px; height: 41px; }

  body[data-page="home"] .hero { min-height: max(680px, 100svh); background-position: 62% center; }
  body[data-page="home"] .hero-content { width: 88%; margin: auto 6% 65px; padding-top: 12px; }
  body[data-page="home"] .hero-title { font-size: clamp(51px, 14.5vw, 80px); line-height: .88; white-space: normal; }
  body[data-page="home"] .hero-description { font-size: 17px; line-height: 1.32; margin: 24px 0 0; }
  body[data-page="home"] .hero-actions { display: flex; flex-direction: column; align-items: stretch; max-width: 100%; margin-top: 25px; }
  body[data-page="home"] .action { width: 100%; min-width: 0; white-space: normal; gap: 9px; font-size: 10px; letter-spacing: .07em; }
  body[data-page="home"] .practice-grid { grid-template-columns: minmax(0,1fr); }
  body[data-page="home"] .section-title { font-size: clamp(39px, 11vw, 54px); }
  body[data-page="home"] .section-art { min-height: 180px; padding: 14px; }
  body[data-page="home"] .practice-card, body[data-page="home"] .contact-card { padding: 27px 22px; }
  body[data-page="home"] .article-line { flex-direction: column; align-items: flex-start; gap: 8px; }

  body:not([data-page="home"]) .page-hero { min-height: 550px; }
  body:not([data-page="home"]) .page-hero-inner { padding: 177px 6% 65px; }
  body:not([data-page="home"]) .page-title { font-size: clamp(49px, 11.5vw, 74px); line-height: .92; }
  body:not([data-page="home"]) .section-heading { font-size: clamp(40px, 10.5vw, 55px); }
  .breadcrumb { flex-wrap: wrap; }
  .values, .practice-grid, .roster-grid { grid-template-columns: minmax(0,1fr); }
  .mission-card, .leader-card { padding: 28px 22px; min-height: 0; }
  .leader-card h3 { font-size: clamp(42px, 11vw, 59px); }
  .service-summary { grid-template-columns: 24px minmax(0,1fr) 30px; gap: 7px; }
  .service-summary-main strong { font-size: clamp(26px, 7vw, 34px); }
  .service-summary-main small { font-size: 18px; }
  .service-expanded { padding: 0 4px 29px 32px; }
  .contact-detail { grid-template-columns: minmax(0,1fr); }
  .contact-detail strong { overflow-wrap: anywhere; }
  .contact-form { padding: 25px 18px; }
  .callout h2 { font-size: clamp(39px, 10vw, 58px); }
  .button { white-space: normal; max-width: 100%; }
  .footer, .site-footer { gap: 17px; }
}

@media (max-width: 355px) {
  .appointment, .header-cta { display: none; }
  .mobile-menu-button, .menu-toggle { right: 12px; }
  body[data-page="home"] .hero-title { font-size: clamp(46px, 14vw, 60px); }
  .eyebrow { overflow-wrap: anywhere; }
}
