/* ================================
   Основные стили
   ================================ */

/* Сброс отступов и шрифт */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f8fa;
    margin: 0;
    padding: 0;
}

/* ================================
   Шапка сайта
   ================================ */
header {
    background: #fff;
    border-bottom: 1px solid #e2e2e2;
    box-shadow: 0 2px 10px #166db214;
}

/* Внутренняя сетка шапки */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
}

/* Логотип */
.logo-area img {
    height: 64px;
    vertical-align: middle;
}

/* Навигация */
nav {
    margin: 18px 0 0;
    text-align: center;
}
nav a {
    display: inline-block;
    text-decoration: none;
    color: #166db2;
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0 16px;
    padding: 7px 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
nav a:hover,
nav a.active {
    color: #fff;
    background: #188447;
}

/* Контактная информация */
.contact-info {
    text-align: right;
    font-size: 1.06rem;
}
.contact-info a {
    color: #188447;
    text-decoration: none;
}
.contact-info .small {
    font-size: 0.97em;
    color: #555;
}

/* ================================
   Секция “О компании” + “Новости”
   ================================ */
.company-news-wrapper {
    display: flex;
    gap: 36px;
    max-width: 1200px;
    margin: 32px auto;
    align-items: stretch;
}

/* “О компании” */
.company-section {
    flex: 3;
    background: #f8fafd;
    border-radius: 14px;
    box-shadow: 0 2px 8px #18844715;
    padding: 32px 20px;
}

/* “Новости” */
.news-section {
    flex: 1;
    background: #f8fafd;
    border-radius: 14px;
    box-shadow: 0 2px 12px #18844713;
    padding: 24px;
    font-size: 0.9rem;
    overflow-y: auto;
}
.news-section h2 {
    color: #166db2;
    font-size: 1.09rem;
    text-align: center;
    margin-bottom: 12px;
}
.news-section ul {
    color: #222;
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-section li {
    margin-bottom: 16px;
}
.news-title { font-weight: 500; }
.news-good { color: #188447 !important; }
.news-sad { color: #166db2 !important; }
.news-info { color: #222 !important; }

/* ================================
   Заголовки секций
   ================================ */
.section-title {
    color: #188447;
    text-align: center;
    font-size: 2.1rem;
    margin-bottom: 24px;
}

/* ================================
   Сетка карточек (Услуги, Преимущества)
   ================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto 36px;
}

/* Карточка */
.card {
    background: #f8fafd;
    border-radius: 14px;
    box-shadow: 0 1px 8px #166db215;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.18s, transform 0.16s;
}
.card:hover {
    box-shadow: 0 4px 16px #18844733;
    transform: translateY(-3px) scale(1.03);
}
.card img {
    width: 110px;
    border-radius: 8px;
}
.card h3 {
    color: #166db2;
    margin: 10px 0 8px;
    font-size: 1.1rem;
}
.card p {
    color: #333;
    font-size: 0.98rem;
    margin: 0;
}

/* ================================
   Модальное окно
   ================================ */
#modal-bg {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(16, 32, 40, 0.25);
    z-index: 99;
}
#modal-content {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 8px 32px #166db250;
    border-radius: 14px;
    padding: 32px 28px 18px;
    z-index: 100;
}
#modal-content .close-btn {
    position: absolute;
    top: 8px; right: 16px;
    font-size: 2rem;
    color: #166db2;
    cursor: pointer;
}
footer, .footer-center {
    text-align: center;
    color: #aaa;
    font-size: 0.95rem;
    margin: 32px 0 8px 0;
}

/* ================================
   Адаптивность
   ================================ */
@media (max-width: 900px) {
    .cards-grid,
    .company-news-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    nav a {
        margin: 0 8px;
        font-size: 1rem;
    }
    .logo-area img {
        height: 48px;
    }
}
/* Стили для полей формы */
input, textarea, select {
    padding: 8px 10px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #188447;
    box-shadow: 0 0 0 2px rgba(24, 132, 71, 0.2);
}

/* Ошибки валидации */
.errorlist {
    color: #d9534f;
    font-size: 0.9rem;
    margin: -8px 0 8px;
    padding-left: 5px;
}