/* === PHONEFIX RESPONSIVE === */

/* ─── Inline media blocks (scattered throughout the file) ─── */

@media (max-width: 768px) {
  .h-mega-menu {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    transform: none; min-width: 0;
    flex-direction: column; max-height: 50vh;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow-y: auto;
  }
  .h-mega-col { border-right: none; border-bottom: 1px solid var(--border); }
  .h-mega-col:last-child { border-bottom: none; }
  .h-mega-close {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border);
    position: sticky; top: 8px; right: 8px; margin: 8px 8px 0 auto;
    cursor: pointer; z-index: 10;
  }
}

@media (max-width: 640px) {
  .dev-ribbon { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .dev-ribbon::-webkit-scrollbar { display: none; }
}

@media (max-width: 1024px) { .adev-rc-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .adev-rc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .adev-rc[data-tip]::after,
  .adev-rc[data-tip]::before { display: none; }
  .apple-devices .tabs-nav { border-radius: 12px; padding: 4px; gap: 1px; }
  .apple-devices .tab-btn { padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 640px)  { .adev-rc-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 768px) {
  .proc-timeline { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .proc-connector { display: none; }
  .proc-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 0;
  }
  .proc-num { display: none; }
  .proc-title, .proc-desc { text-align: left; }
  .proc-icon { flex-shrink: 0; margin-bottom: 0; }
  .proc-time { align-self: flex-start; }
}
@media (max-width: 480px) {
  .proc-timeline { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .pt-brands-ribbon { justify-content: flex-start; }
  .pt-brands-ribbon .brand-card { flex: 0 0 100px; max-width: 100px; }
}

@media (max-width: 640px) {
  .pt-scroll { overflow-x: visible; }
  .pt-table thead { display: none; }
  .pt-table, .pt-table tbody { display: block; }
  .pt-table tbody tr {
    display: block;
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 16px;
    margin-bottom: 12px;
  }
  .pt-table tbody tr:hover { background: var(--surface); }
  .pt-table td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid var(--border);
  }
  .pt-table td:last-child { border-bottom: none; }
  .pt-table td.pt-model {
    display: block; padding: 0 0 10px;
    border-bottom: 1.5px solid var(--border); margin-bottom: 6px;
    font-size: 15px;
  }
  .pt-repair-label { display: inline; color: var(--text-muted); font-weight: 400; }
  .pt-table td.pt-price::before {
    content: attr(data-label);
    font-size: 13px; color: var(--text-muted); font-weight: 500;
  }
  .pt-table td.pt-price { font-size: 14px; }
  .pt-table td.pt-price a,
  .pt-table td.pt-price > span { white-space: nowrap; }
  .pt-table td.pt-price a { font-size: 11px; color: var(--text-muted); letter-spacing: 0; }
  .pt-table td.pt-price a strong { font-size: 14px; color: var(--text); margin-left: 2px; }
}

@media (max-width: 640px) {
  .gal-arrow-prev { left: 0; }
  .gal-arrow-next { right: 0; }
}

@media (max-width: 768px) {
  .ba-sliders { grid-template-columns: 1fr; gap: 24px; }
  .gal-masonry { gap: 10px; }
}

@media (max-width: 640px) {
  .mid-cta-inner { flex-direction: column; text-align: center; padding: 24px; }
}

@media (max-width: 768px) { .guar-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 480px) { .guar-grid { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex; gap: 8px;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.88);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0,0,0,.08);
    transition: transform .3s ease;
  }
  .mobile-sticky-cta.msc-hidden { transform: translateY(100%); }
  .msc-call, .msc-book {
    flex: 1; padding: 13px; border-radius: 980px;
    font-weight: 600; font-size: 15px; text-align: center;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    text-decoration: none;
  }
  .msc-call { background: transparent; color: var(--accent); border: 1px solid var(--border-2); }
  .msc-book { background: var(--accent); color: #fff; }
}

@media (max-width: 640px) {
  .courier-steps { flex-direction: column; align-items: flex-start; gap: 0; }
  .courier-step { flex-direction: row; text-align: left; gap: 12px; }
  .courier-step-line { width: 2px; height: 20px; margin: 0 0 0 23px; }
  .courier-step-text { gap: 4px; }
  .cc-demo-row { gap: 6px; }
  .cc-addr-grid { grid-template-columns: 1fr 1fr; }
  .cc-eta-value { font-size: 22px; }
}

@media (max-width: 1024px) {
  .courier-inner { grid-template-columns: 1fr; padding: 32px 24px; gap: var(--gap-md); }
  .courier-trust { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
}

@media (max-width: 1024px) {
  .tradein-grid { grid-template-columns: 1fr; gap: 32px; }
  .tradein-calc { position: static; }
}
@media (max-width: 640px) {
  .ti-stats { flex-wrap: wrap; }
  .ti-stat { flex: 1 1 40%; }
  .ti-stat-sep { display: none; }
}

@media (max-width: 1024px) {
  .centers-grid { grid-template-columns: repeat(2, 1fr); }
  .centers-map-layout { grid-template-columns: 1fr; }
  .centers-map-layout .partners-ymap iframe { min-height: 280px; }
}
@media (max-width: 640px) {
  .centers-grid { grid-template-columns: 1fr; }
}

/* ─── MAIN RESPONSIVE SECTION ─── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { transform: scale(0.75); transform-origin: center top; margin: 0 auto; }
  .hero-lead { margin: 0 auto 40px; }
  .seo-text { grid-template-columns: 1fr; }
  .seo-facts-strip { grid-template-columns: 1fr 1fr; }
  .seo-facts-grid { grid-template-columns: 1fr 1fr; }
  .seo-body-cols { columns: 1; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  /* Header: 2-row mobile layout */
  .header { height: auto; flex-direction: column; align-items: stretch; }
  .hero { padding-top: 84px; }
  .h-mob-nav {
    display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
    border-top: 0.5px solid rgba(0,0,0,.06);
    padding: 0 12px;
  }
  .h-mob-nav::-webkit-scrollbar { display: none; }
  .h-mob-link {
    flex-shrink: 0; padding: 8px 12px;
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    white-space: nowrap; transition: color .15s;
  }
  .h-mob-link:hover, .h-mob-link:active { color: var(--accent); }
  .h-mob-link--phone { color: var(--accent); display: flex; align-items: center; gap: 4px; margin-left: auto; }

  /* Hero: show phone at full size (capped at desktop 240px) */
  .hero-visual { transform: none; margin: 0 auto; }
  .hero { overflow-x: clip; }
  .ph-hs-tip { display: none; }
  .h-nav, .h-phone { display: none; }
  .h-cta { display: none; }
  .h-status-btn #hStatusText { display: none; }
  .h-status-btn { padding: 8px; min-width: 44px; min-height: 44px; justify-content: center; }
  .burger { display: flex; margin-left: auto; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .header-inner { gap: 8px; padding: 0 12px; }
  .link-more { min-height: 44px; align-items: center; }
  .logo { min-height: 44px; align-items: center; }
  .city-btn { min-height: 44px; }
  .header-inner > .city-btn { display: none; }
  .status-indicator.has-status { display: none; }
  .gal-arrow { min-width: 44px; min-height: 44px; }
  .pq-tag { min-height: 44px; display: inline-flex; align-items: center; }
  .cities-expand-btn { min-height: 44px; }
  .city-chip { min-height: 44px; }
  .hero-search { flex-direction: column; }
  .hs-select, .hs-input, .hs-btn { width: 100%; }
  .cta-inner { flex-direction: column; }
  .footer-top { grid-template-columns: 1fr; gap: var(--gap-md); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section { padding: var(--section-pad-mob) 20px; }
  .adev-grid { grid-template-columns: repeat(2, 1fr); }
  .adev-detail { grid-template-columns: 1fr; }
  .s-head-row { flex-direction: column; gap: 12px; }
  .city-modal { max-height: 92vh; }
  .city-modal-body { padding: 0 16px; }
  .city-modal-head, .city-modal-search-wrap, .city-modal-footer { padding-left: 16px; padding-right: 16px; }
  .city-search-icon { left: 32px; }
  .rating-platforms { flex-direction: column; }

  .s-sub-visible { font-size: 13px; }

  /* hero-trust: compact grid 3+2 */
  .hero-trust {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px;
    justify-items: center; text-align: center;
  }
  .h-trust-num { font-size: 22px; }
  .h-trust-label { font-size: 12px; }

  /* pt-dev-nav: 3-col grid */
  .pt-dev-nav {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  }
  .pt-dev-btn { justify-content: center; padding: 10px 6px; font-size: 13px; min-height: 44px; }
  .pt-nav-search { grid-column: 1 / -1; margin-left: 0; width: 100%; }
  .pt-nav-search-input { width: 100%; }

  /* price cards compact */
  .pt-note-box { padding: 10px 12px; font-size: 12px; align-items: center; }
  .pt-note-box svg { margin-top: 0; flex-shrink: 0; }
}
@media (max-width: 480px) {
  .hero-visual { transform: none; margin: 0 auto; }
  .hero-trust { grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
  .h-trust-num { font-size: 20px; }
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
  .rev-grid { grid-template-columns: 1fr; }
  .bxs-grid { grid-template-columns: 1fr; }
  .sams-grid { grid-template-columns: 1fr; }

  /* pt-dev-nav: 2-col on xs */
  .pt-dev-nav { grid-template-columns: repeat(2, 1fr); }

  /* price cards even more compact */
  .pt-table tbody tr { padding: 12px; margin-bottom: 8px; }
  .pt-table td { padding: 4px 0; }
  .pt-table td.pt-model { font-size: 14px; padding: 0 0 8px; }
  .pt-table td.pt-price { font-size: 13px; }
  .pt-table td.pt-price::before { font-size: 12px; }
  .pt-table td.pt-price a { font-size: 10px; }
  .pt-table td.pt-price a strong { font-size: 13px; }
}

@media (max-width: 480px) {
  .compare-table th,
  .compare-table td { padding: 8px 10px; font-size: 13px; }
  .compare-table { font-size: 13px; }
}

/* ─── MODAL COMPACT ON MOBILE ─── */
@media (max-width: 640px) {
  .modal-bg { padding: 12px; }
  .modal { padding: 28px 20px; }
  .modal-title { font-size: 20px; }
  .modal-x { top: 12px; right: 12px; }
}
@media (max-width: 400px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: calc(100svh - 40px); overflow-y: auto; }
}

/* ─── FAQ: 3-col → 1-col collapse ─── */
@media (max-width: 1024px) {
  .faq-2col { grid-template-columns: 1fr; }
}

/* ─── TOUCH DEVICES — disable hover animations ─── */
@media (hover: none) {
  .srv-rib-item:hover { transform: none; }
  .gal-item:hover { transform: none; }
  .brand-card:hover { transform: none; }
  .rating-card:hover { transform: none; }
  .dev-cat:hover { transform: none; }
  .adev-rc:hover { transform: none; }
}

/* ─── B2B HERO (HeroB2B) ─── */
@media (max-width: 1024px) {
  .hero-b2b-visual { display: none; }
}
@media (max-width: 768px) {
  .hero-b2b-trust {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 8px !important;
  }
}

/* ─── PARTNER PITCH ─── */
@media (max-width: 768px) {
  .partner-pitch-advantages {
    grid-template-columns: 1fr !important;
  }
  .partner-pitch-steps {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 480px) {
  .partner-pitch-steps {
    grid-template-columns: 1fr !important;
  }
}

/* ─── SINGLE PARTNER CARD (малый город) ─── */
@media (max-width: 768px) {
  .single-partner-card {
    grid-template-columns: 1fr !important;
  }
  .single-partner-map {
    width: 100% !important;
    margin-top: 20px;
  }
  .single-partner-map iframe {
    width: 100% !important;
    height: 180px !important;
  }
}

/* ─── SEO MOSCOW TABS ─── */
@media (max-width: 768px) {
  .tabs-nav {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; }
  .districts-list { gap: 6px !important; padding: 12px 0 !important; }
  .district-tag { font-size: 13px !important; padding: 6px 12px !important; }
  .addr-grid { grid-template-columns: 1fr !important; }
  .seo-text { grid-template-columns: 1fr !important; }
}

/* ─── PARTNER LIST CARDS ─── */
@media (max-width: 768px) {
  .centers-grid { grid-template-columns: 1fr !important; }
  .center-card-footer { flex-direction: column; gap: 8px; }
}

/* ─── CITIES CLOUD ─── */
@media (max-width: 480px) {
  .cities-cloud .city-chip { font-size: 13px; padding: 6px 14px; }
}

/* ─── FOOTER ─── */
@media (max-width: 480px) {
  .footer-logo-desc { font-size: 13px; }
  .footer-nav-title { font-size: 12px; }
  .footer-link { font-size: 13px; }
}

/* ─── PARTNER CONTACT CARD (большая карточка контактов) ─── */
.partner-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.partner-contact-info {
  display: flex;
  flex-direction: column;
}
.partner-contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
}
@media (max-width: 900px) {
  .partner-contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .partner-contact-map {
    min-height: 260px;
  }
  .partner-contact-map iframe {
    min-height: 260px !important;
  }
}
@media (max-width: 480px) {
  .partner-contact-map {
    min-height: 220px;
  }
  .partner-contact-map iframe {
    min-height: 220px !important;
  }
}

/* ─── ДИЗАЙН-АУДИТ АПРЕЛЬ 2026 ─── */

/* #2 Hero B2B — убрать min-height 100vh, оставить нормальный padding */
.hero { min-height: 0 !important; }
@media (min-width: 1025px) {
  .hero { padding-top: 0; }
  .hero-inner { padding-top: 96px; padding-bottom: 96px; }
}

/* #3 PartnerPitch — кнопки в колонку на мобайле */
@media (max-width: 600px) {
  .partner-pitch-advantages > div:last-child > div[style*="flex"] {
    flex-direction: column !important;
  }
  .partner-pitch-advantages > div:last-child a {
    text-align: center !important;
    flex: 1 1 auto !important;
  }
}

/* #4 Hero trust — разделители между метриками */
@media (min-width: 769px) {
  .hero-b2b-trust { gap: 0 !important; }
  .hero-b2b-trust .h-trust-item {
    padding: 0 28px;
    border-right: 1px solid var(--border);
  }
  .hero-b2b-trust .h-trust-item:first-child { padding-left: 0; }
  .hero-b2b-trust .h-trust-item:last-child { border-right: none; }
}

/* #7 CitiesCloud — чипы крупнее на desktop */
@media (min-width: 769px) {
  .city-chip { font-size: 15px !important; }
  .city-chip:hover { background: var(--accent-l) !important; color: var(--accent) !important; border-color: var(--accent-l2) !important; }
}

/* #8 CTA — кнопка синяя (accent) */
.cta-section .btn-cta-1 {
  background: var(--accent);
  color: #fff;
}
.cta-section .btn-cta-1:hover {
  background: var(--accent-h);
}

/* #10 Hero-pill — чуть заметнее */
.hero-pill {
  background: var(--accent-l2) !important;
  border: 1px solid var(--accent-l2) !important;
}

/* #11 Тикер городов — анимация opacity при смене */
.hero-b2b-visual [style*="height: 44px"] > div {
  transition: opacity 0.25s ease;
}

/* #12 SeoMoscow — разделитель между колонками текста */
@media (min-width: 769px) {
  .seo-text { gap: 0 !important; }
  .seo-text-col:last-child {
    border-left: 1px solid var(--border);
    padding-left: 32px;
  }
  .seo-text-col:first-child { padding-right: 32px; }
}

/* #13 Footer mobile — 2 колонки навигации */
@media (max-width: 640px) {
  .footer-nav-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px 16px !important;
  }
}

/* #15 Hero h1 — мобайл letter-spacing мягче */
@media (max-width: 480px) {
  .hero-h1 { letter-spacing: -0.02em !important; }
}

/* Общий polish: hover на district-tag */
.district-tag:hover { background: var(--accent-l) !important; color: var(--accent) !important; border-color: var(--accent) !important; }

/* Partner contact card — кнопки в колонку на мобайле */
@media (max-width: 480px) {
  .partner-contact-info > div[style*="flex-wrap"] {
    flex-direction: column !important;
  }
  .partner-contact-info a[style*="inline-flex"] {
    justify-content: center;
  }
}
