/* АвтоПерегон PRO — styles.css
   Mobile-first, fast, no frameworks
*/
:root {
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --muted2: rgba(255,255,255,0.55);
  --line: rgba(255,255,255,0.12);
  --accent: #7c5cff;
  --accent2: #34d399;
  --danger: #fb7185;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 26px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 30% 0%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(52,211,153,.25), transparent 55%),
    radial-gradient(900px 700px at 50% 105%, rgba(124,92,255,.22), transparent 55%),
    var(--bg);
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section.tight { padding: 36px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.header {
  /* Header is a normal part of the page (not fixed / not auto-hiding) */
  position: relative;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11,18,32,0.70);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-top: env(safe-area-inset-top);
}



.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: .2px;
}
.brand .logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(52,211,153,1));
  box-shadow: 0 12px 28px rgba(124,92,255,.25);

  display: grid;
  place-items: center;
}
.logo::after{
  content:"AP";
  color: rgba(255,255,255,0.92);
  font-weight: 900;
  letter-spacing: -0.06em;
  font-size: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.brand .name { display: flex; flex-direction: column; line-height: 1.05; }
.brand .name small { font-weight: 700; color: var(--muted2); font-size: 12px; }

.navlinks { display: none; gap: 18px; align-items: center; }
.navlinks a { color: var(--muted); font-weight: 700; font-size: 14px; }
.navlinks a:hover { color: var(--text); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-hours {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22);}
.btn:active { transform: translateY(0px); }
.btn.primary {
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(124,92,255,.75));
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 18px 55px rgba(124,92,255,.22);
}
.btn.primary:hover { background: linear-gradient(135deg, rgba(124,92,255,1), rgba(52,211,153,.95)); }
.btn.success {
  background: linear-gradient(135deg, rgba(52,211,153,1), rgba(52,211,153,.75));
  border-color: rgba(52,211,153,.55);
  box-shadow: 0 18px 55px rgba(52,211,153,.18);
}
.btn.ghost { background: transparent; border-color: rgba(255,255,255,0.18); }
.btn.small { padding: 10px 12px; border-radius: 12px; font-weight: 800; }
.btn.wide { width: 100%; }
.btn .icon { width: 18px; height: 18px; display: inline-block; }

.hero { padding: 26px 0 10px; }

.hero.hero--bg{
  position: relative;
  padding: 32px 0 14px;
  background:
    linear-gradient(180deg, rgba(11,18,32,.78) 0%, rgba(11,18,32,.60) 45%, rgba(11,18,32,.92) 100%),
    url("../img/hero-road-wide.webp") center/cover no-repeat;
}
.hero.hero--bg::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(800px 520px at 20% 20%, rgba(124,92,255,.32), transparent 60%),
    radial-gradient(800px 520px at 80% 10%, rgba(52,211,153,.22), transparent 55%);
  pointer-events:none;
}
.hero.hero--bg > .container{ position: relative; z-index: 1; }
.hero.hero--bg .hero-card{ background: rgba(11,18,32,.45); border-color: rgba(255,255,255,.16); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.hero-card {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}
.hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(26px, 4.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}
.hero p { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.hero .bullets { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0 18px; }
.bullet {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.bullet .dot {
  width: 10px; height: 10px; border-radius: 999px; margin-top: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.bullet b { display: block; }
.bullet span { color: var(--muted); font-weight: 650; font-size: 14px; }

.hero-cta { display: grid; grid-template-columns: 1fr; gap: 10px; }
.trust-strip { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.trust-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.trust-item b { font-size: 14px; }
.trust-item small { color: var(--muted2); font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.card {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.28);
}
.card h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -0.2px; }
.card p { margin: 0 0 12px; color: var(--muted); }
.hr { height: 1px; background: rgba(255,255,255,0.10); margin: 12px 0; }

.kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kpi .k { padding: 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04); }
.kpi .k b { display: block; font-size: 18px; }
.kpi .k small { color: var(--muted2); font-weight: 750; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.step {
  display: flex;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  padding: 14px;
}
.step .num {
  width: 34px; height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(52,211,153,1));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
}
.step b { display: block; margin-bottom: 2px; }
.step span { color: var(--muted); font-weight: 650; font-size: 14px; }

.form {
  display: grid;
  gap: 10px;
}
.field {
  display: grid;
  gap: 6px;
}
label { color: var(--muted); font-weight: 750; font-size: 13px; }
input, select, textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  outline: none;
}

/* Checkbox label (outside modal) */
.check{ display:flex; align-items:flex-start; gap:10px; color: var(--muted2); font-weight: 750; font-size: 13px; }
.check input{ width: 18px; height: 18px; padding: 0; margin-top: 2px; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.45); }
input:focus, select:focus, textarea:focus { border-color: rgba(124,92,255,.7); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
textarea { min-height: 92px; resize: vertical; }
/* Fix: читаемость выпадающих списков (ПК) */
select option {
  background: #0b1020;
  color: #eaf0ff;
}
select option:checked {
  background: #1f2a44;
  color: #ffffff;
}


.result {
  border-radius: 18px;
  border: 1px solid rgba(52,211,153,0.35);
  background: rgba(52,211,153,0.08);
  padding: 14px;
}
.result b { font-size: 18px; }
.result p { margin: 6px 0 0; color: var(--muted); }

.note {
  color: var(--muted2);
  font-weight: 700;
  font-size: 13px;
}

.compare {
  display: grid;
  gap: 10px;
}
.compare .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare .cell {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 12px;
}
.compare .cell h3 { margin: 0 0 6px; font-size: 15px; }
.compare .cell p { margin: 0; color: var(--muted); font-size: 13.5px; }

.faq details {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  padding: 12px 14px;
}
.faq summary {
  cursor: pointer;
  font-weight: 850;
}
.faq p { color: var(--muted); margin: 10px 0 0; }

.footer {
  padding: 30px 0;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: var(--muted);
  font-weight: 700;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.footer a { color: rgba(255,255,255,0.85); }
.footer small { color: var(--muted2); font-weight: 750; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  font-weight: 800;
  color: rgba(255,255,255,0.86);
}

.float-contact{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
}
.float-contact .chip{
  display: none;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(11,18,32,.82);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  color: rgba(255,255,255,.92);
  font-weight: 850;
}
.float-contact .fab{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(11,18,32,.86);
  color: rgba(255,255,255,.95);
  font-weight: 950;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0,0,0,.38);
}
.float-contact .fab:hover{ filter: brightness(1.02); }

/* стильные иконки на кнопке "Связаться" */
.float-contact .fab .fab-icons{ display:inline-flex; gap:6px; align-items:center; }
.float-contact .fab .logo{
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}
.float-contact .fab .logo svg{ width: 14px; height: 14px; fill: #fff; }
.float-contact .fab .logo.tg{ background: #2AABEE; border-color: rgba(255,255,255,0.10); }
.float-contact .fab .logo.vk{ background: #0077FF; border-color: rgba(255,255,255,0.10); }
.float-contact .fab .logo.ph{ background: rgba(34,197,94,.95); border-color: rgba(255,255,255,0.12); }
.float-contact .fab .fab-label{ font-weight: 950; letter-spacing: -0.2px; }

/* внешний вид кнопки "Связаться": только градиентный текст (без иконок) */
.float-contact .fab--contact .fab-label--gradient{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* меню связи: иконки + подсказки при наведении */
.float-contact .menu.menu--icons{
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.float-contact .menu.menu--icons .fab-ic{
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.float-contact .menu.menu--icons .fab-ic:hover{ background: rgba(255,255,255,0.09); }

.float-contact .menu.menu--icons .icon{
  margin: 0;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  position: relative;
}
.float-contact .menu.menu--icons .icon svg{ width: 18px; height: 18px; }

/* tooltip */
.float-contact .menu.menu--icons .icon[data-tip]::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(2px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(11,18,32,.94);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  font-weight: 850;
  font-size: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.40);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10;
}
.float-contact .menu.menu--icons .icon[data-tip]::before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255,255,255,0.14);
  opacity: 0;
  transition: opacity .18s ease;
}
.float-contact .menu.menu--icons .icon[data-tip]:hover::after{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.float-contact .menu.menu--icons .icon[data-tip]:hover::before{ opacity: 1; }

.float-contact .menu{
  position: absolute;
  right: 0;
  bottom: 56px;
  width: 238px;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(11,18,32,.86);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.float-contact.open .menu{ display: flex; }
.float-contact .menu .btn{ border-radius: 14px; padding: 10px 12px; }
.float-contact .menu .btn .icon{
  margin-right: 10px;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.float-contact .menu .btn .icon svg{ width: 14px; height: 14px; fill: #fff; }
.float-contact .menu .btn .icon.tg{ background:#2AABEE; border-color: rgba(255,255,255,0.10); }
.float-contact .menu .btn .icon.vk{ background:#0077FF; border-color: rgba(255,255,255,0.10); }
.float-contact .menu .btn .icon.ph{ background: rgba(34,197,94,.95); border-color: rgba(255,255,255,0.12); }
.float-contact .menu .btn .icon.max{ background: rgba(255,255,255,0.10); }

/* Overrides for icon menu (placed after base menu rules) */
.float-contact .menu.menu--icons{
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.float-contact .menu.menu--icons .fab-ic{
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.float-contact .menu.menu--icons .fab-ic:hover{ background: rgba(255,255,255,0.09); }
.float-contact .menu.menu--icons .icon{
  margin: 0;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  position: relative;
}
.float-contact .menu.menu--icons .icon svg{ width: 18px; height: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(11,18,32,.92);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  display: none;
  z-index: 70;
  max-width: calc(100% - 30px);
}

@media (min-width: 820px) {
  .navlinks { display: flex; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
  .hero-cta { grid-template-columns: 1fr 1fr; }
  .hero .bullets { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.1fr 0.9fr 1fr; }
  .float-contact .chip { display: inline-flex; }
}

/* Desktop/tablet header: keep CTA buttons (incl. Calculator + theme toggle) visible
   even when the navigation grows and would otherwise overflow. */
@media (max-width: 1600px) and (min-width: 821px) {
  .nav { flex-wrap: wrap; }
  .brand { order: 1; }
  .nav-cta {
    order: 2;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .navlinks {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 16px;
  }
  .nav-cta .btn {
    font-size: 12.5px;
    padding: 10px 12px;
  }
}

/* Simple auth pages */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 22px 0;
}
.auth-card { max-width: 520px; width: 100%; }

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
}
.table th, .table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  font-size: 14px;
}
.table th { color: rgba(255,255,255,0.88); font-weight: 900; }
.table td { color: var(--muted); font-weight: 750; }

kbd {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 900;
  color: rgba(255,255,255,0.88);
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  margin: 10px 0 8px;
  color: rgba(255,255,255,0.75);
}
.footer-links a{
  opacity: .9;
  border-bottom: 1px dashed rgba(255,255,255,0.25);
}
.footer-links a:hover{ opacity: 1; }


/* Loading state for buttons */
.btn.is-loading{opacity:.85; pointer-events:none;}
.btn.is-loading::after{content:"";display:inline-block;width:14px;height:14px;margin-left:10px;vertical-align:-2px;border:2px solid currentColor;border-top-color:transparent;border-right-color:transparent;border-radius:50%;animation:pmspin .8s linear infinite;}
@keyframes pmspin{to{transform:rotate(360deg)}}

/* UI tweak: improve button label contrast on desktop */
.btn.primary,
.btn.success {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.20);
}


/* Mobile header fixes: keep CTA visible and phone in one line */
@media (max-width: 820px) {
.nav { flex-wrap: wrap; justify-content: center; }
  .brand { flex: 1 1 100%; justify-content: center; }
  .nav-cta {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-cta .btn {
    font-size: 12.5px;
    padding: 9px 10px;
    border-radius: 14px;
  }
  /* phone button: don't break on hyphens */
  .nav-cta .btn.ghost {
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }
}

/* Anchor usability: smooth scroll + offset for sticky header */
html { scroll-behavior: smooth; }
section[id], .card[id], footer[id] { scroll-margin-top: 16px; }



/* --- Platform additions (multi-page) --- */
.nav-toggle{
  display:none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.92);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}
@media (max-width: 820px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .navlinks{ display:none; width:100%; padding: 10px 0; flex-wrap: wrap; justify-content: center; }
  body.nav-open .navlinks{ display:flex; }
  body.nav-open .navlinks a{ padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.03); }
}

/* Buttons: more premium feel */
.btn{ position: relative; overflow: hidden; }
.btn::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: translateX(-120%);
  transition: transform .65s ease;
}
.btn:hover::before{ transform: translateX(120%); }
.btn.primary{ box-shadow: 0 14px 34px rgba(124,92,255,.25); }
.btn.success{ box-shadow: 0 14px 34px rgba(52,211,153,.18); }

/* Routes index cards */
.route-card{ text-decoration:none; color: inherit; }
.route-card .route-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.route-card .route-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top: 10px; }
.route-card .route-actions .btn{ pointer-events:none; opacity:.85; }

/* Reviews */
.review-card .review-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }



/* --- Callback request (floating "Заказать звонок") --- */
.float-callback{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1200;
}
.float-callback .fab.callback{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(124,92,255,.98), rgba(52,211,153,.82));
  color: rgba(255,255,255,0.95);
  font-weight: 950;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(0,0,0,.38);
  transition: transform .15s ease, filter .15s ease;
}
.float-callback .fab.callback:hover{ transform: translateY(-1px); filter: brightness(1.02); }
.float-callback .fab.callback:active{ transform: translateY(0px) scale(.99); }
.float-callback .fab.callback .icon{ font-size: 16px; }

@media (max-width: 820px){
  .float-callback{ left: 14px; bottom: 14px; }
  .float-callback .fab.callback{ padding: 12px 12px; border-radius: 16px; }
}
@media (max-width: 420px){
  /* чтобы не мешать системным кнопкам на телефоне */
  .float-callback{ bottom: 78px; }
}

/* --- Modal --- */
.modal{ position: fixed; inset: 0; z-index: 2000; display: none; }
.modal.open{ display: block; }
.modal .modal-backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.66);
  backdrop-filter: blur(8px);
}
.modal .modal-dialog{
  position: relative;
  max-width: 560px;
  margin: 8vh auto;
  border-radius: 24px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,14,26,0.92);
  box-shadow: 0 26px 90px rgba(0,0,0,.55);
}
.modal .modal-close{
  position: absolute;
  right: 12px; top: 10px;
  width: 40px; height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  font-size: 22px;
  cursor: pointer;
}
.modal .modal-close:hover{ background: rgba(255,255,255,0.10); }
.modal .muted{ color: var(--muted); font-weight: 700; }
.modal .grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal .label{
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
}
.modal .check{ display:flex; align-items:flex-start; gap:10px; color: var(--muted2); font-weight: 750; font-size: 13px; }
.modal .check input{ width: 18px; height: 18px; margin-top: 2px; }

@media (max-width: 640px){
  .modal .modal-dialog{ margin: 10vh 14px; }
  .modal .grid2{ grid-template-columns: 1fr; }
}

/* --- Fix: center single hero grid (routes/blog/etc.) --- */
.hero-grid--single{
  grid-template-columns: 1fr;
  justify-items: center;
}
.hero-grid--single .hero-card{
  width: 100%;
  max-width: 860px;
}
@media (min-width: 820px){
  .hero-grid.hero-grid--single{
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

/* --- Route map block --- */
.route-map{
  width: 100%;
  height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.route-map-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.route-cities{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* --- Directions & distance calculator (routes/index.html) --- */
.routecalc-fields{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 820px){
  .routecalc-fields{ grid-template-columns: 1fr 1fr 0.7fr 0.7fr; }
}

.routecalc-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 820px){
  .routecalc-grid{ grid-template-columns: 1.25fr 0.75fr; }
}

.route-stops{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.route-stop{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}
.route-stop b{ font-size: 14px; }
.route-stop small{ color: var(--muted2); font-weight: 750; }
.route-stop .meta{ text-align:right; white-space: nowrap; }
@media (min-width: 820px){
  .route-map{ height: 420px; }
}


/* Fix: make official icons visible in icon-menu */
.float-contact .menu.menu--icons .icon{ display:grid; place-items:center; border:1px solid rgba(255,255,255,0.14); background:rgba(255,255,255,0.06); }
.float-contact .menu.menu--icons .icon svg{ fill:#fff; display:block; }
.float-contact .menu.menu--icons .icon.tg{ background:#2AABEE; border-color: rgba(255,255,255,0.10); }
.float-contact .menu.menu--icons .icon.vk{ background:#0077FF; border-color: rgba(255,255,255,0.10); }
.float-contact .menu.menu--icons .icon.ph{ background: rgba(34,197,94,.95); border-color: rgba(255,255,255,0.12); }
.float-contact .menu.menu--icons .icon.max{ background: rgba(255,255,255,0.10); }


/* --- Theme toggle + Light theme (dark ↔ light) --- */

/* Theme toggle button in header */
.btn.theme-toggle{
  width: 44px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1;
}

/* Safe-area friendly floating buttons + alignment on mobile */
.float-contact{
  bottom: calc(14px + env(safe-area-inset-bottom));
}
.float-callback{
  bottom: calc(18px + env(safe-area-inset-bottom));
}
@media (max-width: 820px){
  .float-callback{ bottom: calc(14px + env(safe-area-inset-bottom)); }
}
/* Override earlier mobile rule that подняло кнопку выше */
@media (max-width: 420px){
  .float-callback{ bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* Light theme palette */
:root[data-theme="light"]{
  --bg: #f7f8fc;
  --panel: rgba(12,18,32,0.05);
  --panel2: rgba(12,18,32,0.08);
  --text: rgba(12,18,32,0.92);
  --muted: rgba(12,18,32,0.70);
  --muted2: rgba(12,18,32,0.55);
  --line: rgba(12,18,32,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,.12);
}

html[data-theme="light"] body{
  background:
    radial-gradient(1200px 800px at 30% 0%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(52,211,153,.14), transparent 55%),
    radial-gradient(900px 700px at 50% 105%, rgba(124,92,255,.12), transparent 55%),
    var(--bg);
}

/* Header + nav */
html[data-theme="light"] .header{
  background: rgba(247,248,252,0.78);
  border-bottom: 1px solid rgba(12,18,32,0.10);
}
html[data-theme="light"] .nav-toggle{
  border-color: rgba(12,18,32,0.14);
  background: rgba(255,255,255,0.78);
  color: rgba(12,18,32,0.92);
}
@media (max-width: 820px){
  html[data-theme="light"] body.nav-open .navlinks a{
    border-color: rgba(12,18,32,0.14);
    background: rgba(12,18,32,0.04);
  }
}

/* Common panels/cards */
html[data-theme="light"] .badge{
  border-color: rgba(12,18,32,0.12);
  background: rgba(255,255,255,0.66);
}
html[data-theme="light"] .card,
html[data-theme="light"] .step,
html[data-theme="light"] .trust-item,
html[data-theme="light"] .kpi .k,
html[data-theme="light"] .compare .cell,
html[data-theme="light"] .faq details{
  border-color: rgba(12,18,32,0.12);
  background: rgba(255,255,255,0.66);
}
html[data-theme="light"] .hr{ background: rgba(12,18,32,0.10); }

/* Light theme: fix contrast for some labels/links */
html[data-theme="light"] .table th{ color: rgba(12,18,32,0.88); }
html[data-theme="light"] .table th,
html[data-theme="light"] .table td{ border-bottom-color: rgba(12,18,32,0.10); }

html[data-theme="light"] kbd{
  background: rgba(12,18,32,0.06);
  border-color: rgba(12,18,32,0.12);
  color: rgba(12,18,32,0.86);
}

html[data-theme="light"] .footer{ border-top-color: rgba(12,18,32,0.10); }
html[data-theme="light"] .footer a{ color: rgba(12,18,32,0.86); }
html[data-theme="light"] .footer b[style*="rgba(255,255,255"]{ color: rgba(12,18,32,0.92) !important; }
html[data-theme="light"] .footer-links{ color: rgba(12,18,32,0.72); }
html[data-theme="light"] .footer-links a{ border-bottom-color: rgba(12,18,32,0.25); }

html[data-theme="light"] .pill{
  border-color: rgba(12,18,32,0.12);
  background: rgba(12,18,32,0.04);
  color: rgba(12,18,32,0.86);
}

/* Buttons */
html[data-theme="light"] .btn{
  border-color: rgba(12,18,32,0.12);
  background: rgba(255,255,255,0.70);
  color: var(--text);
}
html[data-theme="light"] .btn:hover{
  background: rgba(255,255,255,0.84);
  border-color: rgba(12,18,32,0.18);
}
html[data-theme="light"] .btn.ghost{ background: transparent; }

/* Hero card */
html[data-theme="light"] .hero.hero--bg .hero-card{
  background: rgba(255,255,255,0.64);
  border-color: rgba(12,18,32,0.12);
}

/* Inputs */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  border-color: rgba(12,18,32,0.18);
  background: rgba(255,255,255,0.86);
  color: rgba(12,18,32,0.92);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color: rgba(12,18,32,0.45);
}
html[data-theme="light"] select option{
  background: #ffffff;
  color: #0c1220;
}

/* Result blocks */
html[data-theme="light"] .result{
  border-color: rgba(52,211,153,0.45);
  background: rgba(52,211,153,0.14);
}

/* Floating contact button/menu */
html[data-theme="light"] .float-contact .fab{
  background: rgba(255,255,255,0.86);
  border-color: rgba(12,18,32,0.14);
  color: rgba(12,18,32,0.92);
}
html[data-theme="light"] .float-contact .menu.menu--icons .fab-ic{
  background: rgba(255,255,255,0.86);
  border-color: rgba(12,18,32,0.14);
}
html[data-theme="light"] .float-contact .menu.menu--icons .fab-ic:hover{
  background: rgba(255,255,255,0.92);
}
html[data-theme="light"] .float-contact .menu.menu--icons .icon[data-tip]::after{
  background: rgba(255,255,255,0.96);
  border-color: rgba(12,18,32,0.14);
  color: rgba(12,18,32,0.92);
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
}
html[data-theme="light"] .float-contact .menu.menu--icons .icon[data-tip]::before{
  border-top-color: rgba(12,18,32,0.14);
}

/* Modal in light mode */
html[data-theme="light"] .modal .modal-backdrop{ background: rgba(0,0,0,0.42); }
html[data-theme="light"] .modal .modal-dialog{
  background: rgba(255,255,255,0.96);
  border-color: rgba(12,18,32,0.14);
  box-shadow: 0 26px 90px rgba(0,0,0,.20);
}
html[data-theme="light"] .modal .modal-close{
  background: rgba(12,18,32,0.06);
  border-color: rgba(12,18,32,0.12);
  color: rgba(12,18,32,0.86);
}

/* Light theme polish: add depth + gradients (keep dark theme unchanged) */
:root[data-theme="light"]{
  --panelGrad: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.68));
  --panelGradSoft: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.62));
  --btnGrad: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.72));
  --btnGradHover: linear-gradient(180deg, rgba(255,255,255,1), rgba(255,255,255,0.80));
  --softShadow: 0 16px 44px rgba(12,18,32,0.12);
}

html[data-theme="light"] .card,
html[data-theme="light"] .step,
html[data-theme="light"] .trust-item,
html[data-theme="light"] .kpi .k,
html[data-theme="light"] .compare .cell,
html[data-theme="light"] .faq details,
html[data-theme="light"] .hero-card,
html[data-theme="light"] .route-stop,
html[data-theme="light"] .bullet{
  background: var(--panelGrad);
  box-shadow: var(--softShadow);
}

/* Buttons: keep gradients visible in light theme (previous .btn override made them flat) */
html[data-theme="light"] .btn{
  background: var(--btnGrad);
  border-color: rgba(12,18,32,0.14);
  box-shadow: 0 10px 26px rgba(12,18,32,0.10);
}
html[data-theme="light"] .btn:hover{
  background: var(--btnGradHover);
  border-color: rgba(12,18,32,0.20);
}

html[data-theme="light"] .btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(52,211,153,0.92));
  border-color: rgba(124,92,255,0.30);
  color: rgba(255,255,255,0.98);
  text-shadow: 0 2px 14px rgba(0,0,0,0.14);
  box-shadow: 0 18px 55px rgba(124,92,255,0.22), 0 14px 42px rgba(52,211,153,0.10);
}
html[data-theme="light"] .btn.primary:hover{
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(124,92,255,0.78));
}
html[data-theme="light"] .btn.success{
  background: linear-gradient(135deg, rgba(52,211,153,1), rgba(124,92,255,0.88));
  border-color: rgba(52,211,153,0.30);
  color: rgba(255,255,255,0.98);
  text-shadow: 0 2px 14px rgba(0,0,0,0.14);
  box-shadow: 0 18px 55px rgba(52,211,153,0.18), 0 14px 42px rgba(124,92,255,0.10);
}
html[data-theme="light"] .btn.success:hover{
  background: linear-gradient(135deg, rgba(52,211,153,1), rgba(52,211,153,0.78));
}
html[data-theme="light"] .btn.ghost{
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.20));
  border-color: rgba(12,18,32,0.14);
  box-shadow: none;
}

/* Pills / small UI accents */
html[data-theme="light"] .pill{
  background: linear-gradient(180deg, rgba(124,92,255,0.10), rgba(52,211,153,0.06));
  border-color: rgba(12,18,32,0.12);
}

/* Inputs: slight depth */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

/* Result blocks: keep readable + not too flat */
html[data-theme="light"] .result{
  background: linear-gradient(180deg, rgba(52,211,153,0.18), rgba(52,211,153,0.10));
}

/* Header subtle gloss */
html[data-theme="light"] .header{
  background: linear-gradient(180deg, rgba(247,248,252,0.88), rgba(247,248,252,0.72));
}

/* =========================
   BLOG GRID FIX
   ========================= */
.blog-grid{
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
}
.post-card{
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.post-card .thumb{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-card .thumb img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.post-card .post-meta{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  flex: 1;
}
.post-card .post-meta b{
  line-height: 1.25;
  font-size: 1.05rem;
}
.post-card .post-meta p{
  margin: 0;
  opacity: .9;
  line-height: 1.4;
}
