/* ===========================================
   АДАПТИВНЫЕ СТИЛИ (RESPONSIVE)
   =========================================== */

/* ===========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ: 320-375PX
   =========================================== */

@media (min-width: 320px) and (max-width: 375px) {
    /* Hero секция - сетка услуг */
    .hero__services {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hero__service {
        padding: 16px;
        gap: 12px;
        width: 136px;
    }

    .hero__service-icon {
        width: 50px;
        height: 50px;
    }

    .hero__service-name {
        font-size: 12px;
    }

    /* Testimonials секция - исправление прокрутки */
    .testimonials__list {
        padding-right: 40px;
    }

    .testimonials__slide {
        padding: 0 10px;
    }
}

/* ===========================================
   МОБИЛЬНЫЕ: ДО 480PX — КОМПАКТНЫЕ ОТСТУПЫ
   =========================================== */

@media (max-width: 480px) {
    /* Все секции — уменьшенные отступы */
    .hero,
    .pricing,
    .promo,
    .hotline,
    .faq,
    .testimonials,
    .contact,
    .contact-master {
        padding: 36px 0;
    }

    /* Hero — компактнее */
    .hero__title {
        font-size: 16px;
        margin-bottom: 1rem;
    }

    /* Hero — карточки на всю ширину */
    .hero__services {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hero__service {
        width: auto;
        min-height: auto;
    }

    h2.section-title {
        margin-bottom: var(--section-title-mb, 0.75rem);
    }

    .hero__subtitle {
        --section-title-mb: 0.75rem;
    }

    a.hero__phone[href^="tel:"] {
        margin-bottom: 2rem;
    }

    /* Header — просторнее, это главная точка входа */
    .header {
        padding: 24px 0;
    }

    .header__container {
        gap: 10px;
    }

    /* Все кнопки — крупные, на всю ширину */
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 18px;
        padding: 16px 24px;
        box-sizing: border-box;
    }
}

/* ===========================================
   МОБИЛЬНЫЕ: ДО 640PX
   =========================================== */

@media (max-width: 639px) {
    /* Header секция */
    .header__container {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 16px;
        padding: 0 1rem;
    }

    .header__logo {
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .header__actions {
        flex-direction: column;
        gap: 12px;
    }

    .header__contact {
        align-items: center;
    }

    .header__phone-subtitle {
        text-align: center;
    }

    .header__location {
        justify-content: center;
    }

    .header__logo-image {
        width: 192px;
        height: 32px;
        background-position: center center;
    }

    .header__phone-number,
    a.header__phone-number[href^="tel:"] {
        font-size: 25px !important;
    }

    .hero__phone,
    a.hero__phone[href^="tel:"] {
        font-size: 25px !important;
        margin-bottom: 4rem;
    }

    .header .btn {
        font-size: 18px;
        padding: 16px 24px;
    }
}

/* ===========================================
   ПЛАНШЕТЫ: ОТ 640PX
   =========================================== */

@media (min-width: 640px) {
    /* Контейнеры */
    .container {
        --container-padding: 2rem;
    }


    /* Pricing секция */
    .pricing__tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===========================================
   HEADER: ПЛАНШЕТНАЯ АДАПТАЦИЯ (640-1023PX)
   =========================================== */

@media (min-width: 640px) and (max-width: 1023px) {
    /* Hide city on tablets — phone & CTA take its place */
    .header__location {
        display: none;
    }

    .header__container {
        flex-wrap: nowrap;
        gap: 16px;
    }

    .header__actions {
        gap: 12px;
    }

    .header__phone-number {
        font-size: 18px;
    }

    .header__phone-icon {
        width: 22px;
        height: 22px;
    }

    .header .btn {
        font-size: 13px;
        padding: 10px 16px;
        white-space: nowrap;
    }
}

/* ===========================================
   ПЛАНШЕТЫ: ДО 768PX
   =========================================== */

@media (max-width: 768px) {
    /* Все секции - унифицированные отступы 60px */
    .hero,
    .pricing,
    .promo,
    .hotline,
    .faq,
    .testimonials,
    .contact,
    .contact-master {
        padding: 60px 0;
    }

    /* Promo карусель */
    .promo__slide {
        flex: 0 0 100%;
    }

    .promo__arrow {
        display: none;
    }

    .promo__arrows-mobile {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .promo__arrow-mobile {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: none;
        background-color: var(--color-section-bg);
        color: #fff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s;
    }

    .promo__arrow-mobile:hover {
        opacity: 0.8;
    }

    .contact__container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 16px;
    }

    .contact__info {
        align-items: center;
        text-align: center;
    }

    .contact__item {
        justify-content: center;
    }

    .contact__map-container {
        height: 280px;
    }

    .contact__phone {
        font-size: 20px;
    }

    .contact__address,
    .contact__hours,
    .contact__email {
        font-size: 16px;
    }

    /* FAQ секция */

    .faq__container {
        padding: 0 16px;
    }

    .faq__subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .faq__question {
        padding: 20px;
        font-size: 16px;
        gap: 8px;
    }

    .faq__question-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .faq__answer p {
        font-size: 14px;
        padding-bottom: 20px;
    }

    /* Pricing секция — горизонтальный скролл табов */
    .pricing__tabs {
        flex-wrap: nowrap;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        border-radius: 0;
        box-shadow: none;
        justify-content: flex-start;
    }

    .pricing__tabs::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .pricing__tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        border-right: 1px solid #d0d0d0;
    }

    .pricing__tab:first-child {
        border-radius: var(--border-radius) 0 0 var(--border-radius);
    }

    .pricing__tab:last-child {
        border-right: none;
        border-radius: 0 var(--border-radius) var(--border-radius) 0;
    }

    .pricing__categories {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .pricing__category-title {
        font-size: 1.375rem;
        margin-bottom: 1.25rem;
    }

    .pricing__items {
        gap: 0;
    }

    .pricing__item {
        padding: 0.75rem 0;
        margin-bottom: 0;
    }

    .pricing__item-title {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .pricing__item-price {
        font-size: 1rem;
    }

    .pricing__item-description {
        font-size: 0.8125rem;
    }
}

/* ===========================================
   ПЛАНШЕТЫ: ОТ 768PX
   =========================================== */

@media (min-width: 768px) {
    /* Все секции - унифицированные отступы 100px */
    .hero,
    .pricing,
    .promo,
    .hotline,
    .faq,
    .testimonials,
    .contact,
    .contact-master {
        padding: 100px 0;
    }

    /* Promo: 2 слайда на планшете */
    .promo__slide {
        flex: 0 0 50%;
    }

    .hero__title {
        margin-bottom: 2.5rem;
    }

    .hero__subtitle {
        margin-bottom: 2rem;
    }

    .hero__phone {
        margin-bottom: 4rem;
    }

    .hero__service-icon {
        width: 90px;
        height: 90px;
    }
}

/* ===========================================
   ДЕСКТОП: ОТ 1024PX
   =========================================== */

@media (min-width: 1024px) {
    /* Контейнеры */
    .container {
        --container-padding: 3rem;
    }

    /* Hero секция */

    .hero__service-icon {
        width: 90px;
        height: 90px;
    }

    /* Pricing секция */
    .pricing__tab {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .pricing__category-title {
        font-size: 1.625rem;
    }

    .pricing__item-title {
        font-size: 1.25rem;
    }

    .pricing__item-price {
        font-size: 1.25rem;
    }

    .pricing__item-description {
        font-size: 0.9375rem;
    }
}

/* ===========================================
   ПЛАНШЕТЫ: ДО 768PX (TESTIMONIALS)
   =========================================== */

@media (max-width: 768px) {
    /* Testimonials секция */

    .testimonials__container {
        padding: 0 16px;
    }

    h2.section-title--left {
        text-align: center;
    }

    .testimonials__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
        margin-bottom: 30px;
    }

    .testimonials__description {
        font-size: 1rem;
    }

    .testimonials__list {
        gap: 20px;
    }

    .testimonials__slide {
        gap: 20px;
        padding: 0 10px;
    }
}

/* ===========================================
   МОБИЛЬНЫЕ: ДО 640PX (TESTIMONIALS)
   =========================================== */

@media (max-width: 640px) {
    /* Testimonials секция */

    .testimonials__score {
        font-size: 2.5rem;
    }

    .testimonials__list {
        gap: 16px;
    }

    .testimonials__slide {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
    }

    .testimonials__item {
        padding: 20px;
    }

    .testimonials__yandex-logo {
        width: 170px;
        height: 40px;
    }

    .testimonials__navigation {
        margin-top: 24px;
        gap: 12px;
    }

    .testimonials__arrow {
        width: 40px;
        height: 40px;
    }

    .testimonials__arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* ===========================================
   МОДАЛЬНОЕ ОКНО — АДАПТИВНОСТЬ
   =========================================== */

/* Планшеты и мобильные */
@media (max-width: 768px) {
    .modal__window {
        width: 94%;
        padding: 36px 24px;
        padding-top: 44px;
        border-radius: var(--border-radius);
    }

    .modal__close {
        top: 8px;
        right: 12px;
        font-size: 32px;
        width: 36px;
        height: 36px;
    }

    .modal__title {
        font-size: 24px;
    }

    .modal__subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .modal__input {
        font-size: 16px;
    }

    .modal__field {
        height: 52px;
    }

    .modal__submit {
        height: 52px;
        font-size: 16px;
    }
}

/* Маленькие мобильные */
@media (max-width: 375px) {
    .modal__window {
        width: 96%;
        padding: 28px 16px;
    }

    .modal__title {
        font-size: 22px;
    }

    .modal__subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .modal__field {
        padding: 0 12px;
        height: 50px;
    }

    .modal__flag {
        font-size: 20px;
        margin-right: 8px;
    }

    .modal__input {
        font-size: 16px;
    }

    .modal__submit {
        height: 50px;
        font-size: 15px;
    }

    .modal__privacy {
        font-size: 12px;
    }
}
