/* ============================================================
   WEBSITES-MOBILE.CSS — адаптивные стили страницы «Разработка сайтов»
   Подключается после websites.css
   ============================================================ */


/* ============================================================
   ПЛАНШЕТ (≤ 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  .ws-types-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-included-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-stack-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ============================================================
   ПЛАНШЕТ (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  /* ── Горизонтальный скролл ── */
  html, body { overflow-x: hidden; max-width: 100%; }

  /* ── Навигация ── */
  .navbar__inner { padding: 0 28px; }
  .navbar__links { display: none; }
  .burger { display: flex !important; }
  .scatter-char {
    display: inline !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .logo-char {
    display: inline !important;
    transition: none !important;
    transform: none !important;
  }

  /* ── Hero ── */
  .ws-hero__inner {
    grid-template-columns: 1fr 380px;
    gap: 40px;
  }
  .ws-hero__title { font-size: 40px; min-height: auto; }

  /* ── Typewriter — статично ── */
  .ws-hero__title .typewriter-line {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .typewriter-cursor { display: none !important; }
  .ws-hero__lead,
  .ws-hero__stats,
  .ws-hero__buttons {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* ── Отключаем тяжёлые анимации ── */

  /* Badge */
  .ws-hero__badge { animation: none !important; transform: none !important; }
  .ws-hero__badge-dot { animation: none !important; }

  /* Hero кнопки */
  .btn-ws--primary,
  .btn-ws--outline { animation: none !important; transform: none !important; }

  /* Trust-полоса */
  .ws-hero__trust-item { animation: none !important; }

  /* Mockup и плавающие элементы */
  .ws-hero__mockup { animation: none !important; transform: none !important; }
  .ws-float--speed,
  .ws-float--seo,
  .ws-float--mobile { animation: none !important; transform: none !important; }

  /* Карточки типов сайтов */
  .ws-type-card { animation: none !important; transform: none !important; }
  .ws-type-card::after { animation: none !important; opacity: 0 !important; }

  /* Входит в разработку */
  .ws-included-item { animation: none !important; transform: none !important; }
  .ws-included-item::after { animation: none !important; opacity: 0 !important; }

  /* ── Сетки ── */
  .ws-stack-grid { grid-template-columns: repeat(3, 1fr); }

  .ws-compare__header,
  .ws-compare__row { grid-template-columns: 1.2fr 1fr 1fr; }

  /* ── Боковые точки ── */
  #side-nav { display: none !important; }

  /* ── Курсорный след ── */
  .cursor-trail { display: none !important; }
}


/* ============================================================
   МОБИЛЬНЫЙ (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ── Hero ── */
  .ws-hero { padding: 90px 0 48px; }
  .ws-hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .ws-hero__title { font-size: 24px; min-height: auto; }
  .ws-hero__lead { font-size: 14px; margin-left: auto; margin-right: auto; }
  .ws-hero__badge { margin: 0 auto 16px; }
  .ws-hero__visual { display: none; }

  /* Статистика — 4 штуки: 2×2 */
  .ws-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
    justify-content: center;
  }
  .stat-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 8px;
    border-right: 1px solid rgba(255,255,255,0.15);
  }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) { padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10px; }

  /* Кнопки — рядом по центру */
  .ws-hero__buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
  }
  .btn-ws { width: auto; font-size: 13px; padding: 12px 18px; }

  /* Trust-полоса */
  .ws-hero__trust { justify-content: center; flex-wrap: wrap; gap: 8px; }
  .ws-trust-item { font-size: 12px; }

  /* ── Типографика секций ── */
  .ws-section { padding: 48px 0; }
  .ws-section__title { font-size: 22px; text-align: center; }
  .section-label { text-align: center; }
  .section-intro { font-size: 14px; text-align: center; margin-left: auto; margin-right: auto; }
  .divider { margin-left: auto; margin-right: auto; }

  /* ── Типы сайтов (pr-grid) ── */
  .pr-grid { grid-template-columns: 1fr; gap: 14px; }
  .pr-card { padding: 20px 16px 18px; }
  .pr-card__name { font-size: 16px; }
  .pr-card__price { font-size: 22px; }
  .pr-card__features li { font-size: 13px; }
  .pr-card__btn { width: 100%; text-align: center; font-size: 13px; }

  /* ── Входит в разработку — 2 колонки ── */
  .ws-included-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .ws-included-item { padding: 18px 14px; }
  .ws-included-item__icon { width: 44px; height: 44px; margin-bottom: 10px; }
  .ws-included-item__title { font-size: 14px; }
  .ws-included-item__text { font-size: 12.5px; }

  /* ── Стек технологий — 3 колонки ── */
  .ws-stack-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .ws-stack-card { padding: 14px 10px 12px; }
  .ws-stack-card__logo { font-size: 20px; }
  .ws-stack-card__name { font-size: 12px; }
  .ws-stack-card__use { font-size: 10px; }

  /* ── Процесс ── */
  .ws-process-timeline { max-width: 100%; }
  .ws-pstep { grid-template-columns: 44px 1fr; gap: 0 12px; }
  .ws-pstep__num { width: 36px; height: 36px; font-size: 12px; }
  .ws-pstep__body { padding: 16px 14px; margin-bottom: 14px; }
  .ws-pstep__title { font-size: 15px; }
  .ws-pstep__text { font-size: 13px; }
  .ws-pstep__list li { font-size: 12.5px; }
  .ws-pstep__result { font-size: 11.5px; padding: 5px 10px; flex-wrap: wrap; }

  /* ── Сравнение — горизонтальный скролл ── */
  .ws-compare { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ws-compare__header,
  .ws-compare__row { grid-template-columns: 110px 1fr 1fr; min-width: 440px; }
  .ws-compare__criterion,
  .ws-compare__cell { padding: 11px 12px; font-size: 12px; }
  .ws-compare__col-head { font-size: 11px; padding: 10px 12px; }

  /* ── FAQ ── */
  .ws-faq-list { max-width: 100%; }
  .ws-faq-item__q { font-size: 14px; padding: 16px 14px; gap: 10px; }
  .ws-faq-item__a { padding: 0 14px; font-size: 13px; }
  .ws-faq-item.open .ws-faq-item__a { padding: 0 14px 16px; }

  /* ── CTA ── */
  .cta-section { padding: 52px 0; }
  .cta-contacts { flex-direction: column; align-items: center; gap: 12px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form__full { grid-column: 1; }

  /* ── Footer ── */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer__col--about { grid-column: 1 / -1; }
  .footer__col--last  { grid-column: 1 / -1; }

  /* ── Side nav ── */
  #side-nav { display: none; }
}


/* ============================================================
   МАЛЕНЬКИЙ МОБИЛЬНЫЙ (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

  /* ── Контейнер ── */
  .container { padding: 0 16px; }

  /* ── Hero ── */
  .ws-hero { padding: 72px 0 36px; }
  .ws-hero__inner { text-align: center; }

  .ws-hero__title { font-size: 22px; min-height: auto; }
  .ws-hero__lead  { font-size: 13px; }
  .ws-hero__badge { font-size: 11px; padding: 5px 13px 5px 10px; }

  /* Статистика — вертикально */
  .ws-hero__stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
  }
  .stat-item {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    border-right: none;
    border-bottom: none;
    padding: 0;
  }
  .stat-num   { font-size: 22px; }
  .stat-label { font-size: 10px; }

  /* Кнопки — стопкой, полная ширина */
  .ws-hero__buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .btn-ws {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 12px 16px;
    animation: none !important;
  }

  /* Trust-пилюли — в строку с переносом */
  .ws-hero__trust { grid-template-columns: 1fr; gap: 6px; width: 100%; }
  .ws-trust-col   { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .ws-trust-item  { font-size: 11px; padding: 5px 10px 5px 8px; animation: none !important; }

  /* ── Общие секции ── */
  .ws-section { padding: 40px 0; }
  .ws-section__title { font-size: 20px; }

  /* ── Типы сайтов — 1 колонка ── */
  .pr-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }
  .pr-card { padding: 20px 16px 16px; animation: none !important; }
  .pr-card__icon  { width: 48px; height: 48px; }
  .pr-card__name  { font-size: 15px; }
  .pr-card__price { font-size: 22px; }
  .pr-card__features li { font-size: 12px; }
  .pr-card__btn   { width: 100%; text-align: center; font-size: 13px; }

  /* ── Входит в разработку — 1 колонка ── */
  .ws-included-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
  }
  .ws-included-item {
    padding: 18px 16px;
    animation: none !important;
  }
  .ws-included-item__icon  { width: 44px; height: 44px; margin-bottom: 10px; }
  .ws-included-item__title { font-size: 14px; }
  .ws-included-item__text  { font-size: 12px; }

  /* ── Стек технологий — 2 колонки ── */
  .ws-stack-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ws-stack-card { padding: 14px 10px 12px; }
  .ws-stack-card__logo { font-size: 18px; }
  .ws-stack-card__name { font-size: 11px; }
  .ws-stack-card__use  { display: none; }

  /* ── Процесс (старые классы ws-pstep) ── */
  .ws-pstep { grid-template-columns: 38px 1fr; gap: 0 10px; }
  .ws-pstep__num   { width: 32px; height: 32px; font-size: 11px; }
  .ws-pstep__body  { padding: 13px 12px; margin-bottom: 12px; }
  .ws-pstep__title { font-size: 14px; }
  .ws-pstep__text  { font-size: 12px; }
  .ws-pstep__list li { font-size: 12px; }
  .ws-pstep__result  { font-size: 11px; padding: 4px 8px; flex-wrap: wrap; }

  /* ── Процесс (новый wsp-таймлайн) — вертикальный режим ── */
  .wsp-wrap { margin-top: 32px; }

  /* Горизонтальную прогресс-линию скрываем */
  .wsp-line-wrap { display: none; }

  /* Шаги — вертикальная колонка */
  .wsp-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Каждый шаг — горизонтальный ряд: пузырь слева + карточка справа */
  .wsp-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    opacity: 1;
    transform: none;
  }

  /* Пузырь — фиксированный маленький, убираем отрицательный margin */
  .wsp-step__bubble {
    width: 40px;
    height: 40px;
    margin-top: 0;
    flex-shrink: 0;
  }
  .wsp-step__num { font-size: 13px; }
  /* Пульс-кольцо скрываем */
  .wsp-step__ring { display: none; }

  /* Карточка занимает оставшееся место */
  .wsp-step__card {
    margin-top: 0;
    flex: 1;
    padding: 12px 12px 10px;
  }
  /* Стрелку вверх убираем (для горизонтального режима) */
  .wsp-step__card::before,
  .wsp-step__card::after { display: none; }

  .wsp-step__tag   { font-size: 9px; margin-bottom: 5px; }
  .wsp-step__title { font-size: 13px; margin-bottom: 5px; }
  .wsp-step__text  { font-size: 11px; margin-bottom: 8px; }
  .wsp-step__result { font-size: 10px; padding: 3px 8px; flex-wrap: wrap; }

  /* ── Сравнение — горизонтальный скролл ── */
  .ws-compare__header,
  .ws-compare__row { grid-template-columns: 90px 1fr 1fr; min-width: 380px; }
  .ws-compare__criterion,
  .ws-compare__cell { padding: 9px 10px; font-size: 11px; }
  .ws-compare__col-head { padding: 10px; font-size: 10px; }

  /* ── vs-карточки (wsc-grid) ── */
  .wsc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wsc-card__icon { width: 52px; height: 52px; margin: 18px auto 0; }
  .wsc-card__criterion { font-size: 11px; padding: 10px 10px 0; }
  .wsc-card__me,
  .wsc-card__agency { margin: 8px 8px 0; padding: 8px 10px; font-size: 11.5px; }
  .wsc-card__agency { margin-bottom: 12px; }

  /* ── FAQ ── */
  .wsfaq-list { margin-top: 28px; }
  .wsfaq-btn  { padding: 14px 14px; gap: 10px; }
  .wsfaq-icon { width: 32px; height: 32px; }
  .wsfaq-btn__text  { font-size: 13px; }
  .wsfaq-btn__arrow { width: 24px; height: 24px; }
  .wsfaq-answer__inner { padding: 0 14px 16px 58px; }
  .wsfaq-answer__inner p { font-size: 13px; }

  /* ── CTA ── */
  .cta-section { padding: 40px 0; }
  .cta-contacts { flex-direction: column; align-items: center; gap: 10px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form__full { grid-column: 1; }

  /* ── Footer — 1 колонка ── */
  .footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .footer__col--about,
  .footer__col--last { grid-column: 1; }
}
/* ============================================================
   ФИКС ЦЕНТРИРОВАНИЯ ВЕРХНЕГО БЛОКА НА МОБИЛЬНЫХ
   ============================================================ */
@media (max-width: 768px) {
  /* Принудительное центрирование hero-блока */
  .ws-hero {
    overflow-x: hidden;
  }
  
  .ws-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .ws-hero__text {
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  
  /* Фикс для заголовка — принудительный перенос */
  .ws-hero__title {
    font-size: 28px !important;
    word-break: break-word;
    hyphens: auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }
  
  /* Убираем лишние отступы у контейнера */
  .container {
    padding: 0 16px !important;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Принудительное центрирование бейджа */
  .ws-hero__badge {
    margin-left: auto !important;
    margin-right: auto !important;
    width: fit-content;
    max-width: calc(100% - 32px);
  }
  
  /* Статистика — центрируем и убираем лишние бордеры */
  .ws-hero__stats {
    justify-content: center !important;
    text-align: center !important;
  }
  
  .stat-item {
    text-align: center;
    justify-content: center;
  }
  
  /* Кнопки — на всю ширину */
  .ws-hero__buttons {
    justify-content: center !important;
    width: 100%;
  }
  
  .btn-ws {
    width: auto;
    min-width: 200px;
  }
  
  /* Trust-элементы центрируем */
  .ws-hero__trust {
    justify-content: center !important;
    width: 100%;
  }
  
  .ws-trust-col {
    align-items: center;
  }
}

/* Дополнительный фикс для очень маленьких экранов (≤480px) */
@media (max-width: 480px) {
  .ws-hero__title {
    font-size: 24px !important;
  }
  
  .ws-hero__badge {
    font-size: 11px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    padding: 6px 12px;
  }
  
  .btn-ws {
    min-width: auto;
    width: 100%;
  }
  
  /* Убираем возможный горизонтальный скролл */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  
  .ws-hero,
  .ws-section {
    overflow-x: hidden;
  }
}

/* ============================================================
   ФИКС БЕЙДЖА — УМЕНЬШАЕМ ШРИФТ, ЧТОБЫ НЕ БЫЛО ПЕРЕНОСА
   ============================================================ */
@media (max-width: 768px) {
  .ws-hero__badge {
    font-size: 9px !important;
    padding: 5px 12px !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    max-width: 100% !important;
    width: auto !important;
  }
  
  .ws-hero__badge-dot {
    width: 5px !important;
    height: 5px !important;
  }
}

@media (max-width: 640px) {
  .ws-hero__badge {
    font-size: 8.5px !important;
    padding: 4px 10px !important;
    gap: 5px !important;
  }
}

@media (max-width: 550px) {
  .ws-hero__badge {
    font-size: 8px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
  }
}

@media (max-width: 480px) {
  .ws-hero__badge {
    font-size: 7.5px !important;
    padding: 4px 8px !important;
  }
}

@media (max-width: 420px) {
  .ws-hero__badge {
    font-size: 7px !important;
    padding: 3px 6px !important;
  }
}

/* ============================================================
   ВЫРАВНИВАНИЕ СТАТИСТИКИ НА МОБИЛЬНЫХ — ЧЁТКАЯ СЕТКА
   ============================================================ */
@media (max-width: 768px) {
  /* Контейнер статистики — сетка 2x2 */
  .ws-hero__stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px 12px !important;
    margin: 24px 0 20px !important;
    padding: 0 !important;
  }
  
  /* Каждый элемент статистики */
  .stat-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 8px 4px !important;
    border: none !important;
    background: transparent !important;
  }
  
  /* Убираем все старые бордеры и отступы */
  .stat-item:nth-child(2n) {
    border-right: none !important;
  }
  
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    padding-bottom: 8px !important;
    border-bottom: none !important;
  }
  
  /* Цифры */
  .stat-num {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: var(--accent, #C89650) !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }
  
  /* Подписи */
  .stat-label {
    font-size: 11px !important;
    color: var(--text-light, #666) !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .ws-hero__stats {
    gap: 12px 8px !important;
    margin: 20px 0 16px !important;
  }
  
  .stat-num {
    font-size: 20px !important;
  }
  
  .stat-label {
    font-size: 10px !important;
  }
}

/* Для экранов от 481px до 640px — плавный размер */
@media (min-width: 481px) and (max-width: 640px) {
  .stat-num {
    font-size: 22px !important;
  }
  
  .stat-label {
    font-size: 10.5px !important;
  }
}

/* ============================================================
   БЛОКИ СРАВНЕНИЯ (ws-why) — В СТОЛБИК НА МОБИЛЬНЫХ
   ============================================================ */
@media (max-width: 768px) {
  /* Сетка карточек — в столбик */
  .wsc-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-top: 32px !important;
  }
  
  /* Каждая карточка — на всю ширину */
  .wsc-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
    animation: none !important;
  }
  
  /* Внутреннее содержимое карточки */
  .wsc-card__icon {
    width: 48px !important;
    height: 48px !important;
    margin: 16px auto 0 !important;
  }
  
  .wsc-card__criterion {
    font-size: 14px !important;
    padding: 10px 16px 0 !important;
    text-align: center !important;
  }
  
  /* Блоки "Вебмастер" и "Студия" */
  .wsc-card__me,
  .wsc-card__agency {
    margin: 8px 12px !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  
  .wsc-card__agency {
    margin-bottom: 16px !important;
  }
  
  /* Бейджики */
  .wsc-card__me-badge,
  .wsc-card__agency-badge {
    font-size: 9px !important;
    padding: 2px 8px !important;
    margin-bottom: 6px !important;
    display: inline-block !important;
  }
}

/* Для очень маленьких экранов (≤480px) */
@media (max-width: 480px) {
  .wsc-cards {
    gap: 12px !important;
  }
  
  .wsc-card__criterion {
    font-size: 13px !important;
  }
  
  .wsc-card__me,
  .wsc-card__agency {
    font-size: 11px !important;
    padding: 8px 10px !important;
  }
}