/* mce.s-inform.net — лендинг сбора заявок на подключение к интернету.
   Дизайн-система снята с s-inform.net (css/main.css): брендовый красный #d00000,
   фон страницы #bc1718, «плита» контента #f5f5f5, Arial, скругления 15/20px,
   пунктирные разделители 2px dotted #ddd. Тяжёлый bg.jpg (853 КБ) не используем —
   в оригинале он лежит поверх заливки #bc1718, берём саму заливку. */

:root {
    --brand: #d00000;          /* основной красный (заголовки, кнопки, меню услуг) */
    --brand-dark: #bc1718;     /* фон страницы за «плитой» */
    --brand-edge: #ec5e4b;     /* рамка красной панели */
    --link: #157aa3;           /* ссылки */
    --link-underline: #b4d3df;
    --text: #303030;
    --text-muted: #444;
    --dotted: #939595;
    --plate: #f5f5f5;
    --panel: #f2f1f1;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
    margin: 0;
    min-height: 100%;
    /* В оригинале — bg.jpg 2880x1800 (853 КБ) с красными волнами поверх #bc1718.
       Воспроизводим тот же эффект градиентами: ~0.1% веса, тот же тон. */
    background:
        radial-gradient(ellipse at 20% 0%, rgba(214, 40, 40, .55) 0%, rgba(188, 23, 24, 0) 55%),
        radial-gradient(ellipse at 85% 75%, rgba(150, 12, 14, .55) 0%, rgba(188, 23, 24, 0) 55%),
        var(--brand-dark);
    background-attachment: fixed;
    color: var(--text);
    font: normal normal 14px/1.25 Arial, Tahoma, sans-serif;
}

img { border: 0; max-width: 100%; }

a { color: var(--link); text-decoration: underline; }
a:hover { text-decoration: none; }

p { font-size: 13px; color: var(--text-muted); padding: 5px 0; margin: 0; line-height: 1.6; }

h1, h2, h3 {
    color: var(--brand);
    margin: 0;
    padding: 15px 0 5px;
    font: normal normal 20px/1.25 Arial, Tahoma, sans-serif;
}
h1 { font-size: 20px; border-bottom: 2px dotted #ddd; margin: 0 0 5px; padding: 0 0 5px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

ul, ol { margin: 0; padding: 0 0 0 30px; }
li { line-height: 1.6; padding: 2px 0; font-size: 13px; color: var(--text-muted); }
address, em { font-style: normal; }

.dotted { margin: 20px 0; height: 0; border: 0; border-top: 2px dotted #ddd; font-size: 0; }

/* ---------- «плита» контента ---------- */

.body {
    min-width: 320px;
    max-width: 1250px;
    margin: 0 auto;
    background: var(--plate);
    box-shadow: 1px 0 3px rgba(0, 0, 0, .4);
    overflow: hidden;
}
.container { margin: 0 10px; }

/* ---------- шапка ---------- */

.header { position: relative; z-index: 2; }

.header .top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 25px 0 0;
}

.header .logo { display: flex; align-items: center; text-decoration: none; }
/* Отступ задаём margin, а не padding: при box-sizing:border-box padding у <img>
   с явным height="19" съедает всю высоту контента и картинка исчезает. */
.header .logo .name { margin: 4px 0 0 12px; }

.header .contacts {
    padding: 14px 0 0;
    font-size: 15px;
    color: var(--text);
    font-weight: bold;
    font-style: italic;
    text-align: right;
}
.header .contacts em { color: #a0a0a0; font-style: italic; }
/* Телефоны кликабельны (tel:), но выглядят как обычный текст, а не как ссылка. */
.header .contacts a,
.side-panel .phone a,
.footer .brand .phones a { color: inherit; text-decoration: none; border-bottom: 0; }
.header .contacts a:hover,
.side-panel .phone a:hover,
.footer .brand .phones a:hover { color: var(--brand); }
.header .contacts div { border-top: 1px dotted var(--dotted); padding: 4px 0; }
.header .contacts div:first-child { border-top: 0; }

/* красная панель — в оригинале это «меню услуг»; здесь несёт назначение страницы */
.service_bar {
    margin: 22px 0 0;
    padding: 10px 20px;
    border: 1px solid var(--brand-edge);
    border-radius: 15px 15px 0 0;
    background: var(--brand) url(../img/service_menu_bg.png) repeat-x left top;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .7);
    color: #fff;
}
.service_bar strong { display: block; font-size: 18px; font-weight: normal; line-height: 1.3; }
.service_bar span { display: block; font-size: 13px; padding: 3px 0 0; color: #ffd9d9; }

/* ---------- основная сетка ---------- */

.main {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4%;
    margin: 23px 0 0;
    align-items: flex-start;
}
/* min-width:0 обязателен: иначе min-content ширина содержимого (например таблицы)
   раздувает колонку шире вьюпорта, и .body{overflow:hidden} обрезает страницу справа. */
.article { flex: 1 1 66%; min-width: 0; }
.sidebar { flex: 0 1 29%; min-width: 0; }

/* Широкая таблица скроллится внутри себя, а не растягивает вёрстку. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- панель (паттерн .payments из оригинала) ---------- */

.panel {
    margin: 20px 0;
    padding: 10px 20px 20px;
    background: var(--panel) url(../img/payments_bg.jpg) repeat-x left top;
    border: 1px solid #fff;
    border-radius: 20px;
    box-shadow: 1px 1px 1px rgba(181, 181, 181, .8);
}
.panel > .title { font-size: 18px; color: var(--brand); padding: 5px 0 10px; }

/* ---------- список населённых пунктов ---------- */

.villages { width: 100%; border-collapse: collapse; margin: 5px 0 0; background: #fff; }
.villages caption {
    caption-side: bottom;
    text-align: left;
    font-size: 12px;
    color: #8a8a8a;
    font-style: italic;
    padding: 8px 0 0;
}
.villages th, .villages td { padding: 8px 10px; font-size: 13px; text-align: left; border-bottom: 1px dotted #cfcfcf; }
.villages thead th {
    background: #e8e8e8;
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 1px solid #cfcfcf;
}
.villages tbody tr:last-child td { border-bottom: 0; }
.villages td.date { white-space: nowrap; color: var(--brand); font-weight: bold; }
.villages td.date.tbd { color: #8a8a8a; font-weight: normal; font-style: italic; }

/* ---------- как это работает ---------- */

.steps { list-style: none; padding: 0; margin: 5px 0 0; counter-reset: step; }
.steps li {
    position: relative;
    padding: 0 0 14px 42px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.steps li:before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 15px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    line-height: 28px;
}
.steps li b { display: block; color: var(--text); font-size: 14px; padding: 4px 0 2px; }

/* ---------- форма заявки ---------- */

.form-grid { display: flex; flex-wrap: wrap; gap: 12px 2%; padding: 5px 0 0; }
.field { flex: 1 1 100%; }
.field.half { flex: 1 1 48%; min-width: 220px; }
.field label { display: block; font-size: 13px; color: var(--text); padding: 0 0 4px; }
.field label .req { color: var(--brand); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    font: normal 16px/1.25 Arial, Tahoma, sans-serif;
    padding: 5px 6px;
    color: var(--text);
    border: 1px solid #98b2c7;
    border-radius: 3px;
    background: #fff;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, .1) inset;
}
.field textarea { min-height: 70px; resize: vertical; }

.consent { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0 0; }
.consent label { font-size: 12px; color: #6b6b6b; line-height: 1.5; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0 0; }
.btn {
    font-size: 18px;
    color: #fff;
    padding: 6px 22px;
    background: var(--brand);
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: #e21414; }
.btn[disabled] { background: #c9a3a3; cursor: not-allowed; }

.note {
    font-size: 12px;
    color: #8a6a6a;
    background: #fff6f6;
    border: 1px solid #f0d6d6;
    border-radius: 10px;
    padding: 8px 12px;
    line-height: 1.5;
}

/* ---------- сайдбар: CTA-блок (паттерн .connection_signup) ---------- */

.cta {
    position: relative;
    border: 5px solid #fff;
    background: #fff;
    line-height: 0;
    margin: 0 0 20px;
    box-shadow: 1px 1px 1px rgba(181, 181, 181, .8);
}
.cta img { width: 100%; display: block; }
.cta i {
    position: absolute;
    right: 12%;
    top: 8%;
    padding: 5px 18px;
    background: #fff;
    border-radius: 15px;
    font-style: normal;
    font-weight: bold;
    font-size: 16px;
    color: var(--text);
    line-height: 1.25;
}
.cta .signup {
    position: absolute;
    right: 5%;
    bottom: 8%;
    font-style: italic;
    font-size: 16px;
    color: #fff;
    text-align: right;
    line-height: 1.25;
    text-decoration: none;
}

.side-panel {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 12px 15px;
    margin: 0 0 20px;
}
.side-panel .title { font-size: 16px; color: var(--brand); padding: 0 0 8px; border-bottom: 2px dotted #ddd; margin: 0 0 8px; }
.side-panel p { font-size: 13px; }
.side-panel .phone { font-size: 15px; font-weight: bold; font-style: italic; color: var(--text); padding: 2px 0; }
.side-panel .phone em { color: #a0a0a0; }
/* Фирменная деталь оригинала: ссылки без text-decoration, вместо неё цветная
   border-bottom, которая на hover становится прозрачной. */
.side-panel a {
    text-decoration: none;
    border-bottom: 1px solid var(--link-underline);
}
.side-panel a:hover { border-bottom-color: transparent; }

/* место под виджет чата Битрикс24 */
.chat-slot {
    border: 2px dashed #d9c7c7;
    border-radius: 10px;
    padding: 14px 15px;
    text-align: center;
    font-size: 12px;
    color: #9b8888;
    background: #fffafa;
    line-height: 1.5;
}

/* ---------- подвал ---------- */

.footer { max-width: 1250px; margin: 20px auto 0; padding: 0 0 20px; }
.footer .inner {
    margin: 5px;
    padding: 12px 15px;
    background: var(--panel) url(../img/payments_bg.jpg) repeat-x left top;
    border: 1px solid #fff;
    border-radius: 5px;
    box-shadow: 1px 1px 1px rgba(181, 181, 181, .8);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}
.footer .brand { display: flex; gap: 15px; align-items: flex-start; flex: 1 1 340px; }
.footer .brand .phones { font-size: 12px; line-height: 1.7; border-left: 1px dotted var(--dotted); padding-left: 15px; }
.footer .brand .phones em { color: #a0a0a0; }
.footer .brand .phones strong { color: var(--text); }
.footer .legal { flex: 1 1 260px; font-size: 12px; color: #8a8a8a; line-height: 1.6; text-align: right; }
.footer .legal a { color: var(--link); border-bottom: 1px solid var(--link-underline); text-decoration: none; }
.footer .legal a:hover { border-bottom-color: transparent; }

/* ---------- адаптив ---------- */

@media (max-width: 860px) {
    .header .top { flex-direction: column; align-items: stretch; }
    .header .contacts { text-align: left; }
    .article, .sidebar { flex: 1 1 100%; }
    .footer .legal { text-align: left; }
    .footer .brand .phones { border-left: 0; padding-left: 0; }
}

@media (max-width: 520px) {
    .container { margin: 0 8px; }
    .panel { padding: 10px 12px 16px; }
    .field.half { flex: 1 1 100%; }
    .villages th, .villages td { padding: 6px 7px; font-size: 12px; }
    .cta i { font-size: 13px; padding: 4px 12px; }
    .cta .signup { font-size: 13px; }
}
