html, body {
    margin: 0;
    padding: 0;
}
html {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    height: 100%;
    font: 16px/24px "Trebuchet MS", Helvetica, sans-serif;
    background: #f8f8f8;
    color: #4b4b4b;
}

/* ==========================================================================
   ОБНОВЛЕННАЯ ШАПКА САЙТА (SITE HEADER)
   ========================================================================== */
.site-header {
    margin: 24px;
    padding: 0 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Логотип */
.site-header .logo {
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    font-size: 24px;
}
.logo-accent {
    color: #40b3d8;
}

/* Навигация */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}
.nav-link {
    color: #7f8c8d;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: #40b3d8;
}

/* Действия в шапке (Телефон и Кнопка) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-phone {
    color: #4b4b4b;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
}
.btn-sm {
    padding: 6px 16px;
    font-size: 14px;
}
.btn-outline {
    border: 2px solid #40b3d8;
    color: #40b3d8;
}
.btn-outline:hover {
    background: #40b3d8;
    color: #fff;
}

/* Мобильный бургер-переключатель */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #2c3e50;
    transition: all 0.3s ease;
}



.container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.welcome-hero {
    text-align: center;
    padding: 40px 0;
    max-width: 800px;
}
.welcome-hero h1 {
    font-size: 2.5rem;
    line-height: 2.5rem;
    margin: 16px 0;
    color: #2c3e50;
}
.badge {
    background: rgba(64, 179, 216, 0.1);
    color: #40b3d8;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}
.subtitle {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 24px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}
.btn-primary {
    background: #40b3d8;
    color: #fff;
}
.btn-primary:hover {
    background: #339ec2;
}
.btn-secondary {
    background: #e2e8f0;
    color: #4b4b4b;
}
.btn-secondary:hover {
    background: #cbd5e1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    margin-top: 40px;
    padding-bottom: 40px;
}
.feature-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #e6e8ec;
}
.feature-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.feature-card h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
}
.feature-card p {
    margin: 0;
    color: #7f8c8d;
    font-size: 15px;
}

.text-center {
    text-align: center;
}




/* ==========================================================================
   ОБНОВЛЕННЫЙ ПОДВАЛ САЙТА (SITE FOOTER)
   ========================================================================== */
.site-footer {
    background: #fff;
    margin-top: auto;
    border-top: 1px solid #e6e8ec;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    box-sizing: border-box;
}

.footer-col h4 {
    color: #2c3e50;
    margin: 0 0 16px 0;
    font-size: 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}
.footer-col ul a:hover {
    color: #40b3d8;
}

.footer-text, .footer-schedule p {
    color: #7f8c8d;
    font-size: 15px;
    margin: 0 0 10px 0;
}
.footer-address {
    font-style: normal;
}
.footer-phone {
    display: block;
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    margin-bottom: 16px;
}

/* Соцсети */
.social-icons {
    display: flex;
    gap: 12px;
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f8f8;
    border-radius: 50%;
    color: #7f8c8d;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s;
}
.social-icons a:hover {
    background: #40b3d8;
    color: #fff;
}

/* Нижняя плашка копирайта */
.footer-bottom {
    border-top: 1px solid #f0f2f5;
    padding: 24px;
}
.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    color: #94a3b8;
    font-size: 14px;
}
.footer-bottom p {
    margin: 0;
}
.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
}
.footer-legal a:hover {
    color: #40b3d8;
}

/* ==========================================================================
   АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    /* Адаптация шапки */
    .mobile-menu-toggle {
        display: flex;
    }
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 12px 24px rgba(0,0,0,0.05);
        border-radius: 0 0 12px 12px;
        padding: 24px;
        box-sizing: border-box;
        border-top: 1px solid #f0f2f5;
    }
    .main-navigation.open {
        display: block;
    }
    .nav-menu {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    .header-actions {
        display: none; /* Прячем десктопные контакты на мобильных */
    }

    /* Анимация бургера при клике */
    .mobile-menu-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Адаптация подвала */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    .social-icons {
        justify-content: center;
    }
    .footer-bottom-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}










/* Контейнер формы на главном экране */
.express-form-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    margin: 32px auto 0 auto;
    max-width: 700px;
    text-align: left;
}
.express-form-container h3 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #2c3e50;
    text-align: center;
    font-size: 20px;
}

/* Строка полей ввода */
.form-inputs-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}
.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}
.input-group label {
    font-size: 13px;
    font-weight: bold;
    color: #64748b;
    margin-bottom: 8px;
}
.input-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #2c3e50;
    outline: none;
    transition: border-color 0.2s;
}
.input-group input:focus {
    border-color: #40b3d8;
}
.input-group .unit {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Кнопка отправки */
.btn-submit-metrics {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 14px;
}

/* Окна результатов экспресс-оценки */
.express-result-box {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 22px;
}
.hidden { display: none; }
.result-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.result-info { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.result-warning { background: #fffbp5; color: #9a3412; border: 1px solid #fed7aa; }
.result-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

@media (max-width: 600px) {
    .form-inputs-row {
        flex-direction: column;
        gap: 16px;
    }
}




@media (max-width: 840px) {
    .breadcrumbs {
        padding: 0 25px !important; /* На мобильных выравниваем крошки по внутреннему тексту статьи */
    }
}

 /* Стили для картинок, сгенерированных из Markdown */
.markdown-body img {
    max-width: 100%;    /* Картинка никогда не будет шире статьи */
    height: auto;       /* Пропорции сохраняются автоматически */
    display: block;     /* Убираем лишние нижние отступы инлайновых элементов */
    margin: 20px auto;  /* Центрируем картинку по горизонтали и делаем отступы */
    border-radius: 6px; /* Легкое скругление углов, как у блоков сайта */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Легкая тень для эстетики */
}
