/* Responsive production styles below the fixed desktop baseline. */
.responsive-menu-toggle,
.responsive-contact {
  display: none;
}

@media (max-width: 1279px) {
  :root {
    --responsive-header-height: 72px;
  }

  html {
    overflow-x: hidden;
  }

  body.layout-fixed {
    min-width: 0;
    overflow-x: hidden;
  }

  .site-header {
    height: var(--responsive-header-height);
  }

  .site-header::before,
  .site-header::after {
    display: none;
  }

  .site-header__inner {
    width: 100%;
    height: var(--responsive-header-height);
    margin: 0;
  }

  .site-brand {
    top: 10px;
    left: 14px;
    width: 170px;
    font-size: 15px;
    line-height: 17px;
    text-align: left;
  }

  .site-header .header-slot:not(.accessibility-slot) {
    display: none;
  }

  .responsive-menu-toggle {
    position: absolute;
    z-index: 35;
    top: 15px;
    right: 8px;
    display: flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #fff;
    color: #000;
    cursor: pointer;
  }

  .responsive-menu-toggle::before,
  .responsive-menu-toggle::after,
  .responsive-menu-toggle > span::before {
    position: absolute;
    left: 10px;
    width: 22px;
    height: 2px;
    content: "";
    background: currentColor;
    transition: transform 140ms ease, top 140ms ease, opacity 140ms ease;
  }

  .responsive-menu-toggle::before { top: 13px; }
  .responsive-menu-toggle > span::before { top: 20px; }
  .responsive-menu-toggle::after { top: 27px; }
  .responsive-menu-toggle > span { position: absolute; inset: 0; font-size: 0; }

  html.responsive-menu-open .responsive-menu-toggle::before {
    top: 20px;
    transform: rotate(45deg);
  }
  html.responsive-menu-open .responsive-menu-toggle::after {
    top: 20px;
    transform: rotate(-45deg);
  }
  html.responsive-menu-open .responsive-menu-toggle > span::before { opacity: 0; }

  .responsive-menu-toggle:hover,
  .responsive-menu-toggle:focus-visible,
  html.responsive-menu-open .responsive-menu-toggle {
    color: var(--color-accent);
  }
  .responsive-menu-toggle:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
  }

  .site-search {
    top: 15px;
    right: 146px;
    width: 42px;
    height: 42px;
  }
  .site-search__toggle {
    width: 42px;
    height: 42px;
  }

  .translation-control {
    top: 15px;
    right: 100px;
    width: 42px;
    height: 42px;
  }
  .translation-control__button {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
  .translation-control__button span,
  .translation-control__button::after {
    display: none;
  }

  .accessibility-slot {
    top: 15px;
    right: 54px;
    left: auto;
    display: block !important;
    width: 42px;
    min-height: 42px;
    height: 42px;
  }
  .accessibility-button {
    min-height: 42px;
  }
  .accessibility-button img {
    top: 12px;
    left: 5px;
  }

  .site-search__panel,
  .translation-panel {
    position: fixed;
    top: var(--responsive-header-height);
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
  .site-search__panel {
    max-height: calc(100vh - var(--responsive-header-height) - 12px);
  }
  .translation-panel {
    left: auto;
    width: min(300px, calc(100vw - 24px));
  }

  .primary-nav {
    position: fixed;
    z-index: 30;
    top: var(--responsive-header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    height: auto;
    padding: 8px 0 28px;
    overflow-y: auto;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.22);
  }

  html.responsive-menu-open {
    overflow: hidden;
  }
  html.responsive-menu-open .primary-nav {
    display: flex;
  }

  .nav-group,
  .nav-direct {
    width: 100%;
    height: auto;
    margin: 0;
  }
  .nav-group__button,
  .nav-direct__link {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 13px 50px 12px 20px;
    justify-content: flex-start;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    line-height: 22px;
    text-align: left;
    white-space: normal;
  }
  .nav-group__button::after {
    top: 17px;
    right: 20px;
  }
  .nav-group.is-open > .nav-group__button::after {
    transform: rotate(180deg);
  }
  .nav-group.is-active > .nav-group__button::before,
  .nav-direct__link.is-active::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    width: 4px;
    height: auto;
  }

  .nav-submenu,
  .nav-group:hover > .nav-submenu,
  .nav-group:focus-within > .nav-submenu {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    border-bottom: 1px solid #eee;
  }
  .nav-group.is-open > .nav-submenu {
    display: block;
  }
  .nav-submenu a {
    height: auto;
    min-height: 43px;
    padding: 10px 20px 10px 38px;
    font-size: 16px;
    line-height: 22px;
    white-space: normal;
  }

  .responsive-contact {
    display: block;
    margin: 20px 20px 0;
    padding: 18px 0 0;
    border-top: 2px solid #e1e1e1;
    color: #000;
    font-size: 15px;
    line-height: 21px;
  }
  .responsive-contact h2 {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 24px;
  }
  .responsive-contact p {
    margin: 0 0 8px;
  }
  .responsive-contact strong {
    font-weight: 700;
  }
  .responsive-contact a {
    color: #0000ff;
    text-decoration: underline;
  }
  .responsive-contact__section + .responsive-contact__section {
    margin-top: 18px;
  }

  .site-page {
    width: 100%;
    min-height: 100vh;
  }
  .site-main {
    padding: calc(var(--responsive-header-height) + 22px) 28px 36px;
  }
  .page-home .site-main {
    padding-top: var(--responsive-header-height);
  }

  .link-list,
  .news-article,
  .article-resource-grid,
  .article-action-grid,
  .embed-video-stack--standard,
  .embed-video-stack--large,
  .embed-survey-frame,
  .embed-qr {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .article-media,
  .article-gallery,
  .poster-frame {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin-left: 0 !important;
  }
  .article-media img,
  .article-gallery img,
  .poster-image,
  .article-inline-image {
    max-width: 100%;
    height: auto;
  }
  .poster-frame .poster-image {
    width: 100%;
    margin-left: 0;
    margin-top: 0;
  }
  .article-inline-image--float-left,
  .article-inline-image--float-right {
    float: none;
    display: block;
    margin-right: auto;
    margin-left: auto;
  }

  .embed-video,
  .embed-video--standard,
  .embed-video--large {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .embed-video-row {
    flex-wrap: wrap;
  }
  .embed-frame,
  .embed-survey-frame {
    width: 100%;
  }
  .embed-qr {
    width: min(400px, 100%);
    height: auto;
  }

  .article-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
  }
  .article-resource-card img {
    width: min(300px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
  .article-action-grid {
    grid-template-columns: repeat(2, minmax(0, 228px));
    gap: 22px;
    padding: 0;
    justify-content: center;
  }

  .signature-row {
    gap: 24px;
    flex-wrap: wrap;
  }

  .partner-links {
    width: auto;
    margin: 0 28px;
  }
  .partner-links__row {
    position: static;
    display: flex;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px 26px;
  }
  .partner-links__row + .partner-links__row {
    margin-top: 22px;
  }
  .partner-link,
  .partner-link--1, .partner-link--2, .partner-link--3, .partner-link--4,
  .partner-link--5, .partner-link--6, .partner-link--7, .partner-link--8,
  .partner-link--9, .partner-link--10, .partner-link--11, .partner-link--12 {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
  }
  .partner-link img,
  .partner-link--2 img,
  .partner-link--4 img,
  .partner-link--9 img {
    max-width: min(100%, 262px);
    height: auto;
    margin: 0;
  }
  .site-copyright {
    margin-top: 42px;
    padding: 0 20px;
    font-size: 17px;
    line-height: 22px;
  }

  .home-hero {
    width: 100vw;
    height: clamp(440px, 65vw, 620px);
    margin-left: 0;
  }
  .home-hero__promos {
    top: 22px;
    right: 20px;
    width: min(323px, calc(100vw - 40px));
  }
  .prose .home-promo-link,
  .prose .home-promo-link:link,
  .prose .home-promo-link:visited {
    width: 100%;
  }
  .home-page > :not(.home-hero) {
    width: auto;
    max-width: 1066px;
    margin-right: 28px;
    margin-left: 28px;
  }
  .home-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
  .home-about__layout {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 28px;
  }
  .home-about__photos {
    height: auto;
    min-height: 470px;
  }
  .home-about__photo {
    width: min(82%, 453px);
    height: auto;
    aspect-ratio: 453 / 302;
  }
  .home-about__photo--2 {
    top: 210px;
    left: 18%;
  }
  .home-useful__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 30px;
  }

  .personal-data-policy-page .policy-document {
    width: 100%;
  }

  .accessibility-panel {
    top: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

@media (max-width: 767px) {
  .site-main {
    padding-right: 16px;
    padding-left: 16px;
  }
  .page-title {
    overflow-wrap: anywhere;
  }
  .publication-date {
    padding-right: 0;
  }

  .article-resource-grid,
  .article-action-grid {
    grid-template-columns: 1fr;
  }
  .article-action-grid {
    justify-items: center;
  }
  .signature-row {
    display: block;
  }
  .signature-row > :last-child {
    display: block;
    margin-top: 8px;
    text-align: left;
  }

  .partner-links {
    margin-right: 16px;
    margin-left: 16px;
  }
  .partner-links__row {
    gap: 16px;
  }

  .home-hero {
    height: 420px;
  }
  .home-hero__promos {
    top: 16px;
    right: 16px;
    width: calc(100vw - 32px);
  }
  .prose .home-promo-link,
  .prose .home-promo-link:link,
  .prose .home-promo-link:visited {
    min-height: 34px;
    height: auto;
    padding: 6px 10px;
  }
  .home-page > :not(.home-hero) {
    margin-right: 16px;
    margin-left: 16px;
  }
  .home-section-title {
    font-size: 30px;
    line-height: 37px;
  }
  .home-services,
  .home-about {
    margin-top: 48px;
  }
  .home-service-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 30px;
  }
  .home-about__layout {
    display: block;
    margin-top: 32px;
  }
  .home-about__photos {
    display: grid;
    min-height: 0;
    margin-top: 28px;
    gap: 18px;
  }
  .home-about__photo,
  .home-about__photo--1,
  .home-about__photo--2 {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 453 / 302;
  }
  .home-useful {
    margin-top: 44px;
  }
  .home-useful__links {
    grid-template-columns: 1fr;
    margin-top: 24px;
    padding-left: 28px;
  }

  .home-patient-notice {
    max-width: calc(100vw - 24px);
    padding: 58px 20px 28px;
  }
  .home-patient-notice__content h2,
  .home-patient-notice__content p {
    font-size: 22px;
    line-height: 31px;
  }

  .accessibility-panel__inner {
    padding: 14px;
  }
  .accessibility-panel__header {
    align-items: flex-start;
  }
  .accessibility-panel__title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .responsive-menu-toggle::before,
  .responsive-menu-toggle::after,
  .responsive-menu-toggle > span::before {
    transition: none;
  }
}

@media (max-width: 1279px) {
  .home-notice { width: 100%; }
  .embed-page--survey .page-title { width: auto; max-width: 100%; }
}

/* Patient-first mobile/tablet home and compact accessibility control. */
.responsive-patient-access {
  display: none;
}

@media (max-width: 1279px) {
  /* Keep the approved desktop eye asset, but make its mobile control match the
     other compact header controls instead of positioning a tiny raster by hand. */
  .accessibility-slot.accessibility-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .accessibility-slot.accessibility-button img {
    position: static;
    width: 36px;
    height: auto;
    max-width: none;
  }

  .responsive-patient-access {
    display: grid;
    width: auto;
    max-width: 1066px;
    margin: 20px 28px 24px;
    padding: 20px 22px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 28px;
    align-items: center;
    border-top: 3px solid var(--color-brand);
    border-bottom: 1px solid #e1e1e1;
    background: #fff;
    color: #000;
    text-align: left;
  }
  .responsive-patient-access__title {
    grid-column: 1 / -1;
    margin: 0;
    font: 600 24px/30px "Open Sans", Arial, sans-serif;
    text-transform: none;
  }
  .prose .responsive-patient-access__contacts {
    display: block;
    color: #0000ff;
    font: 400 16px/22px "Open Sans", Arial, sans-serif;
    text-align: center;
    text-decoration: underline;
  }

  /* The first mobile/tablet content block now owns its margins explicitly. */
  .home-page > .responsive-patient-access {
    margin-right: 28px;
    margin-left: 28px;
  }
}

@media (max-width: 767px) {
  .accessibility-slot.accessibility-button img {
    width: 37px;
  }

  .responsive-patient-access,
  .home-page > .responsive-patient-access {
    margin: 12px 16px 18px;
    padding: 16px;
    display: block;
  }
  .responsive-patient-access__title {
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 28px;
  }
}


/* Final patient-card layout and compact mobile accessibility icon. */
@media (max-width: 1279px) {
  .accessibility-slot.accessibility-button {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .accessibility-slot.accessibility-button img {
    width: 24px;
    height: 14px;
  }

  .responsive-patient-access,
  .home-page > .responsive-patient-access {
    display: block;
    margin: 16px 28px 20px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .responsive-patient-access__title {
    margin: 0 0 14px;
    font: 700 22px/28px "Open Sans", Arial, sans-serif;
    color: #000;
  }
  .responsive-patient-access__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .responsive-patient-card {
    padding: 18px;
    border: 1px solid #d7d7d7;
    border-radius: 18px;
    background: #fff;
    color: #000;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .responsive-patient-card__title {
    margin: 0;
    font: 700 24px/30px "Open Sans", Arial, sans-serif;
    color: var(--color-brand);
  }
  .responsive-patient-card__subtitle {
    margin: 4px 0 14px;
    font: 600 15px/20px "Open Sans", Arial, sans-serif;
    color: #303030;
  }
  .responsive-patient-card__fact {
    margin: 0 0 12px;
    font: 400 16px/22px "Open Sans", Arial, sans-serif;
  }
  .responsive-patient-card__fact strong,
  .responsive-patient-card__fact span,
  .responsive-patient-card__fact small {
    display: block;
  }
  .responsive-patient-card__fact strong { margin-bottom: 3px; }
  .responsive-patient-card__fact small {
    margin-top: 4px;
    font: 400 13px/18px "Open Sans", Arial, sans-serif;
    color: #505050;
  }
  .prose .responsive-patient-card__phone,
  .responsive-patient-card__phone {
    margin: 0 0 14px;
    font: 400 16px/22px "Open Sans", Arial, sans-serif;
    color: #000;
  }
  .prose .responsive-patient-card__phone a,
  .prose .responsive-patient-card__phone a:link,
  .prose .responsive-patient-card__phone a:visited {
    color: #0000ff;
    text-decoration: underline;
  }
  .prose .responsive-patient-card__booking,
  .prose .responsive-patient-card__booking:link,
  .prose .responsive-patient-card__booking:visited {
    width: 100%;
    min-height: 48px;
    height: auto;
    padding: 12px 16px;
    justify-content: center;
    font-size: 15px;
    line-height: 20px;
    text-align: center;
  }
  .prose .responsive-patient-access__contacts,
  .prose .responsive-patient-access__contacts:link,
  .prose .responsive-patient-access__contacts:visited {
    display: inline-block;
    margin-top: 14px;
    color: #0000ff;
    font: 400 16px/22px "Open Sans", Arial, sans-serif;
    text-decoration: underline;
  }

  .page-home .home-hero {
    display: none;
  }
}

@media (max-width: 767px) {
  .accessibility-slot.accessibility-button img {
    width: 22px;
    height: 13px;
  }
  .responsive-patient-access,
  .home-page > .responsive-patient-access {
    margin: 12px 16px 18px;
  }
  .responsive-patient-access__title {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 26px;
  }
  .responsive-patient-access__cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .responsive-patient-card {
    padding: 16px;
    border-radius: 16px;
  }
  .responsive-patient-card__title {
    font-size: 22px;
    line-height: 28px;
  }
  .responsive-patient-card__subtitle {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 19px;
  }
  .responsive-patient-card__fact,
  .prose .responsive-patient-card__phone,
  .responsive-patient-card__phone {
    font-size: 15px;
    line-height: 21px;
  }
  .prose .responsive-patient-card__booking,
  .prose .responsive-patient-card__booking:link,
  .prose .responsive-patient-card__booking:visited {
    min-height: 52px;
    font-size: 15px;
    line-height: 20px;
  }
}


/* Production mobile reading rule: ordinary prose is left-aligned on phone widths.
   Explicit centered/right-aligned article variants and the source-specific policy document remain unchanged. */
@media (max-width: 767px) {
  .content-page.prose:not(.personal-data-policy-page),
  .article-compact,
  .article-text {
    text-align: left;
  }
  .article-text--center {
    text-align: center;
  }
  .article-text--right {
    text-align: right;
  }
}
