/* =============================================================================
   Xnami — tablet & mobile (Figma iPhone 430)
   Header is flex in style.css; this file only adapts layout by breakpoint.
   ========================================================================== */

.tool--menu {
    display: none;
}

.mobile-menu {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 80px;
    bottom: 0;
    z-index: 99;
    flex-direction: column;
    padding: 10px 20px 40px;
    overflow: auto;
    background-color: var(--color-surface);
}

.mobile-menu__bg-logo {
    position: absolute;
    right: 19px;
    top: 321px;
    width: 327px;
    max-width: calc(100% - 39px);
    height: auto;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
}

.mobile-menu__nav,
.mobile-menu__contacts {
    position: relative;
    z-index: 1;
}

@media (max-width: 1199.98px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* --- Header (Figma mobile 70px) --------------------------------------- */

    .header {
        position: sticky;
        top: 0;
        height: 70px;
        padding: 0 20px;
        gap: 12px;
    }

    .header__logo {
        width: 92px;
        height: 44px;
    }

    .header__nav {
        order: 2;
        margin-left: auto;
        gap: 12px;
    }

    .header__nav .nav {
        display: none;
    }

    .header__nav .button--outline {
        width: 99px;
        height: 39px;
        font-size: 16px;
    }

    .header__tools {
        order: 3;
        margin-left: 0;
        gap: 12px;
    }

    .tool--menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 30px;
        height: 30px;
    }

    .tool--menu__bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: rgba(0, 0, 0, 1);
        border-radius: 1px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .header.is-menu-open .tool--menu__bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .header.is-menu-open .tool--menu__bar:nth-child(2) {
        opacity: 0;
    }

    .header.is-menu-open .tool--menu__bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-menu:not([hidden]) {
        display: flex;
    }

    .mobile-menu__nav {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-menu__nav a {
        display: block;
        padding: 18px 0;
        border-bottom: 1px solid #e8e8e8;
        color: var(--color-text);
        font-size: 25px;
        line-height: normal;
    }

    .mobile-menu__nav a:first-child,
    .mobile-menu__nav a[aria-current="page"] {
        color: var(--color-accent);
    }

    .mobile-menu__contacts {
        margin-top: auto;
        padding-top: 48px;
        color: var(--color-accent);
        font-size: 18px;
        font-weight: 500;
        line-height: 30px;
    }

    .mobile-menu__contacts p {
        margin: 0 0 20px;
    }

    .mobile-menu__contacts a {
        color: inherit;
    }

    body.is-menu-open,
    html.is-menu-open {
        overflow: hidden;
    }

    /* --- Hero ------------------------------------------------------------- */

    .hero {
        height: 668px;
    }

    .hero__image {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
    }

    .hero__content {
        gap: 48px;
        padding: 0 20px 73px;
    }

    .hero__title {
        max-width: 391px;
        font-size: 25px;
        line-height: 38px;
        white-space: normal;
    }

    /* --- About ------------------------------------------------------------ */

    .about {
        height: auto;
        margin-top: 48px;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .about__inner {
        display: flex;
        flex-direction: column;
        height: auto;
        padding-bottom: 24px;
    }

    .about__content {
        position: static;
        display: flex;
        flex-direction: column;
        flex: none;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .about__title {
        position: static;
        width: auto;
        margin: 0 0 20px;
        font-size: 25px;
        line-height: normal;
        white-space: normal;
    }

    .about__lead {
        position: static;
        width: 100%;
        margin: 0 0 40px;
        font-size: 16px;
        line-height: 29px;
        text-transform: none;
        max-width: 100%;
    }

    .about__stats {
        position: static;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        margin: 0 0 40px;
        padding-right: 0;
    }

    .stat {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        flex: 1;
        text-align: center;
    }

    .stat__value {
        font-size: 30px;
        line-height: normal;
    }

    .stat__label {
        margin-top: 8px;
        min-height: 50px;
        font-size: 16px;
        line-height: 25px;
        white-space: normal;
    }

    .about__photo {
        margin: 0;
    }

    .about__photo--tall {
        display: none;
    }

    .about__photo--wide {
        width: 100%;
    }

    /* --- Section titles --------------------------------------------------- */

    .section-title {
        font-size: 25px;
        line-height: normal;
        white-space: normal;
        padding: 0 20px;
    }

    /* --- Services --------------------------------------------------------- */

    .services {
        height: auto;
        margin-top: 56px;
        overflow-x: hidden;
        overflow-y: visible;
        padding-bottom: 24px;
    }

    .services__swoosh,
    .services__wave {
        display: none;
    }

    .services__inner {
        gap: 32px;
        padding-top: 0;
    }

    .services__title {
        margin-bottom: 8px;
        padding: 0;
    }

    .service-block,
    .service-block--symptomatic,
    .service-block--homecare,
    .service-block--consult {
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        min-height: 0;
    }

    .service-block .service {
        flex: none;
        width: 100%;
        max-width: none;
        padding-top: 0;
    }

    .service-block .service-photo,
    .service-block--symptomatic .service-photo,
    .service-block--homecare .service-photo,
    .service-block--consult .service-photo {
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: auto;
    }

    .service-block .service-photo img {
        height: auto;
        object-fit: contain;
    }

    .service__icon {
        width: 30px;
        height: 30px;
        margin-bottom: 12px;
    }

    .service__name {
        margin: 0 0 12px;
        font-size: 18px;
        white-space: normal;
    }

    .service__text {
        width: auto;
        margin: 0 0 20px;
        font-size: 16px;
        line-height: 29px;
    }

    /* --- Packages --------------------------------------------------------- */

    .packages {
        height: auto;
        margin-top: 48px;
        overflow-x: hidden;
        overflow-y: visible;
        padding-bottom: 24px;
    }

    .packages__curve {
        display: none;
    }

    .packages__inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 0 20px;
    }

    .packages__title {
        padding: 0;
        margin-bottom: 24px;
    }

    .tabs {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 52px;
        margin-top: 0;
        margin-bottom: 24px;
        border-radius: 40px;
    }

    .tab {
        height: 52px;
        font-size: 14px;
        padding: 0 8px;
    }

    .tab--active {
        width: auto;
        min-width: 0;
        flex: 1.2;
        padding: 0 12px;
    }

    .packages__panel {
        margin-top: 0;
    }

    .packages__panel:not(.packages__panel--order) {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .packages__panel:not(.packages__panel--order)::-webkit-scrollbar {
        display: none;
    }

    .packages__panel:not(.packages__panel--order) > .package {
        flex: 0 0 calc(100% / 1.7);
        width: calc(100% / 1.7);
        max-width: none;
        min-width: 0;
        min-height: 0;
        padding: 24px 20px 28px;
        scroll-snap-align: start;
    }

    .packages__panel--order {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .package-order {
        padding: 20px 16px;
        min-height: 0;
    }

    .package-order__title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .package-order__box {
        flex-direction: column;
        gap: 16px;
        padding: 12px;
    }

    .package-order__services {
        padding-right: 0;
        border-right: 0;
        gap: 8px;
    }

    .package-order__row {
        grid-template-columns: 19px minmax(0, 1fr);
        gap: 10px 12px;
        min-height: 0;
        padding: 8px 0;
        border-bottom: 1px solid #e8e8e8;
    }

    .package-order__price {
        grid-column: 2;
    }

    .package-order__meta {
        width: 100%;
        padding-top: 0;
    }

    .package-order__footer {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
        margin-top: 16px;
    }

    .package-order__total {
        font-size: 22px;
    }

    .package-order__cta {
        width: 100%;
        max-width: 154px;
    }

    .package__name {
        font-size: 25px;
        line-height: normal;
    }

    .package__features li {
        white-space: normal;
    }

    /* --- Team ------------------------------------------------------------- */

    .team {
        margin-top: 15px;
        overflow: visible;
    }

    .team__inner {
        display: flex;
        flex-wrap: wrap;
        gap: 24px 16px;
        height: auto;
        padding-bottom: 24px;
        margin-top: 45px;
    }

    .team__title {
        padding: 0;
        margin-bottom: 8px;
    }

    .member,
    a.member {
        flex: 1 1 calc((100% - 16px) / 2);
        width: calc((100% - 16px) / 2);
        min-width: 0;
    }

    .member__photo {
        height: auto;
        aspect-ratio: 1;
    }

    .member__name {
        margin: 12px 0 4px;
        font-size: 14px;
        white-space: normal;
    }

    .member__role {
        margin: 0;
        font-size: 12px;
        white-space: normal;
    }

    /* --- Reviews ---------------------------------------------------------- */

    .reviews {
        margin-top: 56px;
    }

    .reviews__inner {
        display: flex;
        flex-direction: column;
        height: auto;
        padding-bottom: 24px;
    }

    .reviews__title {
        padding: 0;
        margin-bottom: 16px;
    }

    .reviews__controls {
        position: static;
        align-self: flex-end;
        margin-bottom: 16px;
        top: auto;
        right: auto;
    }

    .rev-nav {
        width: 40px;
        height: 40px;
    }

    .reviews__viewport {
        position: relative;
        left: auto;
        top: auto;
        height: 267px;
        margin-top: 0;
        width: 100%;
    }

    .reviews__list {
        width: 100%;
        gap: 17px;
    }

    .review {
        flex: 0 0 calc((100% - 17px) / 2);
        width: calc((100% - 17px) / 2);
        max-width: none;
    }

    .review__text {
        width: auto;
        right: 15px;
    }

    /* --- Consult: tablet keeps web composition (see 768–1199 block) -------- */

    /* --- News ------------------------------------------------------------- */

    .news {
        margin-top: 48px;
    }

    .news__inner {
        display: flex;
        flex-wrap: wrap;
        gap: 32px 16px;
        height: auto;
        margin-top: 0;
        padding-bottom: 24px;
    }

    .news__title {
        padding: 0;
        margin-bottom: 60px;
    }

    .news-card {
        flex: 1 1 calc((100% - 16px) / 2);
        width: calc((100% - 16px) / 2);
        max-width: none;
    }

    .news-card__photo {
        width: 100%;
        height: auto;
        aspect-ratio: 463 / 313;
    }

    .news-card__name {
        white-space: normal;
        font-size: 20px;
    }

    .news-card__excerpt br {
        display: none;
    }

    /* --- Footer ----------------------------------------------------------- */

    .footer {
        height: auto;
        margin-top: 56px;
        padding: 40px 0 32px;
    }

    .footer__inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        gap: 28px;
    }

    .footer__main {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 28px 24px;
    }

    .footer__brand {
        flex: 1 1 calc((100% - 24px) / 2);
        width: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
        min-width: 0;
    }

    .footer__logo {
        width: 180px;
    }

    .social {
        margin-top: 20px;
    }

    .footer__address {
        max-width: 100%;
        margin-top: 16px;
    }

    .footer__nav {
        display: flex;
        flex: 1 1 calc((100% - 24px) / 2);
        flex-direction: column;
        width: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
        min-width: 0;
        padding-top: 0;
        gap: 12px;
        line-height: 1.4;
    }

    .footer__nav--2 {
        padding-top: 0;
    }

    .footer__rule {
        width: 100%;
        margin: 0;
        border-top-color: rgba(255, 255, 255, 0.35);
    }

    .footer__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 0;
    }

    .footer__copy,
    .footer__credit {
        white-space: normal;
    }

    .footer__copy img {
        left: 0;
        top: 4px;
    }

    /* --- Inner pages ------------------------------------------------------ */

    .page-head {
        padding: 0 20px;
    }

    .page-head__title {
        font-size: 25px;
    }

    .page-banner {
        max-height: 220px;
        margin-top: 16px;
    }

    .page-content.editor {
        padding: 24px 0 24px;
    }

    .page-files {
        padding-bottom: 40px;
    }

    .about-page__top {
        margin-top: 16px;
    }

    .about-page {
        padding-bottom: 10px;
    }

    .about--page {
        margin-top: 24px;
    }

    .about-page__content.editor {
        margin-top: 32px;
        line-height: 29px;
    }

    .about-page__content.editor h2 {
        margin: 28px 0 12px;
        font-size: 18px;
        line-height: 29px;
    }

    .about-page__content.editor h2:first-child {
        margin-top: 0;
    }

    .about-page__content.editor li {
        line-height: 29px;
    }

    .about-media {
        margin-top: 40px;
    }

    .about-media__title {
        margin-bottom: 20px;
        font-size: 18px;
    }

    .about-media__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .about-media__count {
        font-size: 28px;
    }

    .about-page .packages--page {
        margin-top: 48px;
    }

    .service-detail__top {
        margin-top: 16px;
    }

    .service-detail__hero {
        height: auto;
        aspect-ratio: 1440 / 480;
        margin-top: 24px;
    }

    .service-detail__title {
        margin: 24px 0 24px;
        font-size: 25px;
    }

    .service-detail__layout {
        flex-direction: column;
        gap: 32px;
    }

    .service-detail__content {
        max-width: none;
    }

    .service-detail__content.editor h2 {
        margin: 20px 0;
        font-size: 18px;
        line-height: 29px;
    }

    .service-detail__content.editor ul {
        gap: 16px;
        margin-bottom: 20px;
        padding-left: 20px;
    }

    .service-detail__aside {
        width: 100%;
        max-width: 377px;
    }

    .service-detail__form.consult__panel {
        width: 100%;
        max-width: 100%;
        max-height: none;
        flex: none;
        overflow: visible;
    }

    .service-detail__form .consult__form {
        padding: 24px 20px;
    }

    .service-detail__form .consult__heading {
        margin-bottom: 16px;
        text-align: left;
    }

    .service-detail + .packages--page {
        margin-top: 48px;
    }

    .service-detail__gallery {
        display: grid;
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: calc((100vw - (2 * var(--gallery-pad, 20px)) - var(--gallery-gap, 12px)) / 2);
        column-gap: var(--gallery-gap, 12px);
        row-gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        scrollbar-width: none;
    }

    .service-detail__gallery::-webkit-scrollbar {
        display: none;
    }

    .service-detail__gallery > li:not(.service-detail__extra) {
        width: 100%;
        height: auto;
        aspect-ratio: 345 / 233;
        scroll-snap-align: none;
    }

    .service-detail__gallery > li:not(.service-detail__extra):nth-child(4n + 1) {
        scroll-snap-align: start;
    }

    .service-detail {
        --gallery-pad: 20px;
        --gallery-gap: 12px;
    }

    .partners {
        margin-top: 48px;
    }

    .partners__title {
        margin-bottom: 24px;
        font-size: 25px;
        text-align: left;
    }

    .partners__list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .partners__list::-webkit-scrollbar {
        display: none;
    }

    .partners__item {
        flex: 0 0 calc(100% / 2.8);
        width: calc(100% / 2.8);
        max-width: none;
        min-width: 0;
        height: 140px;
        padding: 0;
        scroll-snap-align: start;
    }

    .partners__dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin-top: 20px;
        height: 11px;
    }

    .partners__dots[hidden] {
        display: none;
    }

    .partners__dot {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 11px;
        height: 11px;
        padding: 0;
        border: 1px solid var(--color-accent);
        border-radius: 50%;
        background-color: transparent;
        box-sizing: border-box;
        cursor: pointer;
    }

    .partners__dot::after {
        content: '';
        display: block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: transparent;
    }

    .partners__dot.is-active::after {
        background-color: var(--color-accent);
    }

    .news__grid,
    .reviews__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .reviews--page {
        margin-top: 32px;
    }

    .reviews__grid {
        padding-bottom: 48px;
    }

    .review--page {
        width: 100%;
        height: auto;
        min-height: 252px;
    }

    .faq__panel {
        padding: 24px 16px 28px;
    }

    .faq__title {
        margin-bottom: 24px;
        font-size: 25px;
    }

    .faq__grid {
        flex-direction: column;
        gap: 12px;
    }

    .faq__col {
        gap: 12px;
    }

    .faq + .packages--page {
        margin-top: 48px;
    }

    .contact-page {
        flex-direction: column;
        gap: 40px;
        margin-top: 40px;
        padding-bottom: 48px;
    }

    .contact-page__info {
        width: 100%;
        gap: 28px;
    }

    .contact-page__row {
        font-size: 18px;
        line-height: 1.4;
    }

    .contact-page__icon {
        width: 44px;
        height: 44px;
    }

    .contact-page__icon img {
        width: 22px;
    }

    .contact-page__social-link {
        width: 48px;
        height: 48px;
    }

    .contact-page__form.consult__panel {
        width: 100%;
    }

    .contact-map__iframe {
        height: 250px;
    }

    .news-detail__cover {
        float: none;
        width: 100%;
        height: auto;
        margin: 0 0 20px;
        aspect-ratio: 746 / 505;
    }

    .news-detail__gallery {
        display: grid;
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: calc((100vw - (2 * var(--gallery-pad, 20px)) - var(--gallery-gap, 12px)) / 2);
        column-gap: var(--gallery-gap, 12px);
        row-gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        scrollbar-width: none;
    }

    .news-detail__gallery::-webkit-scrollbar {
        display: none;
    }

    .news-detail__gallery > li:not(.news-detail__extra) {
        width: 100%;
        height: auto;
        aspect-ratio: 345 / 233;
        scroll-snap-align: none;
    }

    .news-detail__gallery > li:not(.news-detail__extra):nth-child(4n + 1) {
        scroll-snap-align: start;
    }

    .news-detail {
        --gallery-pad: 20px;
        --gallery-gap: 12px;
    }

    .news-detail + .packages--page {
        margin-top: 48px;
    }

    .settings {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 33px;
        padding-bottom: 24px;
    }

    .settings-nav-toggle {
        display: flex;
        margin-bottom: 33px;
    }

    .settings-nav {
        display: none;
        width: 308px;
        max-width: calc(100% - 40px);
        margin: 0;
    }

    .settings-forms {
        width: 100%;
        max-width: none;
    }

    .settings.is-nav-open .settings-nav-toggle {
        visibility: hidden;
    }

    .settings.is-nav-open .settings-nav-backdrop {
        display: block;
    }

    .settings.is-nav-open .settings-nav-close {
        display: flex;
        position: fixed;
        top: 56px;
        left: calc(50% + 122px);
        right: auto;
        z-index: 112;
    }

    .settings.is-nav-open .settings-nav {
        display: flex;
        position: fixed;
        left: 50%;
        top: 122px;
        z-index: 111;
        transform: translateX(-50%);
    }

    body.is-settings-nav-open,
    html.is-settings-nav-open {
        overflow: hidden;
    }

    .orders {
        gap: 0;
    }

    .orders-main {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 42px;
        width: 100%;
        height: fit-content;
    }

    .payments-list {
        width: 100%;
        gap: 42px;
    }

    .payments-entry {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 42px;
        width: 100%;
    }

    .payments-entry__side {
        flex: 0 0 auto;
        width: 503px;
        max-width: 100%;
        height: auto;
        min-height: 0;
    }

    .payments-entry__side:has(.package--orders) {
        width: 369px;
        padding: 26px 24px 20px;
    }

    .package--orders {
        flex: 0 0 auto;
        width: 369px;
        max-width: 100%;
        margin: 0;
        padding: 26px 24px 30px;
        height: fit-content;
    }

    .orders-services {
        flex: 0 0 auto;
        width: 503px;
        max-width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 15px 16px 24px;
    }

    .orders-services__title {
        margin-bottom: 20px;
        font-size: 18px;
    }

    .orders-services__table {
        grid-template-columns: minmax(0, 1fr) 70px 40px;
    }

    .orders-services__head > span:first-child {
        padding-left: 36px;
    }

    .orders-panel {
        flex: 1 1 320px;
        width: auto;
        min-width: 0;
        max-width: 100%;
        padding: 42px 15px 36px;
        height: fit-content;
    }

    .orders-form__submit {
        width: min(248px, 100%);
    }

    .orders-form__pay {
        width: min(218px, 100%);
    }

    .orders-form__actions {
        gap: 12px;
    }

    .orders-dates {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* Tablet: slightly roomier than phone, still single-column home sections */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .container {
        padding-left: 40px;
        padding-right: 40px;
    }

    .header {
        padding: 0 40px;
    }

    .hero__content {
        padding-left: 40px;
        padding-right: 40px;
    }

    .hero__title {
        font-size: 32px;
        line-height: 42px;
        max-width: 560px;
    }

    .section-title {
        padding: 0 40px;
        font-size: 32px;
    }

    .packages__inner,
    .page-head {
        padding-left: 40px;
        padding-right: 40px;
    }

    .team__inner {
        gap: 24px 16px;
    }

    .member,
    a.member {
        flex: 1 1 calc((100% - 32px) / 3);
        width: calc((100% - 32px) / 3);
    }

    .service-block--symptomatic,
    .service-block--consult {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .service-block--homecare {
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 24px;
    }

    .service-block .service {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .service-block .service-photo,
    .service-block--symptomatic .service-photo,
    .service-block--homecare .service-photo,
    .service-block--consult .service-photo {
        flex: 0 1 36%;
        width: 36%;
        max-width: 280px;
        height: auto;
        aspect-ratio: auto;
    }

    .service-block .service-photo img {
        height: auto;
        object-fit: contain;
    }

    .news__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
        padding-bottom: 64px;
    }

    .review--page {
        height: auto;
        min-height: 240px;
    }

    .faq__grid {
        flex-direction: row;
        gap: 18px;
    }

    .footer__inner {
        padding-left: 40px;
        padding-right: 40px;
    }

    /* Consult: web layout, respects container padding on both sides */
    .consult {
        height: auto;
        min-height: 626px;
        margin-top: 64px;
        overflow: hidden;
    }

    .consult__photo {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .consult__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 626px;
        padding-top: 19px;
        padding-bottom: 19px;
        position: relative;
        z-index: 1;
        box-sizing: border-box;
    }

    .consult__logo {
        position: static;
        flex: 0 1 320px;
        width: 320px;
        max-width: 42%;
        height: auto;
        object-fit: contain;
    }

    .consult__panel {
        position: static;
        flex: 0 1 537px;
        width: 100%;
        max-width: min(537px, 52%);
        height: auto;
        max-height: 588px;
        overflow: auto;
        margin-left: auto;
    }

    .service-detail__form.consult__panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        max-height: none;
        overflow: visible;
        margin-left: 0;
    }

    .consult__form {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        padding: 28px 24px 24px;
    }

    .consult__heading {
        position: static;
        margin: 0 0 16px;
        white-space: normal;
    }

    .field {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: 44px;
        margin-bottom: 10px;
    }

    .field:nth-of-type(n) {
        top: auto;
        height: 44px;
    }

    .field--area {
        height: 103px;
    }

    .field__hint {
        left: 16px;
        top: 14px;
        white-space: normal;
    }

    .field--area .field__hint {
        top: 21px;
    }

    .consult__submit {
        position: static;
        margin-top: 8px;
    }
}

/* Desktop keeps hamburger hidden */
@media (min-width: 1200px) {
    .tool--menu,
    .mobile-menu {
        display: none !important;
    }
}

/* Mid desktop: flex header breathes without forcing 1920px canvas */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .header {
        padding: 0 40px;
        gap: 16px;
    }

    .nav {
        gap: 16px;
    }

    .header__tools {
        gap: 12px;
    }

    .hero__content {
        padding-left: 40px;
        padding-right: 40px;
    }

    .hero__title {
        font-size: 48px;
        line-height: 58px;
    }

    .container {
        width: min(var(--container-width), calc(100% - 80px));
    }

    .orders {
        gap: 24px;
    }

    .orders-main {
        gap: 24px;
        height: fit-content;
    }

    .payments-entry {
        gap: 24px;
    }

    .orders-panel {
        flex: 1 1 420px;
        width: auto;
        min-width: 0;
    }
}

@media (min-width: 1600px) {
    html,
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 950px) {
    .payments-entry {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .settings > .reports__list,
    .reports-profile__list {
        max-width: none;
        gap: 20px;
    }

    .reports-profile__toggle {
        padding: 16px 14px;
    }

    .reports-profile__body {
        padding: 0 14px 14px;
    }

    .reports-profile__media {
        gap: 8px;
    }

    .reports-profile__thumb,
    .reports-profile__file {
        width: 66px;
        height: 58px;
    }

    .reports-profile__file img {
        width: 45px;
        height: 46px;
    }

    .login {
        max-width: none;
        margin-top: 16px;
        padding-bottom: 48px;
        align-items: stretch;
    }

    .login__lead {
        margin-bottom: 40px;
        font-size: 20px;
        line-height: 33px;
        letter-spacing: 0.6px;
    }

    .login-form {
        width: 100%;
    }

    .login-meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        margin: 10px 0 34px;
    }

    .login-forgot {
        align-self: center;
    }

    .login--register {
        margin-top: 40px;
    }

    .register-phone {
        gap: 16px;
    }

    .register-phone__field {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .register-sms {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
        padding: 0 8px;
        text-align: center;
    }

    .register-phone__code {
        flex: 1 1 0;
    }
}

/* Phone: team slider shows 2 columns × 2 rows per view */
@media (max-width: 767.98px) {
    .header {
        position: sticky;
        top: 0;
        height: 70px;
        padding: 0 20px;
        gap: 7px;
    }

    .header__nav .button--outline {
        width: 85px;
        height: 35px;
        font-size: 16px;
    }

    .header__nav {
        order: 2;
        margin-left: auto;
    }

    .header__tools {
        order: 3;
        margin-left: 0;
        gap: 6px;
    }

    .partners__item {
        flex: 0 0 calc(100% / 2.4);
        width: calc(100% / 2.4);
        height: 121px;
        padding: 0;
    }

    .partners__item img {
        width: 100%;
        height: 100%;
        max-height: 100%;
    }

    .about-media__count {
        font-size: 24px;
    }

    .news__inner {
        flex-direction: column;
        gap: 32px;
    }

    .news__inner > .news-card {
        flex: 1 1 100%;
        width: 100%;
    }

    .packages__panel:not(.packages__panel--order) > .package {
        flex: 0 0 calc(100% / 1.1);
        width: calc(100% / 1.1);
    }

    .package-order__title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .footer__main {
        flex-direction: column;
        gap: 28px;
    }

    .footer__brand,
    .footer__nav {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    /* Consult: Figma mobile — form card keeps container padding on both sides */
    .consult {
        height: 669px;
        margin-top: 48px;
        padding: 0;
        overflow: hidden;
    }

    .consult__photo {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .consult__inner {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 669px;
        padding-top: 31px;
        padding-bottom: 30px;
        position: relative;
        z-index: 1;
        box-sizing: border-box;
    }

    .consult__logo {
        display: none;
    }

    .consult__panel {
        position: static;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 555px;
        overflow: auto;
    }

    .service-detail__form.consult__panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .service-detail__aside {
        max-width: none;
    }

    .service-detail__contacts {
        padding: 18px 16px;
    }

    .service-detail__hero {
        margin-top: 16px;
        border-radius: 8px;
    }

    .consult__form {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        padding: 27px 20px 24px;
    }

    .consult__heading {
        position: static;
        margin: 0 0 20px;
        white-space: normal;
        text-align: center;
    }

    .field {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: 44px;
        margin-bottom: 11px;
    }

    .field:nth-of-type(n) {
        top: auto;
        height: 44px;
    }

    .field--area {
        height: 103px;
    }

    .field__hint {
        left: 16px;
        top: 14px;
        white-space: normal;
    }

    .field--area .field__hint {
        top: 21px;
    }

    .consult__submit {
        position: static;
        margin-top: 12px;
    }

    .review {
        flex: 0 0 calc(100% / 1.3);
        width: calc(100% / 1.3);
    }

    /* Team: Figma mobile — 2×2 pages, horizontal slider */
    .team {
        --team-pad: 20px;
        --team-gap: 16px;
        padding-left: var(--team-pad);
        padding-right: var(--team-pad);
    }

    .team__inner {
        display: grid;
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: calc((100vw - (2 * var(--team-pad)) - var(--team-gap)) / 2);
        column-gap: var(--team-gap);
        row-gap: 24px;
        width: 100%;
        max-width: 100%;
        margin-top: 32px;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .team__inner::-webkit-scrollbar {
        display: none;
    }

    .team__inner > .member,
    .team__inner > a.member {
        display: flex;
        flex-direction: column;
        flex: none;
        width: 100%;
        max-width: none;
        min-width: 0;
        scroll-snap-align: none;
    }

    .team__inner > .member:nth-child(4n + 1) {
        scroll-snap-align: start;
    }

    .member-detail__photo {
        float: none;
        width: 100%;
        height: auto;
        margin: 0 0 20px;
        aspect-ratio: 1;
    }

    .member-detail__name {
        font-size: 28px;
    }

    .member-detail {
        --gallery-pad: 20px;
        --gallery-gap: 12px;
    }

    .member-detail__gallery {
        display: grid;
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        grid-auto-columns: calc((100vw - (2 * var(--gallery-pad)) - var(--gallery-gap)) / 2);
        column-gap: var(--gallery-gap);
        row-gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        scrollbar-width: none;
    }

    .member-detail__gallery::-webkit-scrollbar {
        display: none;
    }

    .member-detail__gallery > li:not(.member-detail__extra) {
        width: 100%;
        height: auto;
        aspect-ratio: 345 / 233;
        scroll-snap-align: none;
    }

    .member-detail__gallery > li:not(.member-detail__extra):nth-child(4n + 1) {
        scroll-snap-align: start;
    }

    /* Reviews page — Figma mobile 430 (node 202:4186) */
    .reviews--page {
        margin-top: 45px;
    }

    .reviews__grid {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-bottom: 40px;
    }

    .review--page {
        width: 100%;
        height: auto;
        padding: 15px 13.5px 15px 16px;
    }

    .review--page .review__text {
        max-height: 173px;
        -webkit-line-clamp: 6;
    }

    .review--page .review__stars {
        width: auto;
        height: 15px;
        margin-top: 9px;
    }

    .review--page .review__meta {
        gap: 16px;
        margin-top: 24px;
    }

    .review--page .review__avatar {
        width: 65px;
        height: 65px;
    }

    .review--page .review__author {
        width: 119px;
        font-size: 20px;
        line-height: 24px;
    }

    .work {
        padding-bottom: 48px;
    }

    .work__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .work-card {
        min-height: 0;
    }

    .work-card__title {
        font-size: 20px;
    }

    .work-detail {
        margin-top: 24px;
        padding-bottom: 48px;
    }

    .work-detail__title {
        font-size: 28px;
    }

    .work-detail__body {
        margin-top: 32px;
    }

    .work-detail__body h2 {
        font-size: 20px;
    }

    .work-detail__contacts {
        margin-top: 28px;
        align-items: stretch;
        width: 100%;
    }

    .work-detail__contacts a {
        font-size: 18px;
        line-height: 1.4;
        white-space: normal;
    }

    .work-detail__icon {
        width: 44px;
        height: 44px;
    }

    .work-detail__icon img {
        width: 22px;
    }
}

@media (max-width: 575px) {
    .orders-main {
        flex-direction: column;
        align-items: stretch;
        gap: 42px;
        width: 100%;
        height: fit-content;
    }

    .package--orders,
    .orders-services,
    .orders-panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        height: fit-content;
    }

    .package--orders {
        max-width: 369px;
        margin: 0 auto;
    }

    .orders-services {
        max-width: 391px;
        margin: 0 auto;
        height: auto;
    }

    .payments-entry {
        flex-direction: column;
        align-items: stretch;
        gap: 42px;
    }

    .payments-entry__side {
        width: 100%;
        max-width: 391px;
        margin: 0 auto;
        align-items: flex-start;
        height: auto;
        min-height: 0;
        padding: 15px 16px 20px;
    }

    .payments-entry__side:has(.package--orders) {
        max-width: 369px;
        padding: 26px 24px 20px;
    }

    .payments-date {
        margin-left: 0;
    }
}
