:root {
    --primary: #0056b3;
    --primary-hover: #004494;
    --bg: #f5f7fa;
    --text: #333;
    --card-bg: #ffffff;
    --border: #e0e0e0;
}

body {
    font-size: 120%;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
}

header {
    background-color: var(--primary);
    color: #fff;
    padding: 1rem 0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.logo-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    width: fit-content;
    position: relative;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto 8px auto;
    filter: drop-shadow(0 0 3px #ffffff) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
    position: relative;
    top: 0;
    transition: filter 0.25s ease-in-out, top 0.1s ease-in-out;
}

.logo-block:hover .logo-img {
    filter: drop-shadow(0 0 5px #ffffff) drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

.logo-block:active .logo-img {
    top: 4px !important;
}

.logo-text {
    margin-top: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.main-nav {
    display: flex;
    align-items: center;
    margin: 0 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 0.4rem 1.4rem;
    position: relative;
    display: inline-block;
    transition: background-color 0.2s;
}

.nav-link:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 15%;
    height: 70%;
    width: 2px;
    background-color: #ffffff;
    box-shadow: 0 0 4px #ffffff, 0 0 8px rgba(255, 255, 255, 0.5), -1px 0 3px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.25s ease-in-out;
}

.nav-link::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -2px;
    height: 3px;
    background-color: #ffffff;
    transform: scaleX(0);
    opacity: 0;
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.nav-link:hover::before {
    transform: scaleX(1);
    opacity: 1;
}

.nav-link:hover::after {
    box-shadow: 0 0 6px #ffffff, 0 0 12px rgba(255, 255, 255, 0.8), -1px 0 3px rgba(0, 0, 0, 0.4);
}

.nav-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 8px;
}

.phone-number {
    font-size: 2.37rem;
    font-weight: 700;
    color: #fff;
    display: block;
    line-height: 1;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.header-bottom-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.address {
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.btn-call-to-action {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #d0d7de;
    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: all 0.15s ease-in-out;
    position: relative;
    top: 0;
    white-space: nowrap;
}

.btn-call-to-action:hover {
    background-color: #004fb5;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.btn-call-to-action:active {
    top: 3px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.section { padding: 0 0; }

.section-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 28px;
    color: var(--text);
}

/* Сетка Основных направлений — СТРОГО 4 блока в один ряд */
.features {
    display: grid;
    /* Уменьшили минимальный порог до 200px. Теперь 4 блока идеально влезают в ряд! */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-card {
    display: block;
    text-decoration: none !important;
    color: var(--text) !important;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid var(--border);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}

.feature-card:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}

.feature-card h3 {
    font-size: 20px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
/* Фиксируем и уменьшаем внутренний текст описания в Основных направлениях */
.feature-card p {
    font-size: 16px;    /* Уменьшили размер шрифта до аккуратных 14px */
    margin: 0;          /* Убираем лишние отступы, чтобы карточка была компактной */
    color: #555555;     /* Делаем цвет текста мягким тёмно-серым */
    line-height: 1.4;   /* Удобный межстрочный интервал */
}

/* Сетка Наши услуги — СТРОГО 5 блоков в один ряд */
.services-grid {
    display: grid;
    /* Уменьшили порог до 180px. Теперь 5 блоков гарантированно помещаются в один ряд в рамках 1200px контейнера */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.service-card:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}

.service-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.service-card h3 {
    margin: 0 0 16px 0;
    font-size: 15px;
}

.service-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.service-card a:hover { text-decoration: underline; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.step-item {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
    text-align: center;
}

.step-num {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin: 0 0 12px 0;
    display: block;
}
/* Фиксируем заголовок шага (например: Приём устройства) */
.step-item h3 {
    font-size: 18px;    /* Точный размер названия шага */
    margin: 0 0 10px 0; /* Фиксированный отступ до описания */
    color: var(--text);
}

/* Фиксируем внутренний текст описания шага */
.step-item p {
    font-size: 14px;    /* Аккуратный, компактный размер шрифта */
    margin: 0;          /* Сбрасываем лишние отступы */
    color: #555555;     /* Читаемый серый цвет */
    line-height: 1.5;
}
.faq {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.faq-item h3 {
    margin: 0 0 8px 0;      /* Фиксированный отступ до текста ответа */
    color: var(--primary);
    font-size: 18px;        /* Точный фиксированный размер шрифта вопроса */
    font-weight: 600;
    text-align: center;
}
/* Фиксируем шрифт текста-ответа внутри карточки FAQ */
.faq-item p {
    font-size: 15px;        /* Аккуратный, компактный размер шрифта для ответа */
    margin: 0;              /* Сбрасываем лишние отступы браузеров */
    color: #444444;         /* Читаемый темно-серый цвет текста */
    line-height: 1.5;
    text-align: center;
}
/* Внешний контейнер подвала: снова растянут от края до края монитора */
.site-footer {
    background-color: transparent; /* Убираем сплошной белый фон со всего низа */
    color: #555555;
    padding: 0;                   /* Обнуляем внешние отступы */
    margin-top: 60px;             /* Сохраняем пустой воздух после блока FAQ */
    font-size: 15px;
}

.footer-wrapper {
    max-width: 1136px;            /* Уменьшили ширину, чтобы она идеально совпадала с сеткой верхних блоков */
    margin: 0 auto;               /* Центрируем блок на экране */
    padding: 60px 32px 40px 32px; /* Увеличили верхний отступ до 60px, чтобы заголовки не прижимались к краю */
    background-color: #ffffff;    /* Белый фон */
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;

    /* Округлая рамка и тень */
    border: 1px solid var(--border);
    border-radius: 8px;           /* Округлые углы */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Мягкая тень */
}

.footer-col h4 {
    color: #222222;
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Фиксируем размер и стиль для строк списков в подвале */
.footer-col ul li {
    margin-bottom: 10px; /* Фиксированный шаг между строками */
    font-size: 14px;     /* Точный, аккуратный размер шрифта для списков в подвале */
}

/* Фиксируем внешний вид ссылок в подвале */
.footer-col ul li a {
    color: #666666;
    text-decoration: none;
    font-size: 14px;     /* Жестко зафиксировали размер букв в Хроме и Опере */
    transition: color 0.15s ease-in-out;
}

.footer-col ul li a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Фиксируем крупный номер телефона в подвале */
.footer-phone {
    font-size: 20px; /* Четкий фиксированный размер телефона в подвале */
    font-weight: 700;
    color: #222222;
    margin: 0 0 6px 0; /* Точный отступ до email */
}

/* Фиксируем размер и стиль ссылки e-mail в подвале */
.footer-email a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px; /* Жестко зафиксировали размер шрифта для почты */
}


/* Фиксируем размер и межстрочный интервал адреса в подвале */
.footer-address {
    font-size: 14px;   /* Чёткий фиксированный размер шрифта для адреса */
    line-height: 1.4;  /* Комфортный межстрочный интервал */
    color: #444444;    /* Стабильный тёмно-серый цвет */
}


.footer-brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.footer-logo {
    color: var(--primary) !important;
    margin-bottom: 1.5rem;
}

.footer-logo .logo-text {
    color: var(--primary) !important;
}

.footer-logo .logo-img {
    filter: drop-shadow(0 0 2px var(--primary)) drop-shadow(0 0 5px rgba(0, 86, 179, 0.4)) !important;
}

.footer-logo:hover .logo-img {
    filter: drop-shadow(0 0 4px var(--primary)) drop-shadow(0 0 8px rgba(0, 86, 179, 0.7)) !important;
}

.schedule-block h5 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    color: #222222;
}

.schedule-block p {
    margin: 0;
    color: #666666;
    font-size: 16px;    /* Жестко зафиксировали размер шрифта в пикселях */
    max-width: 140px;   /* Ограничили ширину: время поместится, а остальное уйдет вниз */
    line-height: 1.4;   /* Сделали красивый отступ между двумя строчками */
}

.footer-bottom {
    background-color: var(--primary);
    border-top: 1px solid var(--primary-hover);
    padding: 1.2rem 0;
    color: #ffffff;
    font-size: 0.85rem;
}

.footer-bottom-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s ease-in-out;
}

.footer-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.footer-version {
    font-weight: 600;
    color: #ffffff;
}

/* ==================== СТИЛИ МОДАЛЬНОГО ОКНА ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-card {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    box-sizing: border-box;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) !important;
}

.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888888;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: #333333;
}

.modal-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #222222;
    font-size: 1.6rem;
}

.modal-card p {
    color: #666666;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1.1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.btn-submit-form {
    width: 100%;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.9rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 56, 179, 0.2);
    transition: background-color 0.15s;
}

.btn-submit-form:hover {
    background-color: var(--primary-hover);
}

.form-status-msg {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
}


@media screen and (max-width: 600px) {
    .logo-block {
        margin: 0 auto !important;
        flex-direction: row !important;
        gap: 12px !important;
        align-items: center !important;
    }

    .logo-img {
        height: 70px !important;
        margin: 0 !important;
    }

    .logo-text {
        font-family: 'Montserrat', sans-serif !important;
        font-size: 1.6rem !important;
        font-weight: 800 !important;
        letter-spacing: 1px !important;
        margin: 0 !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        line-height: 1.2 !important;
    }


    .header-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center !important;
        gap: 1.2rem;
        padding: 0 1rem !important;
    }

    .main-nav {
        margin: 0 auto !important;
        gap: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .nav-link {
        font-size: 1.05rem !important;
        padding: 0.2rem 10px !important;
        font-weight: 600 !important;
        position: relative !important;
        display: inline-block !important;
    }

    .nav-link:not(:last-child)::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        right: -1px !important;
        top: 20% !important;
        height: 60% !important;
        width: 2px !important;
        background-color: #ffffff !important;
        box-shadow: 0 0 4px #ffffff, 0 0 8px rgba(255, 255, 255, 0.5), -1px 0 3px rgba(0, 0, 0, 0.4) !important;
    }

    .header-actions {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .phone-number {
        font-size: 1.8rem !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .header-bottom-row {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .address {
        text-align: center !important;
    }

    .footer-wrapper {
        grid-template-columns: 1fr !important;
        padding: 0 1rem 2rem 1rem !important;
        gap: 2.5rem !important;
    }

    .footer-wrapper .footer-col:nth-child(1),
    .footer-wrapper .footer-col:nth-child(2) {
        text-align: left !important;
    }
    .footer-wrapper .footer-col:nth-child(1) ul,
    .footer-wrapper .footer-col:nth-child(2) ul {
        text-align: left !important;
        display: block !important;
    }

    .footer-wrapper .footer-col:nth-child(3) {
        text-align: center !important;
    }
    .footer-wrapper .footer-phone {
        font-size: 1.8rem !important;
        margin: 0 auto 0.6rem auto !important;
        text-align: center !important;
        display: block !important;
    }
    .footer-email {
        text-align: center !important;
        display: block !important;
    }
    .footer-address {
        font-size: 1.15rem !important;
        line-height: 1.5 !important;
        text-align: center !important;
        display: block !important;
    }

    .footer-brand-col {
        align-items: center !important;
        text-align: center !important;
    }

    .footer-logo .logo-img {
        height: 120px !important;
        margin-bottom: 12px !important;
    }

    .schedule-block {
        text-align: center !important;
    }
    .schedule-block h5 {
        font-size: 1.25rem !important;
        margin-bottom: 0.4rem !important;
    }
    .schedule-block p {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        color: #222222 !important;
    }

    .footer-bottom-wrapper {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.8rem !important;
    }
}
/* Делаем ссылку-обертку блочной для сохранения сетки */
.service-card-link {
    display: flex;
    flex-direction: column;
}

.service-card-link .service-card {
    flex: 1;
}

/* Подчеркивание текста "Подробнее" при наведении на любую часть карточки */
.service-card-link:hover .service-more-link {
    text-decoration: underline;
}

/* ==================== КАРТА ==================== */
.map-container {
    width: 100%;
    max-width: 1200px;       /* Ограничиваем максимальную ширину, чтобы на больших экранах не было слишком широко */
    margin: 24px auto 60px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 450px;          /* Чуть увеличил высоту, чтобы карта смотрелась пропорционально */
}

