:root{
  --blue:#007bff;
  --blue-dark:#0056b3;
  --blue-light:#eaf3ff;
  --text:#0a2b5e;
}

/* ===== Глобально: никаких вылезаний ===== */
*,
*::before,
*::after{ box-sizing:border-box; }
html,body{ width:100%; overflow-x:hidden; }
img,svg,video{ max-width:100%; height:auto; display:block; }

/* ===== База ===== */
body{
  margin:0;
  font-family:"Inter",system-ui,Segoe UI,Roboto,Arial,sans-serif;
  background:#f3f7ff;
  color:var(--text);
  display:flex; flex-direction:column; align-items:center;
}

/* ===== Шапка, привязана к ширине формы ===== */
.topbar{
  width:100%;
  display:flex; justify-content:center;
  background:#fff;
  border-bottom:1px solid #dce6ff;
  padding:10px 0;
}
.topbar__inner{
  width:420px; max-width:100%;
  display:flex; justify-content:space-between; align-items:center;
  padding:0 4px;
}
.brand{ font-weight:700; color:var(--blue); font-size:20px; }

/* ===== Языковые кнопки (эмодзи) — компактно ===== */
.lang-switch{
  display:flex; justify-content:center; align-items:center;
  gap:8px; flex-wrap:wrap; max-width:420px;
}
.lang-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:6px; line-height:1; white-space:nowrap;
  background:var(--blue-light);
  border:1px solid #d0e3ff; border-radius:8px;
  padding:6px 12px; font-weight:600; cursor:pointer;
  transition:background .25s;
  width:auto; min-width:70px;  /* не тянутся на всю ширину */
}
.lang-btn:hover{ background:#d0e3ff; }
.lang-btn[aria-pressed="true"]{ background:var(--blue); color:#fff; border-color:var(--blue); }

/* ===== Контент ===== */
.main{
  width:100%;
  display:flex; justify-content:center;
  margin-top:22px; padding:0 10px;
}
.card{
  width:420px; max-width:100%;
  background:#fff; border-radius:12px;
  box-shadow:0 3px 10px rgba(0,0,0,.1);
  padding:25px;
}

/* Жёсткая страховка от переполнений внутри карточки */
.card, .card *{ max-width:100%; }
input, button{ min-width:0; }

/* Заголовок */
h1{ text-align:center; color:var(--blue); margin:0 0 6px; }

/* Поля формы */
label{ display:block; margin-top:10px; font-weight:600; }
input{
  width:100%; padding:10px; margin-top:5px;
  border:1px solid #cdddf7; border-radius:6px; font-size:16px;
}
input:focus{ outline:none; border-color:var(--blue); }

/* Кнопка отправки */
.btn{
  width:100%; padding:12px; margin-top:15px;
  background:var(--blue); color:#fff; border:none; border-radius:8px;
  font-weight:700; cursor:pointer;
  transition:background .3s, transform .1s;
}
.btn:hover{ background:var(--blue-dark); }
.btn:active{ transform:scale(.98); }

/* Ответ */
#responseMessage{ text-align:center; margin-top:10px; font-weight:600; }

/* ===== Футер ===== */
.footer{
  width:100%;
  background:linear-gradient(90deg,#007bff 0%, #3399ff 50%, #0056b3 100%);
  color:#fff; text-align:center;
  padding:25px 10px; margin-top:40px;
  border-top:1px solid rgba(255,255,255,.3);
}
.footer h3{ margin:0; font-size:20px; font-weight:700; }
.footer p{ margin:6px 0; font-size:15px; opacity:.95; }
.phone-list{ margin-top:10px; }
.phone-list a{
  display:block; color:#fff; text-decoration:none; font-weight:700;
  margin:4px 0; transition:color .25s;
}
.phone-list a:hover{ color:#d0e3ff; }

/* Социконки Font Awesome — компактные кружки */
.socials{
  display:flex; justify-content:center; flex-wrap:wrap;
  gap:12px; margin-top:15px;
}
.socials a{
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.2); border:1px solid rgba(255,255,255,.35);
  color:#fff; font-size:18px; text-decoration:none;
  transition:background .25s, transform .15s;
}
.socials a:hover{ background:rgba(255,255,255,.35); transform:translateY(-2px); }
.footer-note{ margin-top:15px; font-size:14px; opacity:.9; }

/* ===== Мобайл-фиксы ===== */
@media (max-width:480px){
  .topbar__inner{ width:100%; padding:0 10px; }
  .card{ padding:20px; }
  .lang-btn{ font-size:14px; padding:5px 10px; }
  .socials a{ width:34px; height:34px; font-size:17px; }
  .footer{ padding:20px 8px; }
}

/* ===== Последние «анти-скролл» фиксы (держать внизу файла) ===== */
.card, .topbar__inner{ overflow:hidden; }          /* отрезаем внутренние хвосты */
body{ overscroll-behavior-x:none; }                /* запрет «толкать» горизонталь на мобилках */
