/* Phone layout fixes, loaded after every other stylesheet (build-refinements.py).
   Nothing touches the screen edge: every row stays inside the 20px page gutter. */

/* Examination and specialty pages: breathing room between the breadcrumb and the label above the title. */
.examination-page .page-intro .breadcrumbs { margin-bottom: 22px; }

@media (max-width: 1179px) {
  /* The open menu keeps the logo row at its closed height instead of pressing the logo against the top bar. */
  .smc-header-inner { align-content: flex-start; }
  .smc-header-inner > .brand { display: flex; align-items: center; min-height: 86px; }
}

@media (max-width: 760px) {
  .smc-header-inner > .brand { min-height: 78px; }
  .smc-utility-inner { font-size: 11px; }

  /* Small labels stay legible on a phone. */
  .eyebrow { font-size: 10px; }
  .breadcrumbs, .about-crumbs { font-size: 11px; }

  /* Hero: two equal buttons filling the row. */
  .hero .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .actions .btn { justify-content: space-between; min-width: 0; }

  /* Section heads with a side link: the title gets the full width, the link follows it. */
  .section-head { display: block; }
  .section-head .text-link { display: inline-flex; margin-top: 18px; }

  /* Specialists gallery: the booking note on its own line, the controls below it. */
  #szakemberek .doctors-controls { flex-direction: column; align-items: stretch; gap: 16px; }
  #szakemberek .doctors-controls > p { max-width: none; margin: 0; font-size: 12px; }
  #szakemberek .doctors-controls > div { justify-content: flex-end; }

  /* Infections A–Z: the letters wrap into an even grid inside the gutter. */
  .infection-jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; overflow: visible; margin-inline: 0; padding: 0; }
  .infection-jump a { min-width: 0; width: auto; height: 42px; padding: 0; }

  /* Specialty and examination pages. */
  .examination-page .page-intro { padding-top: 30px; padding-bottom: 36px; }
  .examination-page .page-intro .about-crumbs { padding-top: 0; }
  .examination-page .page-title { font-size: clamp(32px, 9.6vw, 42px); overflow-wrap: break-word; }
  .examination-page .meta-line { flex-direction: column; align-items: flex-start; gap: 6px; }
  .examination-page .meta-line span + span::before { content: none; }

  /* Comparison tables: one card per row, each value under its column name. */
  .examination-page .article-main table.compare-table { display: block; overflow: visible; background: none; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table tbody, .compare-table tr, .compare-table td { display: block; }
  .compare-table tr { margin-bottom: 14px; padding: 6px 18px 10px; background: #fcfbf9; border: 1px solid #e0dbd2; }
  .examination-page .article-main .compare-table td { padding: 10px 0; border-bottom: 1px solid #ece8e0; }
  .examination-page .article-main .compare-table td:last-child { border-bottom: 0; }
  .compare-table td:first-child { font: 400 21px/1.3 var(--serif); color: var(--navy); }
  .compare-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 600 10px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
  .compare-table td p { margin: 0; }
  .examination-page .article-main .compare-table td:first-child p { font: inherit; color: inherit; }

  /* Team directory: a native picker instead of a row of chips running off the screen. */
  .team-filter.has-picker { display: none; }
  .team-picker { display: flex; flex-direction: column; gap: 8px; }
  .team-picker span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
  .team-picker select { width: 100%; min-height: 50px; padding: 0 44px 0 16px; border: 1px solid #cbaf6a88; border-radius: 0; background: #fcfbf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a6128' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 18px center; color: var(--navy); font: 500 15px/1.2 var(--sans); appearance: none; -webkit-appearance: none; }

  /* Footer: the cookie settings link sits with the other small print. */
  .site-footer .footer-bottom .cookie-footer { text-align: left; }
}

@media (min-width: 761px) {
  .team-picker { display: none; }
}

/* Cookie settings link in the footer's small print, at every width. */
.site-footer .footer-bottom .cookie-footer { padding: 0; border: 0; background: none; color: #cec8bc; font: inherit; text-decoration: none; cursor: pointer; }
.site-footer .footer-bottom .cookie-footer:hover, .site-footer .footer-bottom .cookie-footer:focus-visible { color: var(--gold-light, #d6c086); }
