/* ============================================
   ОБЩИЕ СТИЛИ (Светлый фон, синий акцент)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(135deg, #F0F5FF 0%, #E6EDF7 100%);
    font-family: 'Roboto', sans-serif;
    color: #1A2B4C;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   ШАПКА
   ============================================ */
.company-card {
    background: #FFFFFF;
    padding: 20px 30px;
    margin-bottom: 30px;
    border-bottom: 4px solid #1A73E8;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.10);
    border-radius: 0;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #1A2B4C;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.company-name span {
    color: #1A73E8;
}

.company-tagline {
    color: #4A6A8F;
    font-size: 0.95rem;
    margin-top: 5px;
    border-left: 4px solid #1A73E8;
    padding-left: 15px;
}

.nav-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 24px;
    background: #1A73E8;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 40px;
    border: none;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

.nav-links a:hover {
    background: #0D47A1;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.nav-links a.active {
    background: #0D47A1;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================ */
.hero {
    background: #FFFFFF;
    padding: 50px 30px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #D0E0F0;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.06);
    border-radius: 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    color: #1A2B4C;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 span {
    color: #1A73E8;
}

.hero p {
    font-size: 1.2rem;
    color: #4A6A8F;
    max-width: 700px;
    margin: 20px auto 0;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.index-card {
    background: #FFFFFF;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: #1A2B4C;
    transition: all 0.3s ease;
    border: 1px solid #D0E0F0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border-radius: 12px;
}

.index-card:hover {
    transform: translateY(-6px);
    border-color: #1A73E8;
    box-shadow: 0 12px 30px rgba(26, 115, 232, 0.12);
}

.index-card .icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 12px;
}

.index-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1A2B4C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: none;
    padding-left: 0;
}

.index-card h3 span {
    color: #1A73E8;
}

.index-card p {
    font-size: 0.9rem;
    color: #5A7A9A;
    margin-top: 8px;
}

/* ============================================
   БЛОКИ КАЛЬКУЛЯТОРОВ
   ============================================ */
.form-panel, .goods-panel, .result-panel {
    background: #FFFFFF;
    padding: 25px 30px;
    margin-bottom: 25px;
    border: 1px solid #D0E0F0;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.06);
    border-radius: 12px;
}

.result-panel {
    margin-top: 25px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #1A2B4C;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-left: 6px solid #1A73E8;
    padding-left: 15px;
}

h3 span {
    color: #1A73E8;
}

/* ============================================
   ПЕРЕКЛЮЧАТЕЛЬ НАПРАВЛЕНИЙ
   ============================================ */
.direction-switch {
    display: inline-flex;
    background: #F0F5FF;
    border: 1px solid #D0E0F0;
    margin-bottom: 25px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.06);
    border-radius: 30px;
    overflow: hidden;
}

.dir-btn {
    border: none;
    background: transparent;
    padding: 16px 40px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #4A6A8F;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    min-width: 220px;
}

.dir-btn:hover {
    color: #1A2B4C;
    background: #E6EDF7;
}

.dir-btn.active {
    background: #1A73E8;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

/* ============================================
   ФОРМЫ
   ============================================ */
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.form-row label {
    width: 210px;
    font-weight: 700;
    color: #1A2B4C;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

select, input {
    flex: 1;
    min-width: 160px;
    padding: 10px 16px;
    border: 1px solid #D0E0F0;
    background: #FFFFFF;
    color: #1A2B4C;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    border-radius: 8px;
    transition: 0.2s;
}

select:focus, input:focus {
    outline: none;
    border-color: #1A73E8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

select option {
    background: #FFFFFF;
    color: #1A2B4C;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: #1A73E8;
    flex: 0 0 auto;
}

.checkbox-row label {
    color: #1A2B4C;
    font-size: 0.95rem;
}

/* ============================================
   КНОПКИ (с закруглениями и анимацией)
   ============================================ */
button.calc-btn, .btn-add-row, .btn-del-row {
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    padding: 14px;
}

button.calc-btn {
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    font-size: 1.2rem;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.25);
}

button.calc-btn:hover {
    background: linear-gradient(135deg, #1565C0, #0A3A7A);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.35);
}

.btn-add-row {
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    padding: 10px 24px;
    font-size: 0.9rem;
    margin-top: 12px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.2);
    border-radius: 30px;
}

.btn-add-row:hover {
    background: linear-gradient(135deg, #1565C0, #0A3A7A);
    transform: scale(1.02);
}

.btn-del-row {
    background: transparent;
    color: #1A73E8;
    font-size: 1.2rem;
    padding: 0 8px;
    border-radius: 0;
}

.btn-del-row:hover {
    color: #0D47A1;
}

/* ============================================
   КНОПКА "ОФОРМИТЬ ЗАЯВКУ"
   ============================================ */
.btn-request button {
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    border: none;
    padding: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.2);
}

.btn-request button:hover {
    background: linear-gradient(135deg, #1565C0, #0A3A7A);
    transform: scale(1.02);
}

/* ============================================
   ТАБЛИЦЫ
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    margin-top: 10px;
    background: #F8FAFE;
    padding: 5px;
    border: 1px solid #D0E0F0;
    border-radius: 12px;
}

.goods-table, .result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #FFFFFF;
    color: #1A2B4C;
}

.goods-table th, .result-table th {
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 12px 8px;
    text-align: left;
}

.goods-table td, .result-table td {
    padding: 8px;
    border-bottom: 1px solid #E6EDF7;
}

.goods-table input, .goods-table select {
    background: #FFFFFF;
    color: #1A2B4C;
    border: 1px solid #D0E0F0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.goods-table input:focus, .goods-table select:focus {
    border-color: #1A73E8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.result-table .total-row {
    background: #E6EDF7;
    font-weight: 700;
}

/* ============================================
   РЕЗУЛЬТАТЫ
   ============================================ */
.result-card {
    background: #F8FAFE;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #D0E0F0;
    border-radius: 12px;
}

.result-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #E6EDF7;
    color: #1A2B4C;
    font-size: 1rem;
}

.result-line .label {
    font-weight: 400;
    color: #4A6A8F;
}

.result-line .value {
    font-weight: 700;
    color: #1A2B4C;
    font-size: 1.05rem;
}

.result-line.total {
    border-bottom: none;
    font-size: 1.3rem;
    font-weight: 900;
    color: #FFFFFF;
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    padding: 12px 18px;
    margin-top: 5px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.15);
}

.result-line.total .label,
.result-line.total .value {
    color: #FFFFFF;
}

.result-line.transit {
    border-bottom: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1A2B4C;
    background: #E6EDF7;
    padding: 10px 15px;
    margin-top: 5px;
    border-radius: 30px;
}

/* ============================================
   ПОДСКАЗКИ
   ============================================ */
.suggestions {
    position: absolute;
    background: #FFFFFF;
    border: 1px solid #1A73E8;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    width: 400px;
    left: 0;
    top: 100%;
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.10);
    display: none;
    border-radius: 12px;
}

.suggestions.active { display: block; }

.suggestions div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #E6EDF7;
    color: #1A2B4C;
    font-size: 0.85rem;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

.suggestions div:hover {
    background: #F0F5FF;
}

.suggestions div .code {
    font-weight: 700;
    color: #1A73E8;
}

.suggestions div .desc {
    color: #1A2B4C;
}

.suggestions div .rate {
    float: right;
    color: #0D47A1;
    font-weight: 700;
    margin-left: 10px;
}

/* ============================================
   ПРИМЕЧАНИЯ И ПРОЧЕЕ
   ============================================ */
.spinner {
    display: none;
    text-align: center;
    padding: 15px 0;
    color: #1A73E8;
    font-size: 1.1rem;
    font-weight: 700;
}
.spinner.show { display: block; }

.note {
    font-size: 0.8rem;
    color: #5A7A9A;
    text-align: center;
    margin-top: 15px;
    border-top: 1px solid #E6EDF7;
    padding-top: 12px;
}

.hidden { display: none; }
.result-anchor { scroll-margin-top: 80px; }

/* ============================================
   ДОКУМЕНТЫ (карточки)
   ============================================ */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.doc-card {
    background: #FFFFFF;
    border: 1px solid #D0E0F0;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border-radius: 12px;
}

.doc-card:hover {
    border-color: #1A73E8;
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.10);
    transform: translateY(-4px);
}

.doc-card .doc-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.doc-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1A2B4C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.doc-card .doc-preview {
    background: #F8FAFE;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #E6EDF7;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.doc-card .doc-actions a {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.15);
    border-radius: 30px;
}

.doc-card .doc-actions a:hover {
    background: linear-gradient(135deg, #1565C0, #0A3A7A);
    transform: scale(1.05);
}

.doc-card .doc-actions a.preview {
    background: transparent;
    border: 1px solid #1A73E8;
    color: #1A73E8;
    box-shadow: none;
}

.doc-card .doc-actions a.preview:hover {
    background: #1A73E8;
    color: #FFFFFF;
}

@media (max-width: 800px) {
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   МОДАЛЬНОЕ ОКНО
   ============================================ */
.modal-box {
    background: #FFFFFF;
    border: 1px solid #D0E0F0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 16px;
}

.modal-box h3 {
    color: #1A2B4C;
    border-left-color: #1A73E8;
}

.modal-box .form-row input,
.modal-box .form-row textarea {
    background: #FFFFFF;
    border: 1px solid #D0E0F0;
    color: #1A2B4C;
    border-radius: 8px;
}

.modal-box .form-row input:focus,
.modal-box .form-row textarea:focus {
    border-color: #1A73E8;
}

.modal-actions .btn-send {
    background: linear-gradient(135deg, #1A73E8, #0D47A1);
    color: #FFFFFF;
    border-radius: 30px;
}

.modal-actions .btn-send:hover {
    background: linear-gradient(135deg, #1565C0, #0A3A7A);
}

.modal-actions .btn-close {
    border: 1px solid #D0E0F0;
    color: #4A6A8F;
    border-radius: 30px;
}

.modal-actions .btn-close:hover {
    background: #F0F5FF;
}

.contact-block-modal {
    border-top-color: #E6EDF7;
    color: #4A6A8F;
}

.contact-block-modal a {
    color: #1A73E8;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 800px) {
    .container { padding: 10px; }
    .company-card { padding: 15px; }
    .hero { padding: 30px 20px; }
    .hero h1 { font-size: 2.2rem; }
    .form-row label { width: 100%; }
    select, input { min-width: 100%; }
    .suggestions { width: 100%; max-width: 300px; }
    .goods-table, .result-table { font-size: 0.7rem; }
    .goods-table th, .result-table th { padding: 6px 4px; }
    .goods-table td { padding: 4px; }
    .two-col { grid-template-columns: 1fr; }
    .nav-links a { padding: 10px 16px; font-size: 0.85rem; }
    .direction-switch { border-radius: 20px; }
    .dir-btn { padding: 12px 20px; min-width: 150px; font-size: 0.9rem; }
}
/* ===== АНИМИРОВАННЫЙ ФОН С ДОРОГОЙ И МАШИНКАМИ ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* ---- ДОРОЖНАЯ РАЗМЕТКА (пунктирная линия) ---- */
.road-line {
    position: absolute;
    bottom: 5%;
    left: 0;
    width: 200%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 40px,
        transparent 40px,
        transparent 80px
    );
    animation: road-move 4s linear infinite;
    transform: translateX(-50%);
}

@keyframes road-move {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ---- МАШИНКИ ---- */
.car {
    position: absolute;
    width: 80px;
    height: auto;
    opacity: 0.12;
    animation: drive-left-to-right linear infinite;
    will-change: transform;
}

/* 15 машинок с разными позициями, размерами, скоростями и задержками */
.car:nth-child(1) { bottom: 2%; width: 70px; animation-duration: 18s; animation-delay: 0s; }
.car:nth-child(2) { bottom: 8%; width: 90px; animation-duration: 22s; animation-delay: 3s; }
.car:nth-child(3) { bottom: 14%; width: 75px; animation-duration: 25s; animation-delay: 6s; }
.car:nth-child(4) { bottom: 20%; width: 85px; animation-duration: 20s; animation-delay: 9s; }
.car:nth-child(5) { bottom: 27%; width: 100px; animation-duration: 30s; animation-delay: 2s; }
.car:nth-child(6) { bottom: 34%; width: 65px; animation-duration: 16s; animation-delay: 12s; }
.car:nth-child(7) { bottom: 42%; width: 80px; animation-duration: 28s; animation-delay: 5s; }
.car:nth-child(8) { bottom: 50%; width: 95px; animation-duration: 24s; animation-delay: 8s; }
.car:nth-child(9) { bottom: 58%; width: 70px; animation-duration: 32s; animation-delay: 1s; }
.car:nth-child(10) { bottom: 66%; width: 85px; animation-duration: 26s; animation-delay: 10s; }
.car:nth-child(11) { bottom: 74%; width: 90px; animation-duration: 21s; animation-delay: 4s; }
.car:nth-child(12) { bottom: 82%; width: 75px; animation-duration: 29s; animation-delay: 7s; }
.car:nth-child(13) { bottom: 89%; width: 80px; animation-duration: 23s; animation-delay: 11s; }
.car:nth-child(14) { bottom: 95%; width: 95px; animation-duration: 27s; animation-delay: 2s; }
.car:nth-child(15) { bottom: 100%; width: 70px; animation-duration: 19s; animation-delay: 13s; }

/* Анимация движения машинок (слева направо) */
@keyframes drive-left-to-right {
    0% {
        transform: translateX(-200px);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* На мобильных – уменьшаем размер и прозрачность */
@media (max-width: 768px) {
    .car {
        width: 40px !important;
        opacity: 0.08;
    }
    .road-line {
        height: 2px;
        background: repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.2) 0px,
            rgba(255, 255, 255, 0.2) 20px,
            transparent 20px,
            transparent 40px
        );
    }
    .animated-bg {
        display: none; /* можно скрыть на мобилках для производительности */
    }
}
/* ===== ОБЛАКА ===== */
.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    filter: blur(40px);
    animation: cloud-move linear infinite;
    will-change: transform;
}

/* Разные размеры, позиции, скорости */
.cloud:nth-child(1) {
    width: 300px;
    height: 120px;
    top: 5%;
    left: -10%;
    animation-duration: 60s;
    animation-delay: 0s;
}
.cloud:nth-child(2) {
    width: 400px;
    height: 150px;
    top: 15%;
    left: -20%;
    animation-duration: 80s;
    animation-delay: 10s;
}
.cloud:nth-child(3) {
    width: 250px;
    height: 100px;
    top: 25%;
    left: -5%;
    animation-duration: 50s;
    animation-delay: 5s;
}
.cloud:nth-child(4) {
    width: 350px;
    height: 130px;
    top: 40%;
    left: -15%;
    animation-duration: 70s;
    animation-delay: 15s;
}
.cloud:nth-child(5) {
    width: 200px;
    height: 80px;
    top: 55%;
    left: -8%;
    animation-duration: 45s;
    animation-delay: 8s;
}
.cloud:nth-child(6) {
    width: 450px;
    height: 160px;
    top: 70%;
    left: -25%;
    animation-duration: 90s;
    animation-delay: 12s;
}
.cloud:nth-child(7) {
    width: 280px;
    height: 110px;
    top: 85%;
    left: -12%;
    animation-duration: 55s;
    animation-delay: 3s;
}

@keyframes cloud-move {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw + 400px));
    }
}

/* Для разнообразия – некоторые облака едут в другую сторону */
.cloud:nth-child(even) {
    animation-name: cloud-move-reverse;
}
@keyframes cloud-move-reverse {
    0% {
        transform: translateX(calc(100vw + 400px));
    }
    100% {
        transform: translateX(-400px);
    }
}

/* На мобильных – уменьшаем облака или скрываем */
@media (max-width: 768px) {
    .cloud {
        display: none;
    }
}