/* docs.css - Стили для документации PlanerMAX */

/* ========== RESET И БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    min-height: 100vh;
}

a {
    color: #4F46E5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main {
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
}

.text-primary {
    color: #4F46E5;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(to bottom right, #EBF4FF, #E0E7FF);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo a {
    color: #1a202c;
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
}

/* ========== НАВИГАЦИЯ ========== */
.nav-desktop {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-desktop a {
    color: #1a202c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-desktop a:hover {
    color: #4F46E5;
    text-decoration: none;
}

.nav-desktop a.active {
    color: #4F46E5;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #1a202c;
    transition: all 0.3s;
    border-radius: 2px;
}

/* ИСПРАВЛЕНИЕ: По умолчанию мобильное меню должно быть скрыто */
.nav-mobile {
    display: none;
}

/* ========== ДОКУМЕНТАЦИЯ - ГЛАВНАЯ ========== */
.docs-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.docs-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
}

.docs-header .lead {
    font-size: 1.25rem;
    color: #4a5568;
    max-width: 800px;
    margin: 0 auto;
}

/* ========== РАЗДЕЛЫ ДОКУМЕНТАЦИИ ========== */
.docs-sections {
    margin-bottom: 4rem;
}

.docs-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.docs-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.docs-section > p {
    color: #718096;
    margin-bottom: 1.5rem;
}

/* ========== КАРТОЧКИ ДОКУМЕНТАЦИИ ========== */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    display: block;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #4F46E5;
    text-decoration: none;
}

.doc-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.doc-card p {
    color: #718096;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.doc-time {
    display: inline-block;
    font-size: 0.75rem;
    color: #a0aec0;
    background: #f7fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ========== QUICK START БЛОК ========== */
.quick-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.quick-start h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.quick-start ol {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.quick-start li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-start li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: white;
    color: #667eea;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quick-start a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.quick-start a:hover {
    text-decoration-thickness: 2px;
}

/* ========== FOOTER ========== */
.footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.footer p {
    color: #a0aec0;
}

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

.footer li {
    margin: 0.5rem 0;
}

.footer a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    text-align: center;
    color: #718096;
}

/* ========== СТРАНИЦА СТАТЬИ ДОКУМЕНТАЦИИ ========== */
.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.docs-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.docs-nav h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #718096;
    margin: 2rem 0 0.75rem;
    letter-spacing: 0.05em;
}

.docs-nav h3:first-child {
    margin-top: 0;
}

.docs-nav ul {
    list-style: none;
    padding: 0;
}

.docs-nav li {
    margin: 0.25rem 0;
}

.docs-nav a {
    color: #4a5568;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.docs-nav a:hover {
    background: #f8fafc;
    color: #1a202c;
    border-left-color: #4F46E5;
    text-decoration: none;
}

.docs-nav a.active {
    background: #f8fafc;
    color: #4F46E5;
    font-weight: 600;
    border-left-color: #4F46E5;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: #718096;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #4F46E5;
}

/* Article Content - Улучшенная читабельность */
.docs-article {
    max-width: 800px;
    font-size: 16px;
    line-height: 1.7;
}

.docs-article h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.docs-article h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937;
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
}

.docs-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    margin: 2rem 0 0.75rem;
}

.docs-article p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #374151;
    font-size: 16px;
}

.docs-article strong {
    color: #111827;
    font-weight: 600;
}

.docs-article ul,
.docs-article ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #374151;
}

.docs-article li {
    margin: 0.5rem 0;
    line-height: 1.75;
    font-size: 16px;
    color: #374151;
}

/* Tables */
.docs-article table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    display: block;
}

.docs-article th,
.docs-article td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.docs-article th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a202c;
}

.docs-article tr:hover {
    background: #f8fafc;
}

/* Example Box - Улучшенный контраст */
.example-box {
    background: #F9FAFB;
    border-left: 4px solid #4F46E5;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 15px;
    color: #374151;
}

.example-box p {
    margin-bottom: 0;
}

/* Docs Navigation (Previous/Next) */
.docs-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.nav-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-prev,
.nav-next {
    flex: 1;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.nav-prev a,
.nav-next a {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-prev a:hover,
.nav-next a:hover {
    color: #4338CA;
    text-decoration: underline;
}

/* Additional Resources */
.additional-resources {
    margin-top: 3rem;
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.additional-resources h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

.resource-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.resource-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.resource-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.resource-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.resource-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.resource-card p {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Мобильное меню в мобильной версии */
    .nav-mobile {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-mobile.active {
        max-height: 400px;
    }
    
    .nav-mobile a {
        display: block;
        padding: 1rem 20px;
        color: #1a202c;
        text-decoration: none;
        border-bottom: 1px solid #E2E8F0;
    }
    
    .nav-mobile a:hover {
        background: #f8fafc;
        text-decoration: none;
    }
    
    .docs-header h1 {
        font-size: 1.875rem;
    }
    
    .docs-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .docs-container {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
        margin-bottom: 2rem;
        background: #f8fafc;
        border-radius: 8px;
        padding: 1.5rem;
    }
    
    .quick-start {
        padding: 1.5rem;
    }
    
    .docs-article h1 {
        font-size: 1.875rem;
    }
    
    /* Navigation on mobile */
    .nav-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-prev,
    .nav-next {
        text-align: center;
    }
    
    .resource-cards {
        grid-template-columns: 1fr;
    }
    
    .next-steps {
        padding: 2rem 1.5rem;
    }
}

/* Анимация кнопки гамбургера */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Code styling */
.docs-article code {
    background: #f1f5f9;
    color: #475569;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    font-weight: 500;
}

.docs-article pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.docs-article pre code {
    background: none;
    padding: 0;
    color: #334155;
    font-size: 0.875rem;
}

/* Blockquotes */
.docs-article blockquote {
    border-left: 4px solid #e2e8f0;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    font-style: italic;
    color: #64748b;
}

.docs-article blockquote p {
    margin-bottom: 0;
}

/* Checklist with checkboxes */
.checklist {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.checklist-items {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.checklist-items li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.checklist-items input[type="checkbox"] {
    margin: 0;
}

/* Дополнительные стили для страницы форматирования */

/* Сравнение "до/после" форматирования */
.formatting-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.before-formatting,
.after-formatting {
    padding: 1.5rem;
}

.before-formatting {
    background: #fef2f2;
    border-right: 1px solid #e2e8f0;
}

.after-formatting {
    background: #f0fdf4;
}

.plain-text-example {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 0.25rem;
    font-family: inherit;
}

.formatted-text-example {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 0.25rem;
}

/* Примеры Markdown кода */
.markdown-examples {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.markdown-examples pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.markdown-examples code {
    background: none;
    color: #374151;
    font-size: 0.875rem;
}

/* Примеры шаблонов */
.template-example {
    background: #f8fafc;
    border-left: 4px solid #10b981;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.template-example pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Примеры ошибок */
.error-examples {
    margin: 1.5rem 0;
}

.wrong-example,
.correct-example {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
}

.wrong-example {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.correct-example {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

.wrong-example pre,
.correct-example pre {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    margin: 0.5rem 0 0;
    border-radius: 0.25rem;
}

/* HTML примеры */
.html-examples {
    background: #fef7ff;
    border: 1px solid #e879f9;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.html-examples pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Зачеркнутый текст */
del {
    text-decoration: line-through;
    color: #6b7280;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .formatting-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .before-formatting {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* ========== ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНОЙ ВЕРСИИ ========== */

/* Предотвращение горизонтального скролла */
.docs-article {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Адаптация блоков с кодом */
.docs-article pre {
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.docs-article code {
    word-break: break-word;
}

/* Адаптация inline кода */
.docs-article p code,
.docs-article li code {
    white-space: normal;
    word-break: break-word;
}

/* Блоки с примерами Markdown */
.markdown-examples,
.html-examples,
.template-example {
    overflow-x: auto;
    max-width: 100%;
}

.markdown-examples pre,
.html-examples pre,
.template-example pre {
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
}

/* Адаптация таблиц */
.docs-article table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Блок сравнения форматирования */
.formatting-comparison {
    overflow-x: auto;
    max-width: 100%;
}

/* Блоки ошибок */
.error-examples,
.wrong-example,
.correct-example {
    overflow-x: auto;
    max-width: 100%;
}

.wrong-example pre,
.correct-example pre {
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
}

/* Example box */
.example-box {
    overflow-x: auto;
    max-width: 100%;
}

/* Checklist */
.checklist {
    overflow-x: auto;
    max-width: 100%;
}

/* ========== МЕДИА-ЗАПРОСЫ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 768px) {
    /* Основной контейнер статьи */
    .docs-article {
        max-width: 100%;
        padding: 0 10px;
        font-size: 15px;
    }
    
    /* Заголовки */
    .docs-article h1 {
        font-size: 1.75rem;
        word-break: break-word;
    }
    
    .docs-article h2 {
        font-size: 1.35rem;
        word-break: break-word;
    }
    
    .docs-article h3 {
        font-size: 1.15rem;
        word-break: break-word;
    }
    
    /* Параграфы и списки */
    .docs-article p,
    .docs-article li {
        font-size: 15px;
        word-break: break-word;
    }
    
    /* Блок сравнения - делаем вертикальным */
    .formatting-comparison {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .before-formatting {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0;
    }
    
    /* Блоки с кодом - добавляем горизонтальную прокрутку */
    .markdown-examples,
    .html-examples,
    .template-example {
        border-radius: 0.5rem;
        position: relative;
    }
    
    .markdown-examples pre,
    .html-examples pre,
    .template-example pre,
    .error-examples pre {
        font-size: 12px;
        padding: 0.75rem;
        border-radius: 0.25rem;
    }
    
    /* Индикатор прокрутки для блоков кода */
    .markdown-examples::after,
    .html-examples::after,
    .template-example::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.9);
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 18px;
        color: #4F46E5;
        pointer-events: none;
        opacity: 0.7;
    }
    
    /* Скрываем индикатор если нет прокрутки */
    .markdown-examples:not(:hover)::after,
    .html-examples:not(:hover)::after,
    .template-example:not(:hover)::after {
        display: none;
    }
    
    /* Таблицы */
    .docs-article table {
        font-size: 13px;
        min-width: 100%;
    }
    
    .docs-article th,
    .docs-article td {
        padding: 0.75rem 0.5rem;
        min-width: 100px;
    }
    
    /* Навигация */
    .docs-navigation {
        padding: 1rem;
    }
    
    .nav-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-prev,
    .nav-next {
        width: 100%;
        text-align: center !important;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 0.5rem;
    }
    
    /* Дополнительные ресурсы */
    .additional-resources {
        padding: 1.5rem;
        margin: 2rem -10px 0;
    }
    
    .resource-cards {
        gap: 0.75rem;
    }
    
    .resource-card {
        padding: 1rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 12px;
        flex-wrap: wrap;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    /* Example boxes */
    .example-box {
        padding: 1rem;
        margin: 1.5rem 0;
        font-size: 14px;
    }
    
    /* Checklist */
    .checklist {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .checklist-items {
        font-size: 14px;
    }
    
    /* Error examples */
    .wrong-example,
    .correct-example {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    /* Lists */
    .docs-article ul,
    .docs-article ol {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }
    
    /* Main container padding adjustment */
    .main {
        padding: 1.5rem 0;
    }
    
    .docs-container {
        padding: 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .docs-article {
        padding: 0 8px;
        font-size: 14px;
    }
    
    .docs-article h1 {
        font-size: 1.5rem;
    }
    
    .docs-article h2 {
        font-size: 1.25rem;
    }
    
    .docs-article h3 {
        font-size: 1.1rem;
    }
    
    .docs-article p,
    .docs-article li {
        font-size: 14px;
    }
    
    .markdown-examples pre,
    .html-examples pre,
    .template-example pre {
        font-size: 11px;
        padding: 0.5rem;
    }
}

/* Улучшение читаемости кода на мобильных */
@media (max-width: 768px) and (hover: none) {
    /* На тач-устройствах показываем визуальную подсказку о прокрутке */
    .markdown-examples,
    .html-examples,
    .template-example,
    .docs-article table {
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1);
    }
}

/* Форсированная адаптация для очень длинных строк кода */
@media (max-width: 768px) {
    .markdown-examples pre,
    .html-examples pre,
    .template-example pre,
    .error-examples pre {
        white-space: pre-wrap !important;  /* Переносим длинные строки */
        word-break: break-all !important;  /* Разрываем слова если нужно */
    }
    
    /* Альтернатива - если хотите оставить горизонтальную прокрутку */
    /* но ограничить ширину контейнера */
    .markdown-examples,
    .html-examples,
    .template-example {
        max-width: calc(100vw - 20px);
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Стили для изображений в документации */
.docs-image {
    margin: 2rem 0;
    text-align: center;
}

.docs-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
    font-style: italic;
}

@media (max-width: 768px) {
    .docs-image {
        margin: 1.5rem -10px;
    }
    
    .docs-image img {
        border-radius: 4px;
    }
}