/* ===== АВТОНОМНЫЙ CSS ДЛЯ ДОКУМЕНТАЦИИ ATMOS UNICOMM ===== */

/* 1. Импорт шрифта Inter с полным набором весов */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* 2. Цветовые переменные */
:root {
    /* Основные цвета (как на сайте) */
    --zenner-primary: #009EE2;
    --zenner-primary-dark: #0085C2;
    --zenner-secondary: #333333;
    --zenner-gray-light: #F5F5F5;
    --zenner-text-light: #f4f4f4;
    --zenner-hover-bg: #E6F4FB;
    --zenner-accent-green: #8DC63F;
    
    /* Дополнительные для документации */
    --docs-border: #e0e0e0;
    --docs-warning: #fff8e1;
    --docs-error: #ffebee;
    --docs-success: #e8f5e8;
    --docs-table-border: #e0e0e0;
}

/* 3. Базовые сбросы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    color: var(--zenner-secondary);
    background-color: #fff;
}

/* 4. Контейнеры */
.container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    padding: 0 15px;
}

/* 5. Типография с полным контролем веса */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 2.2rem; }
h2 { 
    font-size: 1.2rem; /* УМЕНЬШЕН с 1.8rem */
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--zenner-primary);
}
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Контроль жирности */
.light-100 { font-weight: 100; }
.light-200 { font-weight: 200; }
.light-300 { font-weight: 300; }
.regular-400 { font-weight: 400; }
.medium-500 { font-weight: 500; }
.semibold-600 { font-weight: 600; }
.bold-700 { font-weight: 700; }
.extrabold-800 { font-weight: 800; }
.black-900 { font-weight: 900; }

/* 6. Выравнивание текста по заполнению */
p, li, .docs-text {
    text-align: justify;
}

/* МИНИМАЛЬНЫЕ ВЕРТИКАЛЬНЫЕ ОТСТУПЫ МЕЖДУ АБЗАЦАМИ */
p {
    margin-bottom: 0.1em; /* ОЧЕНЬ маленький отступ */
    line-height: 1.6;
    text-indent: 1.5em; /* Отступ первой строки */
}

.docs-text p {
    margin-bottom: 0.1em;
    line-height: 1.6;
    text-indent: 1.5em;
}

/* Для списков - обычные отступы */
li {
    margin-bottom: 0.5em;
    text-align: justify;
    text-indent: 0;
}

/* Для предупреждений - свои отступы */
.docs-warning p {
    text-indent: 0;
    margin-bottom: 0.8em; /* Немного больше для важного текста */
}

/* Для секций тоже минимальные отступы */
.docs-section .docs-text p {
    margin-bottom: 0.1em;
    line-height: 1.6;
    text-indent: 1.5em;
}

/* Исключение для центрированных элементов */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* 7. Ссылки */
a {
    color: var(--zenner-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--zenner-primary-dark);
    text-decoration: underline;
}

/* 8. Списки */
ul, ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
    text-align: justify;
    text-indent: 0; /* Без отступа первой строки для списков */
}

/* ===== ХЕДЕР (как на сайте) ===== */
.docs-header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    border-bottom: 1px solid #eee;
}

.docs-logo {
    height: 50px;
    width: auto;
}

.header-info {
    text-align: right;
}

.company-name {
    font-weight: 600;
    color: #0085C2;
    margin-bottom: 3px;
    font-size: 1.2rem;
}

.contacts {
    display: flex;
    gap: 15px;
}

.phone {
    color: var(--zenner-secondary);
    font-size: 1rem;
    white-space: nowrap;
}

.phone i {
    color: var(--zenner-primary);
    margin-right: 5px;
}

/* Навигация (как на сайте) */
.docs-nav {
    background-color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0 2px;
}

.nav-link {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--zenner-secondary);
    font-weight: 500;
    font-size: 0.97rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.nav-link i {
    margin-right: 6px;
    color: var(--zenner-primary);
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--zenner-primary-dark);
    background-color: var(--zenner-hover-bg);
}

.nav-link.active {
    color: var(--zenner-primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--zenner-primary);
}

/* ===== НАВИГАЦИЯ ПО ДОКУМЕНТАЦИИ (docs-navigation) ===== */
.docs-navigation {
    background-color: #f8f9fa;
    padding: 20px 0;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
}

.docs-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.docs-nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.docs-nav-btn {
    padding: 10px 20px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: var(--zenner-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-nav-btn:hover {
    background-color: var(--zenner-hover-bg);
    border-color: var(--zenner-primary);
    color: var(--zenner-primary);
}

.docs-nav-btn.active {
    background-color: var(--zenner-primary);
    color: white;
    border-color: var(--zenner-primary);
}

.docs-nav-btn.active i {
    color: white;
}

/* ===== ГЕРОЙ-СЕКЦИЯ ===== */
.docs-hero {
    background-color: var(--zenner-gray-light);
    padding: 30px 10px;
    margin-bottom: 30px;
}

.docs-hero-content {
    max-width: 100%;
    margin: 0 auto;
}

.docs-title {
    font-size: 2.2rem;
    color: var(--zenner-primary);
    margin-bottom: 15px;
    font-weight: 300;
    text-align: left;
    width: 100%;
}

/* Подзаголовок убран */
.docs-subtitle {
    display: none;
}

/* ===== ПРЕДУПРЕЖДЕНИЯ ===== */
.docs-warning {
    background-color: var(--docs-warning);
    border-left: 5px solid #ff9800;
    padding: 25px;
    margin: 30px 0;
    border-radius: 5px;
}

.warning-title {
    color: #d32f2f;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-title i {
    color: #d32f2f;
}

.warning-list {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* Без отступа первой строки в предупреждениях */
.docs-warning p {
    text-indent: 0;
}

/* ===== ТАБЛИЦЫ (65% ширины, едва заметная сетка, по левому краю) ===== */
.docs-table-container {
    overflow-x: auto;
    margin: 25px 0;
    width: 65%;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--docs-table-border);
}

.docs-table th {
    background-color: var(--zenner-primary);
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    font-size: 1rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid var(--docs-table-border);
}

.docs-table th:last-child {
    border-right: none;
}

.docs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--docs-table-border);
    border-right: 1px solid var(--docs-table-border);
    color: #555;
    vertical-align: top;
    line-height: 1.5;
    text-align: left;
    text-indent: 0;
}

.docs-table td:last-child {
    border-right: none;
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.docs-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.docs-table tr:hover {
    background-color: var(--zenner-hover-bg);
}

/* ===== ИЗОБРАЖЕНИЯ ===== */
.docs-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.docs-image-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-right: auto;
}

.docs-image {
    width: 100%;
    height: 550px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 15px;
}

.docs-image-caption {
    padding: 15px;
    text-align: center;
    font-weight: 500;
    color: var(--zenner-secondary);
    border-top: 1px solid #eee;
    background-color: white;
}

/* ===== БАННЕР ===== */
.docs-banner {
    width: 100%;
    display: block;
    margin: 5px 0 0 0;
}

.docs-banner img {
    width: 100%;
    height: 28vh;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

/* ===== ФУТЕР ===== */
.docs-footer {
    background-color: #f4f4f4;
    color: var(--zenner-primary-dark);
    padding: 25px 0 15px;
    margin-top: 50px;
    border-top: 1px solid #ddd;
}

.footer-content {
    max-width: 1200px;
    width: 85%;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-contacts {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.contacts-horizontal {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    font-size: 0.9rem;
    white-space: nowrap;
    font-weight: 500;
}

.contact-item i {
    color: var(--zenner-primary-dark);
    font-size: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    color: #555555;
    font-size: 0.95rem;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.footer-bottom p {
    margin: 0;
    padding: 0;
    text-align: center;
    display: block;
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--zenner-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 158, 226, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: var(--zenner-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 158, 226, 0.4);
}

/* ===== СЕКЦИИ ===== */
.docs-section {
    margin: 40px 0;
}

.section-heading {
    font-size: 1.2rem;
    color: var(--zenner-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-weight: 500;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ НОВОЙ СТРУКТУРЫ ===== */

/* Главный заголовок перед навигацией */
.docs-page-title {
    font-size: 1.7rem;
    color: var(--zenner-primary);
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
    width: 100%;
    padding-top: 10px;
}

/* БЕЛЫЙ КОНТЕЙНЕР для заголовка раздела */
.section-header-container {
    background-color: white;
    padding: 25px 20px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--zenner-primary);
}

/* Название раздела в белом контейнере */
.section-title {
    font-size: 1.5rem;
    color: var(--zenner-secondary);
    margin-bottom: 20px;
    font-weight: 500;
    text-align: left;
}

/* Навигация между разделами */
.docs-page-navigation {
    display: flex;
    justify-content: space-between;
    margin: 50px 0 30px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-prev, .nav-next {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: white;
    border: 2px solid var(--zenner-primary);
    border-radius: 6px;
    color: var(--zenner-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 220px;
}

.nav-prev:hover, .nav-next:hover {
    background-color: var(--zenner-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 158, 226, 0.2);
}

.nav-prev i {
    margin-right: 5px;
}

.nav-next i {
    margin-left: 5px;
}

.nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #777;
}

.nav-disabled:hover {
    background-color: white;
    color: #777;
    transform: none;
    box-shadow: none;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1100px) {
    .docs-table-container {
        width: 80%;
    }
    
    .docs-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .container {
        width: 95%;
    }
    
    .docs-title {
        font-size: 1.9rem;
    }
    
    .docs-table-container {
        width: 95%;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .contacts-horizontal {
        flex-direction: column;
        gap: 12px;
    }
    
    .docs-page-title {
        font-size: 1.5rem;
    }
    
    /* Адаптация навигации между страницами */
    .docs-page-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-prev, .nav-next {
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px 0;
    }
    
    .header-info {
        text-align: center;
    }
    
    .contacts {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-item {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
        border-radius: 4px;
        margin: 2px 0;
    }
    
    .docs-nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .docs-nav-btn {
        width: 200px;
        justify-content: center;
    }
    
    .docs-image-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .docs-image {
        height: 200px;
    }
    
    .docs-table {
        font-size: 0.95rem;
    }
    
    .docs-table th,
    .docs-table td {
        padding: 10px 12px;
    }
    
    /* На мобильных таблицы по центру */
    .docs-table-container {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .docs-title {
        font-size: 1.7rem;
    }
    
    .docs-banner img {
        height: 15vh;
        max-height: 150px;
    }
    
    .docs-nav-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .contacts-horizontal {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .contact-item {
        font-size: 0.85rem;
    }
    
    .footer-content {
        width: 100%;
        padding: 0 10px;
    }
}

/* ===== СТИЛИ ДЛЯ ПЕЧАТИ (подготовка к PDF) ===== */
@media print {
    .docs-navigation,
    .scroll-top-btn,
    .nav-link,
    .phone,
    .footer-top {
        display: none !important;
    }
    
    .docs-table-container {
        width: 100% !important;
        margin: 15px 0 !important;
        box-shadow: none !important;
    }
    
    .docs-table {
        border: 1px solid #000 !important;
    }
    
    .docs-table th,
    .docs-table td {
        border: 1px solid #000 !important;
        color: #000 !important;
        background-color: white !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    .docs-warning {
        border: 1px solid #000 !important;
        background-color: white !important;
    }
    
    .docs-banner {
        display: none !important;
        margin-bottom: 10px !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }
    
    h1 { font-size: 18pt !important; }
    h2 { font-size: 14pt !important; }
    h3 { font-size: 12pt !important; }
    h4 { font-size: 11pt !important; }
    
    /* Для печати убираем отступ первой строки */
    p {
        text-indent: 0 !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}