/* Accessibility, multilingual navigation and layout corrections for the ROMARG export. */
:root {
  --muted: #53615f;
}

html {
  scroll-padding-top: 96px;
}

[id] {
  scroll-margin-top: 96px;
}

.site-header {
  z-index: 1000;
  background: rgba(244, 241, 234, 0.98);
}

.header-inner {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: clamp(14px, 2vw, 30px);
}

.desktop-nav {
  gap: clamp(18px, 2.35vw, 36px);
}

.language-switcher {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 3px;
  border: 1px solid #aeb9b5;
  border-radius: 2px;
  background: #fcfbf8;
  box-shadow: 0 5px 14px rgba(18, 35, 33, 0.06);
}

.language-switcher a {
  min-width: 29px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1px;
  color: #354542;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
  background: #e4ebe8;
  color: #202729;
}

.language-switcher a[aria-current="page"] {
  background: #263d3c;
  color: #fcfbf8;
}

/* Several late cascade rules restored a pale background while retaining white hero text. */
.detail-hero,
.conditions-hub-hero,
.condition-hero,
.first-visit {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: linear-gradient(120deg, #263d3c 0%, #192a2a 100%) !important;
  color: #fcfbf8 !important;
}

.detail-hero h1,
.detail-hero h2,
.detail-hero h3,
.detail-hero .detail-lead,
.detail-hero .breadcrumbs,
.detail-hero .breadcrumbs a,
.conditions-hub-hero h1,
.conditions-hub-hero h2,
.conditions-hub-hero .conditions-hub-lead,
.conditions-hub-hero .breadcrumbs,
.conditions-hub-hero .breadcrumbs a,
.condition-hero h1,
.condition-hero h2,
.condition-hero .condition-lead,
.condition-hero .breadcrumbs,
.condition-hero .breadcrumbs a,
.first-visit h2,
.first-visit h3 {
  color: #fcfbf8 !important;
}

.detail-hero .eyebrow,
.conditions-hub-hero .eyebrow,
.condition-hero .eyebrow,
.first-visit .eyebrow,
.first-visit-card > span {
  color: #b9d1ca !important;
}

.detail-hero .detail-lead,
.conditions-hub-hero .conditions-hub-lead,
.condition-hero .condition-lead,
.first-visit .rich-text-field,
.first-visit-card .rich-text-field,
.first-visit-action p {
  color: rgba(252, 251, 248, 0.82) !important;
}

.detail-hero .button-secondary {
  border-color: rgba(252, 251, 248, 0.7) !important;
  color: #fcfbf8 !important;
}

.detail-hero .button-secondary:hover {
  border-color: #fcfbf8 !important;
  background: #fcfbf8 !important;
  color: #202729 !important;
}

/* Consultation FAQ: centre the section and keep it visually separate from the page. */
.consultation-faq {
  width: min(1180px, calc(100% - 56px)) !important;
  max-width: 1180px !important;
  margin: 18px auto !important;
  padding: clamp(44px, 5vw, 70px) !important;
  border: 1px solid #bec9c5 !important;
  border-left: 4px solid #607f79 !important;
  background: #fcfbf8 !important;
  box-shadow: 0 14px 34px rgba(18, 35, 33, 0.09);
}

.consultation-faq details {
  border-color: #bfc8c5 !important;
}

.consultation-faq summary {
  padding-block: 20px !important;
}

/* Consultation CTA: restore the dark panel required by its light text and controls. */
.consultation-cta {
  margin-top: 18px !important;
  padding: clamp(58px, 7vw, 82px) 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: #315b59 !important;
  color: #fcfbf8 !important;
}

.consultation-cta h2,
.consultation-cta .eyebrow,
.consultation-cta p,
.consultation-cta .detail-contact-actions > a:not(.button) {
  color: #fcfbf8 !important;
}

.consultation-cta p {
  color: rgba(252, 251, 248, 0.84) !important;
}

.consultation-cta .button-light {
  border-color: #fcfbf8 !important;
  background: #fcfbf8 !important;
  color: #202729 !important;
}

.consultation-cta .button-light:hover {
  border-color: #dce7e3 !important;
  background: #dce7e3 !important;
}

/* Improve AA contrast for secondary copy on light grey/green panels. */
.emergency-note p,
.condition-review p,
.condition-review li,
.condition-review .rich-text-field,
.intervention-review p,
.intervention-index-review p,
.cv-competency-list li,
.detail-procedures-intro p,
.intervention-detail .detail-section p,
.intervention-detail .detail-list,
.intervention-index-guidance p {
  color: #4a5756 !important;
}

/* Keep clinical notes and source panels readable; the original cascade reduced
   several of these blocks to 10–12 px on otherwise spacious desktop layouts. */
.condition-symptom-panel p,
.condition-urgent li {
  font-size: 14px !important;
  line-height: 1.65 !important;
}

.condition-review p,
.intervention-review p,
.condition-sources summary,
.condition-sources li,
.emergency-note p {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* Stronger boundaries make long medical pages easier to scan. */
.condition-region-card,
.condition-card,
.detail-procedure-card,
.pathology-section,
.pathology-faq,
.pathology-side > section,
.consultation-step-grid article,
.intervention-detail .detail-section,
.intervention-detail .related-interventions,
.intervention-index-guidance,
.intervention-index {
  border-color: #b9c5c1 !important;
}

.condition-region-card,
.condition-card,
.detail-procedure-card,
.consultation-step-grid article,
.pathology-intervention-grid > a {
  box-shadow: 0 12px 30px rgba(18, 35, 33, 0.08);
}

/* Long English and Hungarian medical terms may not contain natural wrapping
   points. Break them only when needed instead of letting cards or buttons
   widen the viewport. */
h1,
h2,
h3,
.button,
.condition-treatment-links a,
.condition-region-card,
.detail-procedure-card,
.pathology-intervention-grid > a,
.related-link-grid > a {
  overflow-wrap: break-word;
}

@media (max-width: 1080px) {
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
  }

  .brand {
    grid-column: 1;
  }

  .language-switcher {
    grid-column: 2;
  }

  .header-call {
    grid-column: 3;
  }

  .mobile-menu {
    grid-column: 4;
    display: block;
    position: relative;
  }

  .mobile-menu summary {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border: 1px solid #aeb7bc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span {
    width: 17px;
    height: 1px;
    background: #202729;
    transition: transform 0.2s;
  }

  .mobile-menu[open] summary span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .mobile-menu[open] summary span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .mobile-menu nav {
    position: absolute;
    z-index: 1010;
    top: 49px;
    right: 0;
    width: 250px;
    padding: 13px;
    border: 1px solid #aeb7bc;
    background: #fcfbf8;
    box-shadow: 0 14px 34px rgba(18, 35, 33, 0.16);
    display: flex;
    flex-direction: column;
  }

  .mobile-menu nav a {
    padding: 11px;
    border-bottom: 1px solid #c8d0cd;
    color: #263d3c;
    font-size: 12px;
    font-weight: 650;
  }

  .mobile-menu nav a.mobile-booking-link {
    color: #fcfbf8;
    background: #263d3c;
    border-bottom: 0;
    margin-bottom: 4px;
  }

  .mobile-menu nav a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 82px;
  }

  [id] {
    scroll-margin-top: 82px;
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand {
    grid-column: 1;
  }

  .language-switcher {
    grid-column: 2;
  }

  .mobile-menu {
    grid-column: 3;
  }

  .consultation-faq {
    width: min(680px, calc(100% - 36px)) !important;
    padding: 38px 24px !important;
  }

  .consultation-cta {
    padding-block: 54px !important;
  }
}

@media (max-width: 560px) {
  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 13.5px;
  }

  .brand-copy small {
    display: none;
  }

  .language-switcher {
    padding: 2px;
  }

  .language-switcher a {
    min-width: 27px;
    min-height: 27px;
    font-size: 9px;
  }

  .consultation-faq {
    width: calc(100% - 28px) !important;
    padding: 34px 20px !important;
  }
}

@media (max-width: 360px) {
  .brand-copy {
    display: none;
  }

  .header-inner {
    gap: 8px;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .language-switcher {
    display: none;
  }
}


/* Clinical expansion v19 */
html[lang^="hu"] .header-inner {
  gap: 12px;
}

html[lang^="hu"] .desktop-nav {
  min-width: 0;
  gap: clamp(10px, 1.25vw, 18px);
}

html[lang^="hu"] .desktop-nav a {
  white-space: nowrap;
  font-size: 10.5px;
}

html[lang^="hu"] .header-appointment {
  padding-inline: 12px;
}

.expanded-clinical-page .expanded-section-grid,
.expanded-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.expanded-clinical-supplement,
.expanded-related,
.recovery-intro,
.recovery-protocol-card {
  margin: 18px 0;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid #b9c5c1;
  border-top: 4px solid #6f8d88;
  border-radius: 3px;
  background: #fcfbf8;
  box-shadow: 0 12px 30px rgba(18, 35, 33, 0.08);
}

.expanded-card-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.expanded-card-grid article,
.protocol-phase-grid section {
  padding: 22px;
  border: 1px solid #c9d1cd;
  background: #f7f5ef;
}

.expanded-card-grid h3,
.protocol-phase-grid h3 {
  margin-bottom: 10px;
  color: #263d3c;
  font-size: 19px;
}

.expanded-card-grid p,
.expanded-inline-link,
.protocol-lead,
.protocol-phase-grid li {
  color: #4a5756;
  font-size: 14px;
  line-height: 1.72;
}

.expanded-inline-link a {
  color: #264846;
  border-bottom: 1px solid #6f8d88;
  font-weight: 700;
}

.recovery-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid #b9c5c1;
  background: #e8ece8;
}

.recovery-index strong {
  flex: 1 0 100%;
  margin-bottom: 5px;
  color: #263d3c;
}

.recovery-index a {
  padding: 7px 10px;
  border: 1px solid #aeb9b5;
  background: #fcfbf8;
  color: #263d3c;
  font-size: 11px;
  font-weight: 680;
}

.recovery-protocol-card {
  scroll-margin-top: 104px;
}

.recovery-protocol-card h2 {
  max-width: 900px;
  font-size: clamp(30px, 4vw, 46px);
}

.protocol-phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.recovery-service-row {
  min-height: 166px;
}

@media (max-width: 1180px) and (min-width: 1081px) {
  html[lang^="hu"] .brand-copy small,
  html[lang^="hu"] .header-appointment-copy small {
    display: none;
  }
}

@media (max-width: 820px) {
  .expanded-clinical-page .expanded-section-grid,
  .expanded-card-grid,
  .protocol-phase-grid {
    grid-template-columns: 1fr;
  }

  .expanded-clinical-supplement,
  .expanded-related,
  .recovery-intro,
  .recovery-protocol-card {
    padding: 26px 21px;
  }
}


/* Knee pathway refinement v20 */
.v20-pathway {
  margin-inline: auto;
  width: min(1180px, calc(100% - 40px));
}

.v20-pathway > .protocol-lead {
  max-width: 82ch;
  margin: 0 0 22px;
  color: #263d39;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
}

.v20-pathway .expanded-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.v20-pathway .expanded-card-grid article {
  min-height: 100%;
}

.v20-pathway .related-link-grid {
  margin-top: 20px;
}

@media (max-width: 680px) {
  .v20-pathway {
    width: min(100% - 24px, 1180px);
  }
}
