/* Мобильная версия по макету «Главная страница | Моб (375)».
   Подключается после style.css: правила здесь перекрывают десктопные и
   старые планшетные. Тексты, которые в мобильном макете короче, лежат
   в разметке парой .d-only / .m-only. */

.m-only {
  display: none;
}

.certs__dots {
  display: none;
}

.m-icon,
.result-m,
.booking__who {
  display: none;
}

@media (max-width: 640px) {
  .d-only {
    display: none;
  }

  .m-only {
    display: inline;
  }

  .d-icon {
    display: none;
  }

  .m-icon {
    display: block;
  }

  /* ---------- 02. Первый экран ---------- */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    min-height: 0;
    padding: 24px 16px 32px;
    background: var(--bg-hero);
  }

  .hero__content {
    display: contents;
  }

  .hero__tags {
    order: 1;
    margin: 0;
  }

  .hero__tags span {
    padding: 6px 12px;
  }

  .hero__tags span:not(:last-child) {
    display: none;
  }

  .hero__title {
    order: 2;
    font-size: 44px;
    line-height: 1;
  }

  .hero__title span {
    display: block;
  }

  .hero__subtitle {
    order: 3;
    margin: 0;
    font-size: 18px;
  }

  .hero__text {
    order: 4;
    max-width: none;
    margin: 0;
  }

  .hero__photo {
    order: 5;
    position: relative;
    flex: none;
    width: 100%;
    height: 300px;
    border-radius: 20px;
    background: var(--bg-hero);
  }

  .hero__photo img {
    position: absolute;
    left: 50%;
    top: -6px;
    width: 279px;
    height: 367px;
    transform: translateX(-50%);
    object-fit: cover;
    object-position: 50% 0;
  }

  .hero__content .btn {
    order: 6;
    width: 100%;
    margin-top: -20px;
    padding: 18px 24px;
  }

  /* ---------- 03. Я буду рядом ---------- */
  .requests {
    padding: 56px 16px;
    border-radius: 32px 32px 0 0;
  }

  .requests__title {
    max-width: none;
    font-size: 32px;
  }

  .requests__grid {
    margin-top: 35px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .request-card {
    height: auto;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
  }

  .request-card__icon,
  .request-card__body {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
  }

  .request-card__body {
    gap: 10px;
  }

  .request-card h3 {
    font-size: 18px;
  }

  .request-card p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
  }

  /* ---------- 05. О докторе ---------- */
  .about {
    padding: 56px 16px 0;
  }

  .about__top {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .about__intro h2 {
    font-size: 36px;
    white-space: normal;
  }

  .about__intro p {
    max-width: none;
    margin-top: 30px;
  }

  .about__stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
  }

  .stat {
    min-height: 0;
    padding-left: 0;
    border-left: 0;
  }

  .stat__value {
    font-size: 48px;
  }

  .stat__count {
    min-width: 0;
  }

  .stat__plus {
    height: auto;
    margin-top: 0;
    font-size: 48px;
    line-height: 1;
  }

  .stat__label {
    margin-top: 5px;
    font-size: 13px;
  }

  .stat__desc {
    max-width: none;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
  }

  .about__bottom {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
  }

  .about__video {
    width: 100%;
    height: 220px;
    flex-direction: column-reverse;
    gap: 12px;
  }

  .about__video::after {
    background: rgba(0, 0, 0, 0.25);
  }

  .about__video-label {
    font-weight: 400;
    font-size: 16px;
  }

  .about__play,
  .about__play img {
    width: 56px;
    height: 56px;
  }

  .education h3 {
    font-size: 24px;
    line-height: normal;
  }

  /* Образование — вертикальная лента: кольцо, линия до следующего пункта,
     последний пункт закрашен и без линии. */
  .edu-row,
  .edu-row:first-of-type,
  .edu-row:last-of-type {
    position: relative;
    display: block;
    padding: 0 0 28px 30px;
    border: 0;
  }

  .edu-row:first-of-type {
    margin-top: 30px;
  }

  .edu-row:last-of-type {
    padding-bottom: 0;
  }

  .edu-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: 2px solid var(--green);
    border-radius: 50%;
    background: var(--bg);
  }

  .edu-row:last-of-type::before {
    background: var(--green);
  }

  .edu-row:not(:last-of-type)::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 15px;
    bottom: 0;
    width: 2px;
    background: var(--line);
  }

  .edu-row__years {
    display: block;
    font-weight: 500;
    line-height: 1;
  }

  .edu-row__info,
  .edu-row--narrow .edu-row__info {
    max-width: none;
    margin-top: 6px;
  }

  .edu-row__title {
    font-weight: 600;
    font-size: 18px;
    line-height: 1.1;
  }

  .edu-row__text {
    margin-top: 6px;
    font-size: 14px;
  }

  .education__note {
    display: none;
  }

  /* Сертификаты — карусель: активный 240×171 по центру, соседи
     уменьшены до 158×118 и приглушены, снизу точки. */
  .certs {
    display: flex;
    gap: 0;
    padding: 38px calc(50% - 120px) 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .certs::-webkit-scrollbar {
    display: none;
  }

  .cert {
    flex: 0 0 240px;
    margin: 0 -15px;
    scroll-snap-align: center;
    opacity: 0.75;
    transform: scale(0.66);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .cert.is-active {
    opacity: 1;
    transform: none;
    position: relative;
    z-index: 1;
  }

  .cert__preview {
    height: 171px;
    border: 1px solid #e2e8e3;
    border-radius: 12px;
    background: #f1f1f1;
    box-shadow: none;
  }

  .cert.is-active .cert__preview {
    box-shadow: 0 12px 28px rgba(33, 66, 46, 0.12);
  }

  .cert__title,
  .cert__text {
    display: none;
  }

  .certs__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 24px 0 56px;
  }

  .certs__dots span {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: #c9cfc9;
    transition: width 0.25s ease, background-color 0.25s ease;
  }

  .certs__dots span.is-active {
    width: 18px;
    background: var(--green);
  }

  /* ---------- 04. Стоимость ---------- */
  .pricing {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 24px 16px 56px;
  }

  .pricing__main {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 20px;
  }

  .pricing__main h2 {
    font-size: 32px;
    line-height: 1.05;
  }

  .pricing__cols {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
  }

  /* Название тарифа и цена в одну строку. */
  .price-item {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: baseline;
  }

  .price-item + .price-item {
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  .price-item__time {
    grid-column: 1 / -1;
    line-height: 1.5;
  }

  .price-item h3,
  .price-item__sum {
    margin: 0;
    font-size: 24px;
    line-height: normal;
  }

  .price-item__sum {
    grid-column: 2;
    grid-row: 2;
  }

  .price-item ul {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
  }

  .pricing__featured {
    min-height: 0;
    padding: 25px 20px;
    border-radius: 20px;
  }

  .pricing__featured-time {
    line-height: 1.5;
  }

  .pricing__featured h3 {
    font-size: 24px;
    line-height: normal;
  }

  .pricing__featured-text {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .pricing__featured-price {
    margin: 10px 0 50px;
    line-height: 26px;
  }

  .pricing__featured .btn {
    padding: 18px 24px;
  }

  /* ---------- 08. Мой подход ---------- */
  .approach__body {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 47px 16px 56px;
  }

  .approach__content {
    order: 1;
  }

  .approach__photo {
    order: 2;
    width: 100%;
    max-width: none;
    height: 440px;
    border-radius: 20px;
  }

  .approach__photo > img {
    left: -33.87%;
    top: -9.44%;
    width: 167.91%;
    height: 109.44%;
  }

  .approach__card {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    gap: 20px;
  }

  .approach__card p {
    font-size: 16px;
    line-height: 1.2;
  }

  .approach__card .btn {
    width: 100%;
    height: 50px;
    padding: 0 24px;
  }

  .approach__lead {
    font-weight: 600;
    font-size: 18px;
    line-height: 1.1;
  }

  .approach__lead br {
    display: none;
  }

  .approach__points {
    margin-top: 35px;
    gap: 32px;
  }

  .point {
    gap: 14px;
  }

  .point__icon {
    width: 45px;
    height: 45px;
  }

  .point p {
    font-size: 14px;
    line-height: 1.5;
  }

  /* ---------- 09. Отзывы ---------- */
  .reviews {
    padding: 56px 0;
  }

  .reviews__head {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
  }

  .reviews__intro h2 {
    font-size: 32px;
    line-height: 1.05;
  }

  .reviews__intro p {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
  }

  .reviews__score {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 16px;
    min-height: 0;
    margin: 0;
    padding: 16px;
    border: 0;
    border-radius: 20px;
    background: #f1f1f1;
  }

  .reviews__score-top {
    grid-row: 1 / 3;
    gap: 4px;
  }

  .reviews__score-num {
    font-size: 48px;
  }

  .reviews__score-top img {
    width: 18px;
    height: 18px;
  }

  .reviews__score-label {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-mid);
  }

  .reviews__badges {
    margin-top: 8px;
    gap: 8px;
  }

  .reviews__badges span {
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--bg);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
  }

  /* Лента и стрелки под ней справа. */
  .reviews__slider {
    display: grid;
    grid-template-columns: 1fr 40px 40px;
    column-gap: 8px;
    row-gap: 15px;
    margin-top: 20px;
    padding: 0 16px;
  }

  .reviews__viewport {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 -16px;
  }

  .reviews__track {
    gap: 12px;
    padding: 0 16px 16px;
  }

  .review-card {
    flex: 0 0 300px;
    min-height: 0;
    height: 214px;
    padding: 20px;
    display: grid;
    grid-template-columns: 40px 1fr;
    align-content: start;
    column-gap: 12px;
    row-gap: 4px;
  }

  .review-card__author {
    display: contents;
  }

  .review-card__author img {
    grid-row: 1 / 3;
    width: 40px;
    height: 40px;
    align-self: center;
  }

  .review-card__author span {
    align-self: end;
    font-size: 16px;
    line-height: 1;
  }

  .review-card__meta {
    grid-column: 2;
    gap: 8px;
  }

  .review-card__meta img {
    width: 76px;
    height: 12px;
  }

  .review-card__text {
    grid-column: 1 / -1;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
  }

  .reviews__nav {
    position: static;
    grid-row: 2;
    width: 40px;
    height: 40px;
    border-radius: 20px;
  }

  .reviews__nav--prev {
    grid-column: 2;
  }

  .reviews__nav--next {
    grid-column: 3;
  }

  .reviews__nav img {
    width: 16px;
    height: 16px;
  }

  /* ---------- 10. FAQ (главная) ---------- */
  .faq:not(.ph-faq) {
    gap: 36px;
    padding: 50px 16px 25px;
  }

  .faq:not(.ph-faq) h2 {
    font-size: 32px;
  }

  .faq:not(.ph-faq) .faq-item {
    padding: 18px 20px;
    border-radius: 15px;
  }

  .faq:not(.ph-faq) .faq-item__q {
    flex-basis: auto;
    height: auto;
    min-height: 24px;
    gap: 12px;
  }

  .faq:not(.ph-faq) .faq-item__q span:first-child {
    font-size: 16px;
    line-height: 1.1;
  }

  .faq:not(.ph-faq) .faq-item__toggle,
  .faq:not(.ph-faq) .faq-item__q img {
    width: 24px;
    height: 24px;
  }

  .faq:not(.ph-faq) .faq-item__a-inner > :first-child {
    padding-top: 12px;
  }

  .faq:not(.ph-faq) .faq-item__a p {
    font-size: 14px;
    line-height: 1.5;
  }

  /* ---------- 11. Контакты ---------- */
  .contacts {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 56px 16px;
  }

  .badge-card {
    width: 100%;
    height: auto;
    padding: 28px 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .badge-card img {
    width: 96px;
    height: 96px;
    margin: 0;
  }

  .badge-card h2 {
    margin: 0;
    font-size: 22px;
    line-height: normal;
  }

  .badge-card h2 br {
    display: none;
  }

  .badge-card__role,
  .badge-card__degree {
    font-weight: 500;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 1.92px;
  }

  .badge-card__role {
    margin-top: -1px;
  }

  .badge-card__degree {
    margin-top: -8px;
    color: var(--green);
  }

  .contacts__form-wrap h2 {
    font-size: 32px;
  }

  .contacts__lead {
    margin-top: 16px;
  }

  .contacts .form {
    margin-top: 16px;
  }

  .form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .field,
  .phone-field {
    height: 55px;
    padding: 0 20px;
  }

  .field--area {
    height: 120px;
    margin-top: 16px;
    padding-top: 18px;
  }

  .check {
    margin-top: 16px;
  }

  .check__text {
    font-size: 13px;
    line-height: 1.5;
  }

  .form .btn {
    width: 100%;
    margin-top: 16px;
    padding: 18px 24px;
  }

  /* ---------- 12. Подвал ---------- */
  .footer__top {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 48px 16px 0;
  }

  .footer__brand {
    order: 1;
  }

  .footer__contacts {
    order: 2;
    width: 100%;
  }

  .footer__menus {
    order: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    width: 100%;
  }

  .footer__person {
    align-items: center;
    gap: 16px;
  }

  .footer__person img {
    width: 64px;
    height: 64px;
  }

  .footer__person > div {
    padding-top: 0;
  }

  .footer__name {
    font-size: 18px;
    line-height: 1.1;
  }

  .footer__role {
    font-size: 13px;
    line-height: 1.5;
  }

  .footer__disclaimer {
    max-width: none;
    font-size: 13px;
  }

  .footer__phone {
    line-height: normal;
  }

  .footer__contacts p {
    margin-top: 8px;
    max-width: none;
    font-size: 13px;
    line-height: 1.5;
  }

  .footer__email {
    margin-top: 8px;
    font-weight: 500;
  }

  .footer__social,
  .footer__email + .footer__social {
    width: 100%;
    height: auto;
    margin-top: 30px;
    padding: 16px 24px;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    line-height: 1;
  }

  .footer__nav {
    width: auto;
    gap: 0;
  }

  .footer__nav a {
    padding: 14px 0;
    border-bottom-color: #2e302e;
    font-size: 15px;
    line-height: 1.6;
  }

  .footer__bottom {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 0;
    margin: 30px 16px 0;
    padding: 30px 0 32px;
    border-top-color: #2e302e;
  }

  .footer__legal {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }

  .footer__legal a {
    text-decoration: none;
    line-height: 1.5;
  }

  .footer__copy {
    grid-column: 1;
    grid-row: 2;
    margin-top: 10px;
    padding: 0;
  }

  .footer__mark {
    display: none;
  }

  .footer__copy p:last-child {
    margin: 0;
  }

  .footer__up {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
  }
}
