/* МОБИЛЬНЫЕ (до 767px) */
@media(max-width:767px){
    *{min-width:0}
    img,svg{max-width:100%;height:auto}
    .container{padding:0 16px}
    h1{font-size:26px} h2{font-size:22px}
    .header__top{display:none}
    .header__btn-phone{display:block}
    .header__actions .btn{display:none}
    .hamburger{display:flex}
    #mainNav.nav{
        display:none;
        position:fixed;
        top:0;left:0;right:0;bottom:0;
        width:100vw;
        height:100dvh;
        background:#fff !important;
        overflow-y:auto;
        z-index:1200;
        padding:12px 16px 18px;
        box-shadow:0 0 0 9999px rgba(9,12,20,.38);
    }
    #mainNav.nav.is-open{display:block !important}
    #mainNav .nav__mobile-head{display:flex;align-items:center;justify-content:space-between;padding:2px 0 12px;border-bottom:1px solid var(--border);margin-bottom:10px}
    #mainNav .nav__mobile-title{font-weight:700;font-size:16px;color:var(--secondary);width:100%;text-align:center}
    #mainNav .nav__close{position:absolute;right:16px}
    #mainNav .nav__city{
        display:block;
        width:100%;
        text-align:center;
        padding:12px 14px;
        margin:0 0 10px;
        border:1px solid var(--border);
        border-radius:12px;
        background:#f8fafc;
        color:var(--secondary);
        font-weight:600;
    }
    #mainNav .nav__list{
        display:flex !important;
        flex-direction:column !important;
        gap:0;
        width:100%;
        align-items:stretch;
    }
    #mainNav .nav__item{width:100%;display:block}
    #mainNav .nav__link{
        display:block;
        width:100%;
        padding:14px 2px;
        font-size:17px;
        border-bottom:1px solid var(--border);
        border-radius:0;
        color:var(--secondary);
        background:transparent;
        text-align:center;
    }
    .nav__drop{display:none!important}
    .hero{padding:32px 0}
    .hero__inner{grid-template-columns:1fr}
    .hero__title{font-size:28px}
    .hero__subtitle{font-size:15px;line-height:1.55}
    .hero__badges,.service-hero__meta{gap:6px}
    .services-grid{grid-template-columns:1fr;gap:12px}
    .masters-grid{grid-template-columns:1fr}
    .trust__grid{grid-template-columns:1fr 1fr;gap:16px}
    .how-steps{grid-template-columns:1fr 1fr}
    .how-steps::before{display:none}
    .service-layout{grid-template-columns:1fr}
    .service-sidebar{order:-1}
    .sidebar__sticky{position:static}
    .works-grid{grid-template-columns:1fr}
    .price-table{font-size:13px}
    .price-table th,.price-table td{padding:8px 10px}
    .footer__top{grid-template-columns:1fr;gap:32px}
    .footer__nav{grid-template-columns:1fr 1fr}
    .footer__bottom{flex-direction:column;gap:12px;text-align:center}
    .footer__top,.footer__nav,.footer__cities,.footer__bottom{text-align:center}
    .footer__nav-title{text-align:center}
    .footer__nav a{text-align:center}
    .footer__cities-title{text-align:center}
    .footer__cities-list{justify-content:center}
    .footer__phone{font-size:18px;word-break:break-word}
    .mobile-cta{display:flex}
    .mobile-cta .btn{min-height:44px}
    .mobile-cta__phone,.mobile-cta__order{font-size:13px;padding:10px}
    body{padding-bottom:72px}
    body.nav-open{overflow:hidden;touch-action:none}
    .symptoms-grid{grid-template-columns:1fr 1fr}
    .service-card,.master-card,.review-card{border-radius:14px}
    .hero__form,.sidebar__form,.cta-section{border-radius:14px}
    .btn{white-space:normal;text-align:center}
    .btn--lg{padding:12px 16px;font-size:15px}
    .table-scroll,.price-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
    .price-table{min-width:520px}
    .price-table td:first-child,.price-table th:first-child{min-width:190px;white-space:normal;word-break:normal;overflow-wrap:break-word}
    .price-table:not(.price-table--category) td:nth-child(2),
    .price-table:not(.price-table--category) th:nth-child(2){
        width:60px;
        white-space:nowrap;
    }
    .price-table:not(.price-table--category) td:nth-child(3),
    .price-table:not(.price-table--category) th:nth-child(3){
        width:88px;
        white-space:nowrap;
    }
    /* Для страниц категорий: 2 колонки (Услуга + Цена) */
    .price-table--category{min-width:520px;table-layout:auto}
    .price-table--category th:nth-child(2),
    .price-table--category td:nth-child(2){
        width:84px;
        white-space:nowrap;
    }
    .faq__question{
        display:block;
        width:100%;
        text-align:center;
        position:relative;
        line-height:1.35;
        padding-left:34px;
        padding-right:34px;
    }
    .faq__question::after{
        position:absolute;
        right:4px;
    }
    .faq__answer{text-align:center}
}

/* Ultra small devices (<=379px) */
@media (max-width:379px){
    .container{padding:0 10px}
    h1{font-size:22px;line-height:1.2}
    h2{font-size:19px;line-height:1.25}
    .header__main-inner{padding:10px 0;gap:8px}
    .header__logo img{width:132px;height:auto}
    #mainNav.nav{padding:10px 12px 16px}
    #mainNav .nav__mobile-title{font-size:15px}
    #mainNav .nav__city{padding:10px 12px;font-size:14px}
    #mainNav .nav__link{font-size:16px;padding:12px 2px}

    .hero{padding:22px 0}
    .hero__title{font-size:24px;margin-bottom:10px}
    .hero__subtitle{font-size:14px;margin-bottom:14px}
    .hero__form{padding:14px}
    .hero__form-title{font-size:16px;margin-bottom:10px}

    .badge{font-size:11px;padding:4px 8px}
    .service-card,.master-card,.review-card,.sidebar__form,.sidebar__info{padding:14px}
    .service-card__title{font-size:14px}
    .service-card__desc,.how-step__desc,.review-card p{font-size:13px}
    .master-card{gap:10px}
    .master-card__photo img{width:56px;height:56px}

    .field__input{padding:10px 12px;font-size:14px}
    .btn{font-size:14px}
    .btn--lg{padding:11px 14px;font-size:14px}

    .trust__grid{gap:10px}
    .trust__num{font-size:28px}
    .trust__label{font-size:12px}
    .how-steps{grid-template-columns:1fr}
    .symptoms-grid{grid-template-columns:1fr}
    .footer__nav{grid-template-columns:1fr}
    .footer__legal{flex-direction:column;gap:8px}
    .faq__question{
        padding-left:28px;
        padding-right:28px;
    }
    .faq__question::after{right:0}

    .mobile-cta{padding:8px 10px;gap:8px}
    .mobile-cta__phone,.mobile-cta__order{font-size:12px;padding:9px 8px}
    body{padding-bottom:66px}
    .price-table{min-width:480px;font-size:12px}
    .price-table th,.price-table td{padding:7px 8px}
    .price-table--category th:nth-child(2),
    .price-table--category td:nth-child(2){width:72px}
}
@media(min-width:768px)and(max-width:1023px){
    .container{padding:0 24px}
    .services-grid{grid-template-columns:repeat(3,1fr)}
    .masters-grid{grid-template-columns:repeat(2,1fr)}
    .hero__title{font-size:36px}
    .hero__inner{grid-template-columns:1fr 340px;gap:24px}
    .service-layout{grid-template-columns:1fr 280px}
    .footer__nav{grid-template-columns:repeat(2,1fr)}
    .symptoms-grid{grid-template-columns:repeat(3,1fr)}
}

/* --- Sidebar related services (mobile) --- */
@media (max-width: 992px){
    .sidebar__related{padding:14px}
    .sidebar__related a{padding:9px 11px}
}


/* --- Mobile header phone move to burger --- */
@media (max-width: 900px){
  /* убрать номер из верхней полосы */
  .header__top .header__phone{display:none !important;}

  /* и убрать телефон-кнопку в правых actions */
  .header__btn-phone--desktop{display:none !important;}

  /* телефон внутри бургер-меню */
  .nav__mobile-phone{
    display:flex;
    align-items:center;
    justify-content:center;
    margin:10px 0 12px;
    padding:10px 12px;
    border-radius:10px;
    background:#f7f8fc;
    border:1px solid #e6e9f2;
    color:#1a1a2e;
    font-weight:700;
    font-size:15px;
    text-decoration:none;
  }
}

@media (max-width: 379px) {
  html, body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .btn,
  .field__input,
  select,
  input,
  textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .masters-layout,
  .service-layout,
  .lk-quick-grid,
  .lk-cities-grid {
    grid-template-columns: 1fr !important;
  }

  .master-card,
  .master-catalog-card,
  .lk-offer-row {
    grid-template-columns: 1fr !important;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .price-table {
    min-width: 560px;
  }

  h1 { font-size: 30px !important; line-height: 1.2; }
  h2 { font-size: 22px !important; line-height: 1.25; }
}

/* Fix: logo oversize on narrow screens */
@media (max-width: 767px){
  .header__logo{
    flex: 0 0 auto;
    width: clamp(96px, 34vw, 132px);
    line-height: 0;
  }

  .header__logo img{
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 32px;
    object-fit: contain;
  }
}

@media (max-width: 379px){
  .header__logo{
    width: clamp(88px, 32vw, 112px);
  }

  .header__logo img{
    max-height: 28px;
  }
}

/* Header tune: logo/text balance on narrow screens */
@media (max-width: 767px){
  .header__main-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:56px;
  }

  .header__logo{
    flex:0 0 auto !important;
    width:146px !important;
    min-width:146px !important;
    max-width:146px !important;
    line-height:0;
  }

  .header__logo img{
    display:block;
    width:146px !important;
    height:36px !important;
    max-height:none !important;
    object-fit:contain;
  }

  .hamburger{
    margin-left:auto;
    flex:0 0 auto;
  }
}

@media (max-width: 379px){
  .header__logo{
    width:132px !important;
    min-width:132px !important;
    max-width:132px !important;
  }

  .header__logo img{
    width:132px !important;
    height:32px !important;
  }
}

/* logo final size fix */
@media (max-width: 767px){
  .header__logo{flex:0 0 auto;width:146px!important;min-width:146px!important;max-width:146px!important}
  .header__logo img{width:146px!important;height:36px!important;object-fit:contain}
}
@media (max-width: 379px){
  .header__logo{width:136px!important;min-width:136px!important;max-width:136px!important}
  .header__logo img{width:136px!important;height:34px!important}
}

/* ===== logo text fix (prod): one-line + metallic, no 3D ===== */
@media (max-width: 767px){
  .header_logo,
  .header__logo,
  .footer_logo,
  .footer__brand-logo{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    min-width:max-content !important;
    width:auto !important;
  }

  .header_logo-text,
  .header__logo-text,
  .footer_logo-text,
  .footer__logo-text{
    display:inline-block !important;
    width:auto !important;
    min-width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    line-height:1 !important;
    font-size:13px !important;
    font-weight:800 !important;
    letter-spacing:.25px !important;

    background:linear-gradient(90deg,#8e97a7 0%,#f2f5fa 22%,#a0a9b9 45%,#eef2f7 68%,#7e8798 100%) !important;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    color:transparent !important;

    text-shadow:none !important;
    filter:none !important;
    transform:none !important;
  }
}

@media (max-width: 379px){
  .header_logo-text,
  .header__logo-text,
  .footer_logo-text,
  .footer__logo-text{
    font-size:12px !important;
    letter-spacing:.15px !important;
  }
}

/* FINAL FORCE LOGO TEXT FIX */
@media (max-width: 767px){
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text,
  .footer .footer_logo .footer_logo-text,
  .footer .footer_logo .footer__logo-text,
  .footer .footer__brand-logo .footer_logo-text,
  .footer .footer__brand-logo .footer__logo-text{
    display:inline-block !important;
    width:auto !important;
    min-width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    line-height:1 !important;

    font-size:14px !important;
    font-weight:800 !important;
    letter-spacing:.2px !important;

    /* без 3D */
    text-shadow:none !important;
    filter:none !important;
    transform:none !important;
    opacity:1 !important;

    /* metallic цвет */
    color:#B8C0CC !important;
    -webkit-text-fill-color:#B8C0CC !important;
    background:none !important;
    -webkit-background-clip:initial !important;
    background-clip:initial !important;
  }

  header .header_logo,
  header .header__logo{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    width:auto !important;
    min-width:max-content !important;
  }
}

@media (max-width: 379px){
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text{
    font-size:13px !important;
  }
}

/* FINAL: colored logo text + icon same height */
@media (max-width: 767px){
  /* контейнер лого */
  header .header_logo,
  header .header__logo{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    width:auto !important;
    min-width:max-content !important;
  }

  /* иконка логотипа */
  header .header_logo .header_logo-icon,
  header .header_logo .header__logo-icon,
  header .header__logo .header_logo-icon,
  header .header__logo .header__logo-icon,
  header .header_logo img,
  header .header__logo img,
  header .header_logo svg,
  header .header__logo svg{
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    min-height:22px !important;
    max-width:22px !important;
    max-height:22px !important;
    object-fit:contain !important;
    flex:0 0 22px !important;
  }

  /* текст логотипа */
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text{
    display:inline-block !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;

    height:22px !important;
    line-height:22px !important;

    font-size:14px !important;
    font-weight:800 !important;
    letter-spacing:.25px !important;

    /* цветной перелив без 3D */
    background:linear-gradient(90deg,#ff4b6a 0%,#e61e43 45%,#b71234 100%) !important;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    color:transparent !important;
    -webkit-text-fill-color:transparent !important;

    text-shadow:none !important;
    filter:none !important;
    transform:none !important;
  }
}

@media (max-width: 379px){
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text{
    font-size:13px !important;
  }
}

/* BIGGER logo style: header + footer */
@media (max-width: 767px){
  /* Общий контейнер логотипа */
  header .header_logo,
  header .header__logo,
  .footer .footer_logo,
  .footer .footer__brand-logo{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    width:auto !important;
    min-width:max-content !important;
  }

  /* Иконка: крупнее */
  header .header_logo .header_logo-icon,
  header .header_logo .header__logo-icon,
  header .header__logo .header_logo-icon,
  header .header__logo .header__logo-icon,
  header .header_logo img,
  header .header__logo img,
  header .header_logo svg,
  header .header__logo svg,
  .footer .footer_logo .footer_logo-icon,
  .footer .footer_logo .footer__logo-icon,
  .footer .footer__brand-logo .footer_logo-icon,
  .footer .footer__brand-logo .footer__logo-icon,
  .footer .footer_logo img,
  .footer .footer__brand-logo img,
  .footer .footer_logo svg,
  .footer .footer__brand-logo svg{
    width:26px !important;
    height:26px !important;
    min-width:26px !important;
    min-height:26px !important;
    max-width:26px !important;
    max-height:26px !important;
    object-fit:contain !important;
    flex:0 0 26px !important;
  }

  /* Текст: крупнее, цветной, без 3D */
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text,
  .footer .footer_logo .footer_logo-text,
  .footer .footer_logo .footer__logo-text,
  .footer .footer__brand-logo .footer_logo-text,
  .footer .footer__brand-logo .footer__logo-text{
    display:inline-block !important;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;

    height:26px !important;
    line-height:26px !important;

    font-size:16px !important;
    font-weight:800 !important;
    letter-spacing:.35px !important;

    background:linear-gradient(90deg,#ff5a75 0%,#eb254a 45%,#b51236 100%) !important;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    color:transparent !important;
    -webkit-text-fill-color:transparent !important;

    text-shadow:none !important;
    filter:none !important;
    transform:none !important;
  }
}

@media (max-width: 379px){
  header .header_logo .header_logo-text,
  header .header_logo .header__logo-text,
  header .header__logo .header_logo-text,
  header .header__logo .header__logo-text,
  .footer .footer_logo .footer_logo-text,
  .footer .footer_logo .footer__logo-text,
  .footer .footer__brand-logo .footer_logo-text,
  .footer .footer__brand-logo .footer__logo-text{
    font-size:15px !important;
  }

  header .header_logo img,
  header .header__logo img,
  header .header_logo svg,
  header .header__logo svg,
  .footer .footer_logo img,
  .footer .footer__brand-logo img,
  .footer .footer_logo svg,
  .footer .footer__brand-logo svg{
    width:24px !important;
    height:24px !important;
    min-width:24px !important;
    min-height:24px !important;
    max-width:24px !important;
    max-height:24px !important;
  }
}

@media (max-width: 767px){
  .auth-grid{grid-template-columns:1fr !important;gap:12px}
  .auth-card{padding:14px}
  .auth-card__title{font-size:20px}
}
@media (max-width: 767px){
  #order-form form{
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  #order-form #order-description{
    min-height:100px !important;
  }
}
