/* Главная страница, новый дизайн. Подключается ПОСЛЕ main.css только на главной (templates/products/home_page.html).
   Все классы начинаются с hv2- и действуют внутри .hv2, остальные страницы сайта не затрагиваются.
   Откат: убрать строку <link ... home-v2.css> из home_page.html. */

.hv2 {
    --hv2-accent: #0b6bf0;
    --hv2-accent-dark: #0954c0;
    --hv2-accent-soft: #eaf2ff;
    --hv2-ink: #14202e;
    --hv2-muted: #5b6675;
    --hv2-line: #e3e8ef;
    --hv2-bg: #f5f7fa;
    --hv2-card: #ffffff;
    --hv2-radius: 16px;
    --hv2-shadow: 0 1px 2px rgba(20, 32, 46, .05), 0 8px 24px rgba(20, 32, 46, .06);
    color: var(--hv2-ink);
    font-size: 16px;
    line-height: 1.55;
}

.hv2 *,
.hv2 *::before,
.hv2 *::after {
    box-sizing: border-box;
}

.hv2 a {
    color: var(--hv2-accent);
}

.hv2 h1,
.hv2 h2,
.hv2 h3 {
    color: var(--hv2-ink);
    letter-spacing: -.01em;
    margin: 0;
}

.hv2-section {
    padding: 48px 0;
}

.hv2-section--tint {
    background: var(--hv2-bg);
}

.hv2-head {
    margin-bottom: 28px;
}

.hv2-head h2 {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.hv2-head p {
    margin: 8px 0 0;
    color: var(--hv2-muted);
    font-size: 16px;
}

/* ---------- Первый экран ---------- */

.hv2-hero {
    background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
    padding: 44px 0 36px;
    border-bottom: 1px solid var(--hv2-line);
}

.hv2-hero h1 {
    font-size: 40px;
    line-height: 1.12;
    font-weight: 800;
    max-width: 18em;
}

.hv2-hero__lede {
    margin: 14px 0 28px;
    max-width: 38em;
    color: var(--hv2-muted);
    font-size: 18px;
}

.hv2-form {
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: 20px;
    box-shadow: var(--hv2-shadow);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.hv2-field {
    min-width: 0;
}

.hv2-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hv2-muted);
}

.hv2-field select,
.hv2-field .jq-selectbox,
.hv2-field .jq-selectbox__select {
    width: 100% !important;
    max-width: 100%;
}

.hv2-field select {
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--hv2-line);
    border-radius: 12px;
    background-color: #fff;
    color: var(--hv2-ink);
    font-size: 15px;
}

.hv2-field select:focus {
    outline: 2px solid var(--hv2-accent);
    outline-offset: 1px;
}

.hv2 .hv2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: var(--hv2-accent);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}

.hv2 .hv2-btn:hover {
    background: var(--hv2-accent-dark);
}

.hv2 .hv2-btn:active {
    transform: translateY(1px);
}

.hv2 .hv2-btn--ghost {
    background: transparent;
    color: var(--hv2-accent) !important;
    border: 1px solid var(--hv2-accent);
}

.hv2 .hv2-btn--ghost:hover {
    background: var(--hv2-accent-soft);
}

.hv2 .hv2-btn--small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 10px;
}

.hv2-hero__phone {
    margin-top: 16px;
    color: var(--hv2-muted);
    font-size: 15px;
}

.hv2-hero__phone a {
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Плюсы ---------- */

.hv2-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 28px 0 8px;
}

.hv2-point {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: var(--hv2-radius);
}

.hv2-point i {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--hv2-accent-soft);
    color: var(--hv2-accent);
    font-size: 18px;
}

.hv2-point h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.hv2-point p {
    margin: 0;
    color: var(--hv2-muted);
    font-size: 14px;
}

/* ---------- Категории ---------- */

.hv2-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.hv2-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: var(--hv2-radius);
    color: var(--hv2-ink) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.hv2-card:hover {
    border-color: var(--hv2-accent);
    box-shadow: var(--hv2-shadow);
    transform: translateY(-2px);
}

.hv2-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--hv2-accent-soft);
    color: var(--hv2-accent);
    font-size: 20px;
}

.hv2-card__name {
    font-size: 17px;
    font-weight: 700;
}

.hv2-card__note {
    color: var(--hv2-muted);
    font-size: 14px;
}

/* ---------- Услуги и цены ---------- */

.hv2-price {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: var(--hv2-radius);
}

.hv2-price__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hv2-price__top i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--hv2-accent-soft);
    color: var(--hv2-accent);
}

.hv2-price h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.hv2-price {
    min-width: 0;
}

.hv2-price__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--hv2-line);
}

.hv2-price__sum {
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

/* ---------- Информационные блоки ---------- */

.hv2-text {
    max-width: 760px;
}

.hv2-text p {
    margin: 0 0 12px;
    color: #2b3644;
    font-size: 16px;
}

.hv2-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    counter-reset: hv2step;
}

.hv2-steps li {
    counter-increment: hv2step;
    position: relative;
    padding: 20px 20px 20px 20px;
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: var(--hv2-radius);
    font-size: 15px;
    color: #2b3644;
}

.hv2-steps li::before {
    content: counter(hv2step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--hv2-accent);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}

.hv2-steps strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
    color: var(--hv2-ink);
}

.hv2-centers {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.hv2-centers li {
    padding: 14px 16px;
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: 14px;
    font-size: 15px;
}

.hv2-centers strong {
    display: block;
}

/* ---------- Вопросы и ответы ---------- */

.hv2-faq {
    max-width: 820px;
}

.hv2-faq details {
    background: var(--hv2-card);
    border: 1px solid var(--hv2-line);
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 0 18px;
}

.hv2-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 28px 16px 0;
    position: relative;
    font-size: 16px;
    font-weight: 700;
    color: var(--hv2-ink);
}

.hv2-faq summary::-webkit-details-marker {
    display: none;
}

.hv2-faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: var(--hv2-accent);
}

.hv2-faq details[open] summary::after {
    content: "\2212";
}

.hv2-faq details p {
    margin: 0 0 16px;
    color: #2b3644;
    font-size: 15px;
}

/* ---------- Призыв внизу ---------- */

.hv2-cta {
    margin: 8px 0 48px;
    padding: 32px;
    border-radius: 20px;
    background: var(--hv2-accent);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.hv2-cta h2 {
    color: #fff;
    font-size: 26px;
    line-height: 1.2;
}

.hv2-cta p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .85);
}

.hv2-cta .hv2-btn {
    background: #fff;
    color: var(--hv2-accent) !important;
}

.hv2-cta .hv2-btn:hover {
    background: var(--hv2-accent-soft);
}

.hv2-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hv2-cta__phone {
    color: #fff !important;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    text-decoration: none !important;
}

/* ---------- Планшет и телефон ---------- */

@media (max-width: 991px) {
    .hv2-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hv2-form .hv2-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hv2-points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .hv2-hero {
        padding: 28px 0 24px;
    }

    .hv2-hero h1 {
        font-size: 28px;
    }

    .hv2-hero__lede {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hv2-form {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 16px;
    }

    .hv2-section {
        padding: 32px 0;
    }

    .hv2-head h2 {
        font-size: 22px;
    }

    .hv2-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .hv2-card {
        padding: 14px;
    }

    .hv2-cards--prices {
        grid-template-columns: 1fr;
    }

    .hv2-cta {
        padding: 22px;
    }

    .hv2-cta h2 {
        font-size: 22px;
    }

    .hv2-cta .hv2-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hv2 * {
        transition: none !important;
    }
}
/* ---------- HEADER STYLES ---------- */
.header-aggregator {
  background: #ffffff;
  border-bottom: 1px solid var(--hv2-line, #e3e8ef);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(20, 32, 46, 0.04);
}

.header-top {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo {
  text-decoration: none !important;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-main { color: #14202e; }
.logo-domain { color: #0b6bf0; }

.badge-aggregator {
  font-size: 11px;
  background: #eaf2ff;
  color: #0b6bf0;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.location-dropdown-wrapper { position: relative; }

.location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #e3e8ef;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #14202e;
  cursor: pointer;
}

.location-btn .icon-geo { color: #0b6bf0; }
.location-btn .icon-arrow { font-size: 11px; color: #5b6675; transition: transform 0.2s; }
.location-dropdown-wrapper.open .icon-arrow { transform: rotate(180deg); }

.city-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 100;
}

.location-dropdown-wrapper.open .city-dropdown-menu { display: block; }

.city-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.city-option:hover, .city-option.active {
  background: #eaf2ff;
  color: #0b6bf0;
}

.city-badge {
  font-size: 10px;
  background: #e3e8ef;
  color: #5b6675;
  padding: 1px 5px;
  border-radius: 4px;
}

.smart-search-box {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #f5f7fa;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 8px 12px;
}

.search-input-wrapper input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  margin-left: 8px;
  font-size: 14px;
}

.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 12px;
  z-index: 90;
}

.smart-search-box:focus-within .search-dropdown { display: block; }

.group-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #5b6675;
  font-weight: 700;
  margin: 6px 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none !important;
  color: #14202e;
  font-size: 13.5px;
}

.search-result-item:hover { background: #f5f7fa; }
.item-title { flex: 1; margin-left: 8px; font-weight: 500; }
.item-price { font-size: 12px; font-weight: 600; color: #059669; }
.item-status { font-size: 11px; color: #16a34a; background: #dcfce7; padding: 2px 6px; border-radius: 4px; }

.header-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phone-number {
  font-size: 15px;
  font-weight: 700;
  color: #14202e !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.social-messengers { display: flex; gap: 6px; }

.msg-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  text-decoration: none !important;
}

.msg-icon.tg { background: #24A1DE; }
.msg-icon.wa { background: #25D366; }

.btn-callback {
  background: #0b6bf0;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.header-nav {
  padding: 8px 0;
  background: #ffffff;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  text-decoration: none !important;
  color: #14202e !important;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
}

.nav-item:hover, .nav-item.active { color: #0b6bf0 !important; }

.nav-item.highlight {
  background: #eaf2ff;
  color: #0b6bf0 !important;
  font-weight: 600;
}
