/* hpservice.ru — редизайн 2026, mobile-first.
   Палитра Леком: сине-графит + спокойный сине-серый акцент (эталон infobez, тема «Мягкий»). */

:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --ink: #212a38;
  --muted: #5a6374;
  --line: #e2e6ee;
  --brand: #33405a;        /* тёмные секции, футер */
  --brand-2: #3d4b68;
  --accent: #5f7ac2;       /* декор, рамки, иконки */
  --accent-strong: #4763a9; /* ссылки и кнопки: контраст к белому >= 4.5 */
  --accent-tint: #edf1fa;
  --ok: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(33, 42, 56, .07), 0 8px 24px rgba(33, 42, 56, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.55rem, 4.5vw, 2.25rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.logo-link { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-link img { height: 26px; width: auto; display: block; }
.logo-sub { font-size: .72rem; color: var(--muted); line-height: 1.2; max-width: 130px; display: none; }
@media (min-width: 480px) { .logo-sub { display: block; } }

.header-phone { margin-left: auto; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); white-space: nowrap;
  min-width: 44px; min-height: 44px; justify-content: center; padding: 0 6px; flex-shrink: 0; }
.header-phone svg { width: 18px; height: 18px; fill: var(--accent-strong); }
.header-phone .num { display: none; }
@media (min-width: 700px) { .header-phone .num { display: inline; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; border-radius: var(--radius); border: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.35;
  text-align: center; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #3b568f; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--accent-strong); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-tint); text-decoration: none; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: #e9edf7; text-decoration: none; }
.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-block; } }

/* Бургер */
.nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 9px; background: none; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Навигация */
.site-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.nav-open .site-nav { display: block; max-height: calc(100vh - 58px); overflow-y: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.site-nav li > a, .site-nav li > button.nav-sub-toggle {
  display: flex; align-items: center; width: 100%; text-align: left; padding: 11px 16px; color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.4;
  background: none; border: 0; cursor: pointer; }
.site-nav li > a:hover { background: var(--accent-tint); text-decoration: none; }
.nav-sub { display: none; list-style: none; margin: 0; padding: 0 0 6px; }
.nav-sub.open { display: block; }
/* стрелка у пунктов с подменю: без неё непонятно, что пункт раскрывается */
.nav-sub-toggle::after {
  content: ""; width: 0; height: 0; margin-left: 8px; opacity: .55;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor; transition: transform .15s; }
.nav-sub-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.nav-sub a { display: block; padding: 8px 16px 8px 30px; color: var(--muted); font-size: .93rem; }
.nav-sub a:hover { background: var(--accent-tint); text-decoration: none; }

@media (min-width: 1024px) {
  .site-nav { display: block; border-top: 1px solid var(--line); }
  .site-nav > .container > ul { display: flex; align-items: stretch; padding: 0; gap: 2px; }
  .site-nav li { position: relative; display: flex; }
  /* ссылки и кнопки-раскрывашки должны быть одной высоты и на одной базовой линии,
     иначе пункты «прыгают» (было: у button своя метрика) */
  .site-nav li > a, .site-nav li > button.nav-sub-toggle {
    display: flex; align-items: center; width: auto; padding: 12px 13px;
    white-space: nowrap; border-radius: 6px 6px 0 0; }
  .site-nav li > button.nav-sub-toggle::after { margin-left: 7px; }
  .site-nav li:hover > a, .site-nav li:hover > button.nav-sub-toggle { background: var(--accent-tint); }
  .nav-sub { display: none; position: absolute; left: 0; top: 100%; min-width: 250px;
    background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow); padding: 6px 0; }
  .site-nav li:hover > .nav-sub, .site-nav li:focus-within > .nav-sub { display: block; }
  .nav-sub a { padding: 8px 16px; }
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 14px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs .sep { margin: 0 6px; color: #b6bdc9; }

/* ---------- Секции ---------- */
.section { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 64px 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--brand); color: #e8ecf5; }
.section-dark h2 { color: #fff; }
.section-dark a { color: #b9c8ea; }

/* ---------- Герой ---------- */
.hero { padding: 36px 0 40px; }
@media (min-width: 900px) {
  .hero .hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
  .hero { padding: 56px 0 64px; }
}
.hero h1 { margin-bottom: .5em; }
.hero .lead { font-size: 1.06rem; color: var(--muted); max-width: 34em; margin: 0 0 1.4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-panel { margin-top: 28px; background: var(--brand); color: #e8ecf5; border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .hero-panel { margin-top: 0; } }
.hero-panel .hp-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.hero-panel .hp-item + .hp-item { border-top: 1px solid rgba(255, 255, 255, .12); }
.hero-panel .hp-item svg { width: 22px; height: 22px; flex-shrink: 0; fill: #9db4e8; margin-top: 2px; }
.hero-panel b { color: #fff; }

/* ---------- Карточки услуг ---------- */
.grid-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.card h3 { margin: 0 0 6px; color: var(--accent-strong); }
.card p { margin: 0; font-size: .92rem; color: var(--muted); }
.card .price-from { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .9rem; color: var(--ink); }

/* ---------- Таблицы (цены + legacy) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1em 0;
  /* тени-подсказки: справа/слева видно, что таблицу можно листать вбок */
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(33,42,56,.16), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(33,42,56,.16), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll; }
table.nice, .legacy-content table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .95rem; }
table.nice th, table.nice td, .legacy-content table th, .legacy-content table td {
  border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
table.nice th, .legacy-content table th { background: var(--accent-tint); font-weight: 600; }
table.nice tr:nth-child(even) td { background: #fafbfd; }

/* ---------- Статья / legacy-контент ---------- */
.page-main { padding: 8px 0 48px; }
@media (min-width: 1024px) {
  .page-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
}
.article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; margin-top: 16px; }
@media (min-width: 768px) { .article { padding: 32px 36px; } }
.article h1 { margin-top: 0; }
.legacy-content { max-width: 72ch; }
.legacy-content img { border-radius: 8px; margin: .5em 0; }
.legacy-content p { margin: .9em 0; }
.legacy-content li { margin: .35em 0; }
.legacy-content h2, .legacy-content h3 { margin-top: 1.4em; }
.legacy-content font { font-family: inherit !important; font-size: inherit !important; }

/* Сайдбар */
.sidebar { margin-top: 24px; }
@media (min-width: 1024px) { .sidebar { margin-top: 16px; position: sticky; top: 130px; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.side-box h3 { margin-top: 0; }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li { padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.side-box li:first-child { border-top: 0; }
.side-cta { background: var(--brand); color: #e8ecf5; border: 0; }
.side-cta h3 { color: #fff; }
.side-cta p { font-size: .92rem; }

/* CTA-блок после статьи */
.cta-strip { margin-top: 28px; background: var(--accent-tint); border: 1px solid #d8e0f2; border-radius: var(--radius);
  padding: 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.cta-strip p { margin: 0; font-weight: 600; }
.cta-strip .cta-note { font-weight: 400; font-size: .88rem; color: var(--muted); }

/* ---------- Форма заявки ---------- */
.lead-form { max-width: 560px; }
.lead-form label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 4px; }
.lead-form input[type=text], .lead-form input[type=tel], .lead-form input[type=email], .lead-form textarea {
  width: 100%; padding: 11px 12px; font-family: inherit; font-size: 16px; line-height: 1.4; color: var(--ink);
  border: 1.5px solid #c9d1de; border-radius: 8px; background: #fff; }
.lead-form input:focus, .lead-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.lead-form .consent { display: flex; gap: 9px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: 14px 0; font-weight: 400; }
.lead-form .consent input { margin-top: 3px; }
.form-msg { margin-top: 12px; font-weight: 600; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: #b3352e; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Автоподсказки DaData */
.sug-wrap { position: relative; }
.sug-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff;
  border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: var(--shadow); max-height: 230px; overflow-y: auto; }
.sug-list div { padding: 8px 12px; cursor: pointer; font-size: .93rem; }
.sug-list div:hover { background: var(--accent-tint); }

/* ---------- Контакты ---------- */
.addr-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .addr-grid { grid-template-columns: 1fr 1fr; } }
.addr-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.addr-card h3 { margin-top: 0; }
.addr-card p { margin: .4em 0; font-size: .95rem; }
.addr-card .muted { color: var(--muted); font-size: .88rem; }

/* ---------- Модалка квиза ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(23, 30, 44, .6); display: none; }
.modal-overlay.open { display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal-box { position: relative; width: 100%; max-width: 720px; height: min(86vh, 700px);
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal-box iframe { width: 100%; height: 100%; border: 0; }
.modal-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }

/* ---------- Футер ---------- */
.site-footer { background: var(--brand); color: #c3cbdd; font-size: .92rem; margin-top: 48px; }
.site-footer a { color: #c3cbdd; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; gap: 28px; padding: 40px 0 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-top h4 { color: #fff; font-size: .95rem; margin: 0 0 10px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { padding: 3px 0; }
.footer-logo img { height: 24px; width: auto; }
.footer-about { margin-top: 12px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding: 18px 0 22px; }
.footer-bottom .disclaimer { font-size: .8rem; color: #97a2ba; max-width: 760px; margin: 0 0 10px; }
.footer-slogan { font-family: Caveat, cursive; font-size: 1.45rem; color: var(--ok); cursor: pointer; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }

/* Админ-модалка (слоган) */
.admin-modal { position: fixed; inset: 0; z-index: 95; background: rgba(23, 30, 44, .6); display: none; align-items: center; justify-content: center; padding: 16px; }
.admin-modal.open { display: flex; }
.admin-card { background: #fff; color: var(--ink); border-radius: 12px; padding: 24px; max-width: 420px; width: 100%; }
.admin-card h3 { margin-top: 0; }
.admin-card input { width: 100%; padding: 10px; border: 1.5px solid #c9d1de; border-radius: 8px;
  font-family: inherit; font-size: 16px; }
.admin-card .row { display: flex; gap: 10px; margin-top: 14px; }

/* Cookie-баннер (152-ФЗ) */
#lekom-cookie-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 480px; margin: auto;
  padding: 18px 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .16);
  border-radius: 12px; z-index: 99; display: none; }
#lekom-cookie-banner p { margin: 0 0 12px; font-size: .85rem; }
#lekom-cookie-banner button { margin-right: 10px; }

/* Кнопка «наверх» на длинных статьях не нужна: страницы короткие. */

.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
