/* Iwasa Clinic v3.2.0 — new sections + mobile-only corrections.
 * Existing site.css is intentionally unchanged.
 * No content is clipped and pinch-to-zoom remains enabled.
 */
.iwasa-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.iwasa-sti-faq, .iwasa-partners { scroll-margin-top: 110px; }
.iwasa-sti-faq .section-head h2 { font-size: clamp(26px, 3.2vw, 40px); }
.iwasa-faq-list { max-width: 980px; margin: 0 auto; border-top: 1px solid var(--line); }
.iwasa-faq-list details { padding: 0; }
.iwasa-faq-list summary {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 24px; gap: 14px;
  align-items: start; padding: 23px 4px; list-style: none; font-size: 16px;
  line-height: 1.8; cursor: pointer;
}
.iwasa-faq-list summary::-webkit-details-marker { display: none; }
.iwasa-faq-mark { font-family: Georgia, serif; font-size: 22px; font-weight: 700; color: var(--teal); line-height: 1.35; }
.iwasa-faq-toggle { display: grid; place-items: center; font-size: 25px; color: var(--teal); line-height: 1.1; }
.iwasa-faq-toggle::before { content: '+'; }
.iwasa-faq-list details[open] .iwasa-faq-toggle::before { content: '−'; }
.iwasa-faq-answer { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 0 42px 24px 4px; }
.iwasa-faq-answer p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }
.iwasa-faq-answer .iwasa-faq-mark { color: var(--gold); }
.iwasa-partners { background: var(--cream); }
.iwasa-partners h2 { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.4; margin: 10px 0 22px; }
.iwasa-partners-description { max-width: 940px; color: var(--muted); font-size: 15px; line-height: 2; margin-bottom: 32px; white-space: pre-line; }
.iwasa-partner-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.iwasa-partner-grid li { min-width: 0; }
.iwasa-partner-grid a, .iwasa-partner-name {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 100%; min-height: 88px; padding: 21px 22px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; color: var(--navy); font-size: 15px;
  font-weight: 700; line-height: 1.8; overflow-wrap: anywhere;
}
.iwasa-partner-grid a:hover { border-color: var(--teal); background: #f5faf8; }
.iwasa-partner-arrow { color: var(--teal); font-size: 21px; flex: 0 0 auto; }
.iwasa-faq-list summary:focus-visible, .iwasa-partner-grid a:focus-visible,
.menu-btn:focus-visible, .mobile-menu a:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.iwasa-doctor-footer-grid { width: min(1180px, calc(100% - 44px)); margin: auto; display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 44px; }
.mobile-menu[hidden] { display: none !important; }

/* Match the original theme's mobile/tablet navigation breakpoint. */
@media (max-width: 1020px) {
  html.iwasa-menu-open { overflow: hidden; }
  .mobile-menu.open {
    position: fixed; inset: var(--iwasa-mobile-menu-top, 70px) 0 0; z-index: 55;
    padding: 18px 20px calc(94px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .mobile-menu a { padding: 14px 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .mobile-menu .iwasa-mobile-access { background: var(--mint); color: var(--navy); border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
  .menu-btn { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; font-size: 25px; line-height: 1; cursor: pointer; }
  .iwasa-doctor-page .header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
  .iwasa-doctor-page .header .nav { display: flex; align-items: center; gap: 16px; min-height: 70px; width: calc(100% - 28px); margin: auto; }
  .iwasa-doctor-page .header .menu { display: none; }
  .iwasa-doctor-page .brand { min-width: 0; }
  .iwasa-doctor-page .brand small { font-size: 10px; line-height: 1.4; }
  .iwasa-doctor-page .brand b { line-height: 1.5; }
  main :where(div, article, section, aside), .footer-grid > * { min-width: 0; }
  main .table-wrap, main .wp-block-table { width: 100%; min-width: 0; max-width: 100%; }
  /* Important only on constrained screens: override inline fixed widths in WP HTML. */
  main table { width: 100% !important; min-width: 0 !important; max-width: 100%; table-layout: fixed; }
  main table th, main table td { overflow-wrap: anywhere; word-break: normal; white-space: normal; }
  .price-table th, .price-table td { padding: 12px 9px; font-size: 14px; line-height: 1.8; }
  .price-table:not(.iwasa-ed-medicine-table):not(.aga-med-table) th:first-child { width: 64%; }
  .price-table:not(.iwasa-ed-medicine-table):not(.aga-med-table) th:last-child { width: 36%; }
  .iwasa-ed-medicine-table th:nth-child(1) { width: 52%; }
  .iwasa-ed-medicine-table th:nth-child(2) { width: 20%; }
  .iwasa-ed-medicine-table th:nth-child(3) { width: 28%; }
  .hours-table th, .hours-table td { padding: 11px 2px; font-size: 12px; line-height: 1.6; letter-spacing: 0; text-align: center; }
  .hours-table th:first-child, .hours-table td:first-child { width: 32%; font-size: 12px; text-align: left; padding-left: 3px; padding-right: 3px; }
  .iwasa-partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #hours { scroll-margin-top: 90px; }
}

@media (max-width: 767px) {
  main .wrap { width: calc(100% - 28px); max-width: 1180px; margin-left: auto; margin-right: auto; }
  main :where(h1, h2, h3, p, li, a, blockquote) { overflow-wrap: anywhere; }
  main iframe, main video, main img { max-width: 100%; }
  main input, main select, main textarea { max-width: 100%; min-width: 0; font-size: 16px; }
  main .btn { white-space: normal; overflow-wrap: anywhere; }
  .concerns-heading h2 { word-break: normal; overflow-wrap: anywhere; }
  .hero-title-line, .aga-strengths .section-head h2 .aga-treatment,
  #male-menopause .section-head h2 .treatment-name { white-space: normal; }
  .section-title-row { flex-wrap: wrap; }
  .header-row { gap: 12px; }
  .logo.logo-official { min-width: 0; }
  .iwasa-doctor-footer-grid { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 28px; }
  .mobile-cta { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .mobile-cta a { min-height: 48px; display: flex; align-items: center; justify-content: center; }
  .footer { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  .hours-table th, .hours-table td { padding: 10px 1px; }
  .hours-table th:first-child, .hours-table td:first-child { font-size: clamp(10.5px, 3vw, 12px); padding-left: 2px; padding-right: 2px; }
  .price-table th, .price-table td { padding: 12px 8px; }
  /* Preserve every column: detailed AGA rows become labelled cards, not clipped tables. */
  .iwasa-mobile-cards, .iwasa-mobile-cards tbody { display: block; width: 100%; }
  .iwasa-mobile-cards .iwasa-table-head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .iwasa-mobile-cards tr:not(.iwasa-table-head) { display: block; margin: 0 0 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .iwasa-mobile-cards tr:not(.iwasa-table-head):last-child { margin-bottom: 0; }
  .iwasa-mobile-cards td { display: block; width: 100%; border: 0; text-align: left; padding: 0 0 13px; font-size: 14px; line-height: 1.9; }
  .iwasa-mobile-cards td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 4px; }
  .iwasa-mobile-cards td:last-child { text-align: left; border-top: 1px solid var(--line); padding: 12px 0 0; font-size: 21px; color: var(--navy); }
  .iwasa-mobile-cards td small { font-size: 12px; }
  .iwasa-partner-grid { grid-template-columns: 1fr; gap: 10px; }
  .iwasa-partner-grid a, .iwasa-partner-name { min-height: 70px; padding: 18px; }
  .iwasa-partners-description { font-size: 15px; margin-bottom: 26px; }
  .iwasa-faq-list summary { grid-template-columns: 25px minmax(0, 1fr) 20px; gap: 10px; padding: 20px 2px; font-size: 15px; }
  .iwasa-faq-answer { grid-template-columns: 25px minmax(0, 1fr); gap: 10px; padding: 0 4px 22px 2px; }
  .iwasa-faq-answer p { font-size: 15px; line-height: 1.9; }
  .iwasa-faq-mark { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
