/* Mobile layout for the active site. Desktop rules remain in style.css. */
.about__head h2 { font-size: 2.6rem; }
.mobile-menu, .mobile-intro, .mobile-actions, .mobile-about-link,
.doctor-card__mobile-name, .mobile-doctor-search, .mobile-direction-search,
.mobile-shortcuts, .mobile-list-more { display: none; }
.doctor-card[hidden], .direction-card[hidden] { display: none; }
.doctor-card__more-mobile { display: none; }

@media (min-width: 861px) and (max-width: 1180px) {
    .site-header__top { grid-template-columns: auto minmax(160px, 1fr) auto; gap: 16px; }
    .site-header__address, .site-header__mail { font-size: 14px; }
}

@media (max-width: 860px) {
    html { scroll-padding-bottom: 100px; }
    body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
    .container { padding-inline: 20px; }
    .site-header__top {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px 16px;
        padding-block: 8px 12px;
        position: relative;
    }
    .site-header__logo { justify-self: start; min-width: 0; }
    .site-header__logo img { width: 125px; height: 64px; object-fit: contain; }
    .site-header__contacts, .site-header > .site-nav { display: none; }
    .site-search {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
        border-radius: 8px;
        background: #f4f7fc;
        padding: 3px 5px 3px 14px;
    }
    .site-search__input { width: 0; font-size: 16px; min-height: 44px; }
    .site-search__input::placeholder { color: #627086; }
    .site-search__btn { width: 44px; height: 44px; background: transparent; }
    .site-search:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }
    .mobile-menu { display: block; justify-self: end; }
    .mobile-menu summary {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        min-height: 46px; padding: 10px 13px; border: 1px solid #dbe4f3;
        border-radius: 12px; font-weight: 600; font-size: 14px;
        cursor: pointer; list-style: none; background: white;
    }
    .mobile-menu summary::-webkit-details-marker { display: none; }
    .mobile-menu__icon { width: 18px; height: 12px; border-block: 2px solid #253b57; position: relative; }
    .mobile-menu__icon::after { content: ''; position: absolute; top: 3px; left: 0; width: 18px; border-top: 2px solid #253b57; }
    .mobile-menu[open] summary { background: #edf4ff; color: #0856c5; border-color: #a9c9fa; }
    .mobile-menu__panel {
        position: absolute; left: 12px; right: 12px; top: 78px; z-index: 50;
        padding: 16px; background: #fff; border: 1px solid #dce6f4;
        border-radius: 18px; box-shadow: 0 12px 36px #14386626;
        max-height: calc(100dvh - 190px - env(safe-area-inset-bottom, 0px)); overflow-y: auto;
    }
    .mobile-menu__panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .mobile-menu__panel nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 12px; border-radius: 10px; background: #f2f6fc; color: #253b57; font-weight: 600; }
    .mobile-menu__panel nav a[aria-current] { background: #0869fc; color: white; }
    .mobile-menu__contacts { display: grid; padding-top: 12px; margin-top: 12px; border-top: 1px solid #e6edf6; }
    .mobile-menu__contacts a { min-height: 44px; padding: 10px 4px; overflow-wrap: anywhere; font-size: 14px; }
    a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #0869fc; outline-offset: 3px; }

    :root {
        --mobile-ink: #172f49;
        --mobile-copy: #354b61;
        --mobile-wash: #f1f5fa;
        --mobile-blue: #0759d3;
        --mobile-line: #d5dfeb;
        --mobile-ease: cubic-bezier(.16, 1, .3, 1);
    }
    h1, h2, h3, h4 { font-family: var(--font-body); color: var(--mobile-ink); }
    ::selection { background: #c9dfff; color: var(--mobile-ink); }
    input { caret-color: var(--mobile-blue); }
    html { scroll-padding-top: 20px; }
    .hero-banner { display: flex; flex-direction: column; background: white; overflow: hidden; }
    .hero-banner::before { display: none; }
    .hero-banner > img {
        position: static; order: 1; width: calc(100% - 40px); margin: 0 20px;
        height: clamp(160px, 46vw, 280px); max-height: none; object-fit: cover;
        object-position: center 52%; border-radius: 2px; opacity: 1;
    }
    .hero-banner__caption { display: none; }
    .mobile-intro { display: block; padding: 26px 20px 8px; width: 100%; }
    .mobile-intro h1 {
        font: 600 clamp(38px, 10vw, 60px)/1.12 var(--font-body);
        letter-spacing: -.035em; color: var(--mobile-ink); margin: 0 0 16px;
    }
    .mobile-intro p { font-size: 18px; line-height: 1.55; color: var(--mobile-copy); margin: 0 0 22px; max-width: 40ch; }
    .mobile-intro .btn { display: flex; justify-content: space-between; align-items: center; min-height: 52px; width: 100%; border-radius: 8px; font-size: 15px; background: var(--mobile-blue); }
    .mobile-intro .btn img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
    .mobile-intro__address { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 13px; color: var(--mobile-copy); text-underline-offset: 4px; }
    .mobile-intro__address img { width: 16px; height: 16px; }
    .mobile-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 14px 0; }
    .mobile-shortcuts a { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 14px; font-weight: 600; color: var(--mobile-blue); }
    .section { padding-block: 32px; }
    .about { background: white; }
    .about > .container { display: flex; flex-direction: column; }
    .about__directions-title { order: -4; margin: 0 0 16px; color: #152f50; font-size: 22px; letter-spacing: -.025em; }
    .mobile-direction-search:not([hidden]) { display: block; order: -3; margin: 0 0 12px; }
    .mobile-direction-search label { display: block; font-size: 14px; color: var(--mobile-copy); margin-bottom: 8px; }
    .mobile-direction-search input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--mobile-line); border-radius: 8px; background: white; font: 16px var(--font-body); }
    .mobile-direction-search input::placeholder { color: #596b7e; }
    #direction-search-status { font-size: 14px; color: var(--mobile-copy); }
    #direction-search-status:empty { display: none; }
    .directions-grid { order: -2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 0; }
    .direction-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; min-height: 62px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--mobile-line); border-radius: 0; background: transparent; box-shadow: none; }
    .direction-card__name { font-size: 16px; font-weight: 500; line-height: 1.5; color: var(--mobile-ink); overflow-wrap: anywhere; }
    .direction-card__arrow { position: static; flex: none; width: 22px; height: 22px; }
    .mobile-directions-more { order: -1; }
    .mobile-list-more:not([hidden]) { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 50px; padding: 12px; margin: 18px 0 32px; border: 1px solid var(--mobile-line); border-radius: 8px; background: white; color: var(--mobile-blue); font: 600 14px var(--font-body); cursor: pointer; }
    .about__head { gap: 0; }
    .about__head h2 { font-size: 28px; margin-bottom: 16px; }
    .about__head .link-cta { display: none; }
    .about__text { font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--mobile-copy); max-width: 65ch; }
    .about__text p { margin-bottom: 12px; }
    .about__text p:nth-child(n+3) { display: none; }
    .mobile-about-link { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 700; }
    .day-hospital { background: #eaf1f8; }
    .day-hospital__grid { gap: 20px; }
    .day-hospital h2 { font-size: 28px; line-height: 1.15; }
    .day-hospital h2 br { display: none; }
    .day-hospital__text p { font-size: 16px; line-height: 1.7; max-width: 65ch; }
    .day-hospital__slogan { color: #b32620; }
    .day-hospital__photo { border-radius: 2px; max-height: 280px; width: 88%; justify-self: end; aspect-ratio: 4 / 3; object-fit: cover; }
    .day-hospital__perks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 24px auto; }
    .perk p { font-size: 13px; line-height: 1.5; }
    .perk { display: flex; align-items: center; gap: 14px; text-align: left; }
    .perk p { margin: 0; }
    .perk__icon { width: 28px; height: 28px; }
    .day-hospital__cta { width: 100%; justify-content: center; border-radius: 8px; min-height: 52px; padding-inline: 10px; font-size: 14px; }

    .specialists { background: white; }
    .specialists h2 { font-family: var(--font-body); font-size: 24px; letter-spacing: -.025em; color: #152f50; }
    .mobile-doctor-search:not([hidden]) { display: block; margin: 18px 0; }
    .mobile-doctor-search label { display: block; font-size: 14px; color: #40516a; margin-bottom: 8px; }
    .mobile-doctor-search input { display: block; width: 100%; min-width: 0; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 16px; border: 1px solid #d5dfed; border-radius: 8px; background: white; }
    .mobile-doctor-search input::placeholder { color: #627086; }
    #doctor-search-status { font-size: 14px; line-height: 1.5; color: #40516a; margin: 8px 0 0; }
    #doctor-search-status:empty { display: none; }
    .doctors-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .doctor-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 16px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--mobile-line); border-radius: 0; background: white; }
    .doctor-card__photo { border-radius: 2px; background: #eaf1f8; }
    .doctor-card__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
    .doctor-card__name { display: none; }
    .doctor-card__content { min-width: 0; }
    .doctor-card__mobile-name { display: block; font: 700 16px/1.4 var(--font-body); color: #152f50; margin: 0 0 6px; overflow-wrap: anywhere; }
    .doctor-card__bio { font-size: 14px; color: #40516a; line-height: 1.5; margin: 0 0 8px; }
    .doctor-card__links { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-start; }
    .doctor-card__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
    .doctor-card__more-desktop { display: none; }
    .doctor-card__more-mobile { display: inline; }
    .doctor-card__book { background: #edf3fc; color: #0759d3; padding: 6px 10px; border-radius: 8px; font-weight: 600; }
    .doctor-card__book-icon { width: 14px; height: 14px; }

    .section-title { padding-block: 22px; }
    .section-title__row { gap: 12px; }
    .section-title h1 { font-size: 20px; overflow-wrap: anywhere; }
    .section-title__cta { margin: 0; min-height: 44px; font-size: 13px; }
    .specialties-grid, .cards-grid { grid-template-columns: minmax(0, 1fr); }
    .specialty-hero img { height: 240px; }
    .specialty-hero__title { font-size: 20px; height: auto; min-height: 25%; padding: 12px; }
    .specialty-layout { gap: 24px; }
    .doctor-detail { gap: 24px; }
    .doctor-detail__photo { max-width: 320px; width: 100%; margin-inline: auto; }
    .doctor-detail__bio { min-width: 0; overflow-wrap: anywhere; }
    .centre-links { padding: 20px; overflow-wrap: anywhere; }
    .price-table { table-layout: fixed; }
    .price-table th, .price-table td { padding: 10px 6px; font-size: 12px; overflow-wrap: anywhere; }
    .price-table th:first-child, .price-table td:first-child { width: 27%; }
    .price-table th:last-child, .price-table td:last-child { width: 24%; }
    .price-table caption { overflow-wrap: anywhere; }
    .reviews-hero__text h1 { font-size: 28px; }
    .reviews-summary { padding: 20px; gap: 16px; }
    .reviews-summary__tagline { margin: 0; }
    .review-card { padding: 20px 16px; }
    .review-card__head { flex-wrap: wrap; gap: 12px; }
    .review-card__who { min-width: 0; overflow-wrap: anywhere; }
    .review-card__stars { flex-basis: 100%; }
    .site-footer__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-block: 18px; }
    .footer-action { display: flex; align-items: center; min-height: 44px; font-size: 13px; }
    .footer-place { padding-block: 28px; }
    .footer-place__title { font-size: 28px; }
    .footer-place__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .footer-place__col p { font-size: 13px; line-height: 1.65; }
    .footer-place__map iframe { height: 240px; }
    .site-footer__legal-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding-block: 16px; }
    .site-footer__legal-links a { min-height: 44px; display: flex; align-items: center; font-size: 13px; }
    .site-footer__legal-sep { display: none; }
    .site-footer__copy { font-size: 13px; color: var(--mobile-copy); }
    .footer-place__col h3 { color: var(--mobile-blue); }
    .mobile-actions {
        display: grid; grid-template-columns: .85fr 1.15fr; gap: 10px;
        position: fixed; z-index: 100; bottom: 0; left: 0; right: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #dfe7f2; background: #fff;
        box-shadow: 0 -4px 20px #152f5009;
    }
    .mobile-actions a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 8px; font-size: 14px; font-weight: 700; }
    .mobile-actions a img { width: 18px; height: 18px; }
    .mobile-actions__phone { color: #2159a6; background: #edf4ff; }
    .mobile-actions__book { color: white; background: var(--mobile-blue); }
    .mobile-actions__book img { filter: brightness(0) invert(1); }
    .cookie-notice { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 112px - env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); padding: 16px; gap: 12px; flex-direction: column; align-items: stretch; overflow-y: auto; }
    .cookie-notice h2 { font-size: 18px; }
    .cookie-notice p { font-size: 13px; line-height: 1.6; }
    .cookie-notice a { color: var(--mobile-blue); }
    .cookie-notice__accept { min-height: 44px; }
}

@media (min-width: 600px) and (max-width: 860px) {
    .hero-banner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; padding-block: 24px; }
    .hero-banner > img { height: 280px; width: calc(100% - 20px); margin: 0 20px 0 0; }
    .mobile-intro { padding-block: 0; }
    .mobile-intro h1 { font-size: 44px; }
    .directions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
    .doctors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
    .hero-banner > img { animation: photo-open 650ms var(--mobile-ease); }
    a, button, summary { transition: background-color 180ms ease, color 180ms ease, transform 180ms var(--mobile-ease); }
    .btn:active, .mobile-actions a:active, .mobile-list-more:active { transform: scale(.98); }
    .mobile-menu[open] .mobile-menu__panel { animation: menu-enter 260ms var(--mobile-ease); }
    @keyframes menu-enter { from { transform: translateY(-8px); clip-path: inset(0 0 12%); } to { transform: translateY(0); clip-path: inset(0); } }
    @keyframes photo-open { from { clip-path: inset(0 12% 0 0); } to { clip-path: inset(0); } }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
