: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: 1.15rem;
    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: 1.4rem;
    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.5px;
    margin-bottom: 4px;
}

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

.address {
    font-size: 1rem;
    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;
}

.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: 0rem 0; }

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.8rem;
    color: var(--text);
}

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

.feature-card {
    display: block;
    text-decoration: none !important;
    color: var(--text) !important;
    background: var(--card-bg);
    padding: 1.5rem;
    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: 1.25rem;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.service-card {
    background: var(--card-bg);
    padding: 1.5rem;
    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: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.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: 1.5rem;
}

.step-item {
    background: var(--card-bg);
    padding: 1.5rem;
    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: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin: 0 0 0.75rem 0;
    display: block;
}

.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 0.5rem 0; color: var(--primary); }

.site-footer {
    background-color: #ffffff;
    color: #555555;
    padding: 3rem 0 0 0;
    border-top: 1px solid var(--border);
    font-size: 1.2rem;
}

.footer-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    box-sizing: border-box;
}

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

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

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    color: #666666;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

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

.footer-phone {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222222;
    margin: 0 0 0.5rem 0;
}

.footer-email a {
    color: var(--primary);
    text-decoration: none;
}

.footer-address {
    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;
}

.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;
}

@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;
    }

    .section-title {
        font-size: 1.5rem !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;
    }
}
