* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
}

/* Шапка сайта */
header {
    background: #0f172a;
    color: #ffffff;
    padding: 20px 40px;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo a {
    color: #ffffff;
    text-decoration: none;
}

/* Главное меню */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    transition: 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
}

/* Правая часть шапки: языки + телефоны */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 250px;
}

.lang-switch {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 10px;
    font-size: 14px;
}

.lang-switch a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: bold;
}

.lang-switch a.active {
    color: #facc15;
}

.lang-switch a:hover {
    text-decoration: underline;
}

.lang-switch span {
    color: #64748b;
}

.top-phones {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 16px;
    text-align: right;
    line-height: 1.3;
}

.phone-title {
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

.phone-item {
    white-space: nowrap;
}

.top-phones a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.top-phones a:hover {
    text-decoration: underline;
}

/* Первый большой блок с фоном */
.hero {
    color: #ffffff;
    padding: 80px 40px;
    background-image:
        linear-gradient(
            90deg,
            rgba(15, 23, 42, 0.96) 0%,
            rgba(15, 23, 42, 0.86) 35%,
            rgba(15, 23, 42, 0.45) 62%,
            rgba(30, 64, 175, 0.10) 100%
        ),
        url("/images/home.png");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.hero-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 44px;
    margin: 0 0 20px;
    max-width: 800px;
}

.hero p {
    font-size: 20px;
    line-height: 1.5;
    max-width: 760px;
    margin-bottom: 35px;
}

/* Кнопки */
.btn {
    display: inline-block;
    background: #facc15;
    color: #111827;
    padding: 16px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    background: #eab308;
}

/* Основные секции */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 35px 40px;
}

.section h1,
.section h2 {
    color: #111827;
}

.section h1 {
    font-size: 38px;
    margin: 0 0 25px;
}

.section h2 {
    font-size: 32px;
    margin: 0 0 25px;
}

/* Карточки */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: #ffffff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.card h3 {
    margin-top: 0;
    color: #1e40af;
}

.card p {
    font-size: 17px;
    line-height: 1.45;
}

/* Контактные и информационные блоки */
.contact-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    line-height: 1.8;
    font-size: 18px;
}

.contact-box a {
    color: #1e40af;
    text-decoration: none;
    font-weight: bold;
}

.contact-box a:hover {
    text-decoration: underline;
}

/* Новости */
.news-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.news-card,
.news-article {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.news-date {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.news-card h2 a {
    color: #1e40af;
    text-decoration: none;
}

.news-card h2 a:hover {
    text-decoration: underline;
}

.news-card p,
.news-article p {
    font-size: 18px;
    line-height: 1.6;
}

.news-more {
    color: #1e40af;
    font-weight: bold;
    text-decoration: none;
}

.news-more:hover {
    text-decoration: underline;
}

.news-article h1 {
    font-size: 38px;
    margin: 0 0 20px;
}

/* Страница "Як доїхати" */
.route-warning {
    font-size: 18px;
    color: #b91c1c;
    margin-top: 0;
}

.route-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

.route-buttons .route-btn {
    width: auto !important;
    min-width: 160px;
    text-align: center;
}

.route-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 25px 0;
}

.route-images img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.map-box {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    margin-top: 20px;
}

.map-box iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Подвал */
footer {
    background: #0f172a;
    color: #cbd5e1;
    text-align: center;
    padding: 25px 15px;
    font-size: 14px;
}

.footer-payment {
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8;
}

/* Адаптация для планшетов */
@media (max-width: 1000px) {
    .header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .header-right {
        min-width: 230px;
    }
}

/* Адаптация для телефонов */
@media (max-width: 800px) {
    header {
        padding: 18px 20px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .logo {
        font-size: 26px;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .main-nav a {
        font-size: 14px;
        padding: 8px 10px;
    }

    .header-right {
        align-items: flex-start;
        min-width: auto;
    }

    .lang-switch {
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    .top-phones {
        text-align: left;
        font-size: 17px;
        gap: 8px;
    }

    .top-phones a {
        display: inline-block;
        padding: 3px 0;
    }

    .phone-item {
        white-space: nowrap;
    }

    .hero {
        padding: 45px 20px;
        background-image:
            linear-gradient(
                90deg,
                rgba(15, 23, 42, 0.98) 0%,
                rgba(15, 23, 42, 0.92) 45%,
                rgba(15, 23, 42, 0.70) 75%,
                rgba(30, 64, 175, 0.35) 100%
            ),
            url("/images/home.png");
        background-size: cover;
        background-position: 68% center;
        background-repeat: no-repeat;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 17px;
        line-height: 1.5;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 20px;
        font-size: 17px;
    }

    .section {
        padding: 25px 20px;
    }

    .section h1 {
        font-size: 30px;
    }

    .section h2 {
        font-size: 28px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
    }

    .contact-box {
        padding: 22px;
        font-size: 17px;
    }

    .news-card,
    .news-article {
        padding: 22px;
    }

    .news-article h1 {
        font-size: 28px;
    }

    .news-card h2 {
        font-size: 22px;
    }

    .news-card p,
    .news-article p {
        font-size: 16px;
    }

    .map-box {
        height: 340px;
    }
}

/* Кнопки на странице "Як доїхати" на телефоне */
@media (max-width: 500px) {
    .route-buttons {
        display: flex;
        flex-direction: column;
        gap: 24px;
        margin: 20px 0 30px;
    }

    .route-buttons .route-btn {
        width: 100% !important;
        min-width: 0;
        text-align: center;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 420px) {
    .hero {
        padding: 40px 18px;
        background-image:
            linear-gradient(
                90deg,
                rgba(15, 23, 42, 0.99) 0%,
                rgba(15, 23, 42, 0.96) 55%,
                rgba(15, 23, 42, 0.88) 100%
            ),
            url("/images/home.png");
        background-size: cover;
        background-position: 72% center;
        background-repeat: no-repeat;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 16px;
    }

    .section h1,
    .section h2 {
        font-size: 24px;
    }

    .top-phones {
        font-size: 16px;
    }

    .main-nav a {
        font-size: 13px;
        padding: 7px 9px;
    }
}
.route-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin: 20px 0 30px;
}

.route-buttons .route-btn {
    width: auto !important;
    min-width: 160px;
    text-align: center;
}

@media (max-width: 500px) {
    .route-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin: 20px 0 30px !important;
    }

    .route-buttons .route-btn {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .route-buttons .route-btn + .route-btn {
        margin-top: 16px !important;
    }
}