/* article.css - стили для содержимого статей */

/* ===== ОСНОВНЫЕ СТИЛИ ДЛЯ КОНТЕНТА ===== */
.article-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #333333;
    word-wrap: break-word;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content > *:last-child {
    margin-bottom: 0;
}

/* ===== ЗАГОЛОВКИ ===== */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: "Roboto", sans-serif!important;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid #E30613;
    padding-bottom: 0.5rem;
    margin-top: 3rem;
}

.article-content h2:first-of-type {
    margin-top: 1.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #E30613;
}

.article-content h4 {
    font-size: 1.25rem;

    letter-spacing: 0.05em;
}

/* ===== ПАРАГРАФЫ ===== */
.article-content p {
    margin-bottom: 1.5rem;
}

/* ===== ССЫЛКИ ===== */
.article-content a {
    color: #E30613;
    text-decoration: none;
    border-bottom: 1px solid rgba(227, 6, 19, 0.3);
    transition: border-color 0.2s ease;
}

.article-content a:hover {
    border-bottom-color: #E30613;
}

/* ===== СПИСКИ ===== */
.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content ul {
    list-style-type: disc;
}

.article-content ul li {
    margin-bottom: 0.5rem;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content li > ul,
.article-content li > ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
}

/* ===== ЦИТАТЫ ===== */
.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background-color: #F5F5F5;
    border-left: 5px solid #E30613;
    font-style: italic;
    font-size: 1.125rem;
    color: #333333;
    border-radius: 0 1rem 1rem 0;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.875rem;
    color: #666666;
}

/* ===== КОД ===== */
.article-content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-radius: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f0f0f0;
    color: #E30613;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* ===== ТАБЛИЦЫ ===== */
.article-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: 1rem;
    line-height: 1.5;
}

.article-content th {
    background-color: #111111;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:hover {
    background-color: #f9f9f9;
}

/* ===== ИЗОБРАЖЕНИЯ ===== */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-content figure {
    margin: 2rem 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #666666;
    margin-top: 0.5rem;
}

/* ===== ВСТРОЕННЫЕ ЭЛЕМЕНТЫ ===== */
.article-content iframe {
    max-width: 100%;
    border-radius: 1rem;
    margin: 2rem 0;
}

.article-content hr {
    margin: 3rem 0;
    border: none;
    border-top: 2px solid #e5e5e5;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.75rem;
    }
    
    .article-content h3 {
        font-size: 1.35rem;
    }
    
    .article-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .article-content table {
        font-size: 0.875rem;
    }
    
    .article-content th,
    .article-content td {
        padding: 0.5rem 0.75rem;
    }
}

/* ===== ОГЛАВЛЕНИЕ (TOC) ===== */
.toc {
    background-color: #F5F5F5;
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-title {
    font-family: "PaluiSPDemo", "Roboto", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111111;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E30613;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.toc-list a {
    color: #333333;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.toc-list a:hover {
    color: #E30613;
    border-bottom-color: #E30613;
}

.toc-list a.active {
    color: #E30613;
    font-weight: 500;
}

/* Десктопная версия TOC (фиксированная) */
.toc-desktop {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Мобильная версия TOC */
.toc-mobile {
    display: none;
    margin-bottom: 2rem;
}

@media (max-width: 1023px) {
    .toc-desktop {
        display: none;
    }
    
    .toc-mobile {
        display: block;
    }
}



/* ===== ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
.article-content .highlight {
    background-color: rgba(227, 6, 19, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.article-content .button {
    display: inline-block;
    background-color: #111111;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border: none;
}

.article-content .button:hover {
    background-color: #E30613;
    color: white;
}

.article-content .button-red {
    background-color: #E30613;
}

.article-content .button-red:hover {
    background-color: #b30000;
}

/* ===== СНОСКИ ===== */
.article-content .footnotes {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
    font-size: 0.875rem;
    color: #666666;
}

.article-content .footnotes ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content .footnote-ref {
    font-size: 0.75rem;
    vertical-align: super;
    line-height: 0;
}


/* Иконки в мета-блоке */
.article-content .flex.items-center.gap-1 svg,
.text-gray-400 svg {
    display: inline-block;
    vertical-align: middle;
} 