:root {
    --primary: #348fde;
    --primary-dark: #2c7fb8;
    --header-bg: #f5f8fc;
    --border: #dbe2ec;
    --gray: #6c7585;
    --light: #ffffff;
    --bg: #f0f4f8;
    --logo-blue: #348fde;
    --logo-red: #e74c3c;
    --shadow-sm: 0 2px 8px rgba(52, 143, 222, 0.08);
    --shadow-md: 0 4px 16px rgba(52, 143, 222, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: var(--bg);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ========================================= */
/* ШАПКА И МЕНЮ */
/* ========================================= */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(52, 143, 222, 0.06);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    height: 72px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 36px; height: 36px;
    background: var(--primary); color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 0.85rem; flex-shrink: 0;
}
.logo-text { font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.logo-blue { color: var(--logo-blue); }
.logo-red { color: var(--logo-red); }

.main-menu { display: flex; gap: 22px; }
.main-menu a {
    color: #4a5568; font-size: 0.95rem; font-weight: 500;
    transition: color 0.2s;
}
.main-menu a:hover { color: var(--primary); }

/* Бургер (скрыт на ПК) */
.burger {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.burger span {
    display: block; width: 25px; height: 3px;
    background: #4a5568; border-radius: 2px; transition: 0.3s;
}
/* Анимация бургера */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Мобильное меню — overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1500;
}
.mobile-menu-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Список мобильного меню — крупные пункты */
.mobile-menu-list {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 0 0 16px 16px;
    padding: 32px 20px;
    margin-top: 72px;
}
.mobile-menu-list li {
    margin-bottom: 12px;
}
.mobile-menu-list a {
    display: block;
    font-size: 1.4rem;
    line-height: 1.3;
    color: #2d3748;
    padding: 18px 20px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.mobile-menu-list a:hover,
.mobile-menu-list a:active {
    background: #eaf4fb;
    color: var(--primary);
}

/* ========================================= */
/* Контейнер и секции (оставляем как было) */
/* ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
section { padding: 50px 0; }
.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 30px;
    color: #1a202c;
}

/* ========================================= */
/* Hero (если нужно на калькуляторе) */
/* ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}
.hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.overlay-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.25) 40%, transparent 70%);
    color: #fff;
    padding: 50px 20px 36px;
    text-align: center;
    z-index: 2;
}
.overlay-text h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.overlay-text p {
    font-size: 1.1rem;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.98;
    margin-bottom: 16px;
}

/* ========================================= */
/* Преимущества / сетки */
/* ========================================= */
.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.benefit-item {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.benefit-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.benefit-icon-check {
    width: 52px; height: 52px;
    background: #eaf4fb;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: bold;
}
.benefit-item h3 { font-size: 1.15rem; margin-bottom: 10px; }
.benefit-item p { color: var(--gray); font-size: 0.95rem; }

/* ========================================= */
/* Калькулятор и формы */
/* ========================================= */
#calcForm {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
#distanceResult { font-weight: bold; font-size: 1.1rem; }
#totalCostResult { font-weight: bold; font-size: 1.25rem; color: var(--primary); }
#calcResultMsg { margin-top: 15px; text-align: center; font-weight: 600; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 143, 222, 0.15);
}
input[type="checkbox"] {
    accent-color: var(--primary);
    width: 18px; height: 18px;
    cursor: pointer;
}

/* Карта */
#map {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.leaflet-container { width: 100%; height: 100%; }

/* Кнопки */
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.btn-city {
    display: inline-block;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s;
}
.btn-city:hover {
    background: #eaf4fb;
    border-color: var(--primary);
    color: var(--primary);
}

/* Модалка */
#intercityModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #999;
    background: none;
    border: none;
    line-height: 1;
}
.modal-close:hover { color: #333; }
#modalResult { margin-top: 18px; font-weight: 700; font-size: 1.2rem; display: none; }

/* Контакты */
#contactForm { max-width: 600px; }
#contactForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
    min-height: 120px;
    font-size: 1rem;
    font-family: inherit;
}
#contactForm textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 143, 222, 0.15);
}
#contactResult {
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
    display: none;
}

/* Кнопка «Наверх» */
#scrollTopBtn {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 50%;
    cursor: pointer; font-size: 1.3rem;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(52, 143, 222, 0.25);
    z-index: 998; transition: background 0.2s;
}
#scrollTopBtn:hover { background: var(--primary-dark); }

/* Футер */
footer {
    background: #1a202c;
    color: #8892a0;
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
}
footer p { font-size: 0.9rem; }

/* ========================================= */
/* Адаптивность */
/* ========================================= */
@media (max-width: 768px) {
    .burger { display: flex; }
    .main-menu { display: none; }
    .header-inner { flex-wrap: wrap; gap: 10px; }
    .logo-text { font-size: 1.1rem; }
    .hero-section { height: 220px; }
    .overlay-text { padding: 36px 16px 24px; }
    .overlay-text h1 { font-size: 1.6rem; }
    .overlay-text p { font-size: 1rem; }
    .intercity-content { grid-template-columns: 1fr; }
    .intercity-img img { max-height: 240px; }
    #map { height: 320px; }
    .section-title { font-size: 1.4rem; }
    #scrollTopBtn { bottom: 20px; right: 20px; width: 42px; height: 42px; font-size: 1.1rem; }
    #calcForm { padding: 20px; }
}

