/**
 * Content Styles
 * Стили ТОЛЬКО для текстового контента статей
 * Применяются к .article-text-content - специальный класс для текста
 */

/* ============================================
   TYPOGRAPHY - ЗАГОЛОВКИ
   Только для текстового контента внутри статьи
   ============================================ */

.article-text-content h1,
.article-text-content h2,
.article-text-content h3,
.article-text-content h4,
.article-text-content h5,
.article-text-content h6,
.home-content__inner h1,
.home-content__inner h2,
.home-content__inner h3,
.home-content__inner h4,
.home-content__inner h5,
.home-content__inner h6,
.home-intro h1,
.home-intro h2,
.home-intro h3,
.home-intro h4,
.home-intro h5,
.home-intro h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: var(--heading-color, #1a1a2e);
}

.article-text-content h1:first-child,
.home-content__inner h1:first-child,
.home-intro h1:first-child,
.entry-content h1:first-child {
    margin-top: 0;
}

.article-text-content h2,
.home-content__inner h2,
.home-intro h2,
.entry-content h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary, #16a34a);
    display: inline-block;
}

.article-text-content h3,
.home-content__inner h3,
.home-intro h3,
.entry-content h3 {
    font-size: 1.4rem;
    color: var(--primary, #16a34a);
}

.article-text-content h4,
.home-content__inner h4,
.home-intro h4,
.entry-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.article-text-content h5,
.home-content__inner h5,
.home-intro h5,
.entry-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-text-content h6,
.home-content__inner h6,
.home-intro h6,
.entry-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light, #6c757d);
}

/* ============================================
   PARAGRAPHS & TEXT - ПАРАГРАФЫ
   ============================================ */

.article-text-content p,
.home-content__inner p,
.home-intro p,
.entry-content p {
    margin-bottom: 1.25em;
    line-height: 1.8;
    color: var(--text, #333);
}

.article-text-content strong,
.home-content__inner strong,
.home-intro strong,
.entry-content strong {
    font-weight: 700;
    color: var(--heading-color, #1a1a2e);
}

.article-text-content em,
.home-content__inner em,
.home-intro em,
.entry-content em {
    font-style: italic;
}

.article-text-content mark,
.home-content__inner mark,
.home-intro mark,
.entry-content mark {
    background: linear-gradient(120deg, rgba(22, 163, 74, 0.2), rgba(22, 163, 74, 0.3));
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

/* ============================================
   LISTS - СПИСКИ
   ============================================ */

.article-text-content ul,
.home-content__inner ul,
.home-intro ul,
.entry-content ul,
.article-text-content ol,
.home-content__inner ol,
.home-intro ol,
.entry-content ol {
    margin: 1.25em 0;
    padding-left: 0;
    list-style: none;
}

.article-text-content ul li,
.home-content__inner ul li,
.home-intro ul li,
.entry-content ul li {
    position: relative;
    padding-left: 1.75em;
    margin-bottom: 0.75em;
    line-height: 1.7;
}

.article-text-content ul li::before,
.home-content__inner ul li::before,
.home-intro ul li::before,
.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary, #16a34a), var(--primary-dark, #15803d));
    border-radius: 50%;
}

/* Nested lists */
.article-text-content ul ul,
.home-content__inner ul ul,
.home-intro ul ul,
.entry-content ul ul {
    margin: 0.5em 0 0.5em 0;
}

.article-text-content ul ul li::before,
.home-content__inner ul ul li::before,
.home-intro ul ul li::before,
.entry-content ul ul li::before {
    background: transparent;
    border: 2px solid var(--primary, #16a34a);
}

/* Ordered lists */
.article-text-content ol,
.home-content__inner ol,
.home-intro ol,
.entry-content ol {
    counter-reset: ol-counter;
}

.article-text-content ol li,
.home-content__inner ol li,
.home-intro ol li,
.entry-content ol li {
    position: relative;
    padding-left: 2.5em;
    margin-bottom: 0.75em;
    line-height: 1.7;
    counter-increment: ol-counter;
}

.article-text-content ol li::before,
.home-content__inner ol li::before,
.home-intro ol li::before,
.entry-content ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    height: 1.75em;
    background: linear-gradient(135deg, var(--primary, #16a34a), var(--primary-dark, #15803d));
    color: white;
    font-weight: 700;
    font-size: 0.85em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   TABLES - ТАБЛИЦЫ
   ============================================ */

.article-text-content table,
.home-content__inner table,
.home-intro table,
.entry-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.article-text-content table thead th,
.home-content__inner table thead th,
.home-intro table thead th,
.entry-content table thead th {
    background: linear-gradient(135deg, var(--primary, #16a34a), var(--primary-dark, #15803d));
    color: white;
    font-weight: 700;
    text-align: left;
    padding: 1em 1.25em;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-text-content table tbody td,
.home-content__inner table tbody td,
.home-intro table tbody td,
.entry-content table tbody td {
    padding: 1em 1.25em;
    border-bottom: 1px solid var(--border, #e9ecef);
    background: white;
}

.article-text-content table tbody tr:last-child td,
.home-content__inner table tbody tr:last-child td,
.home-intro table tbody tr:last-child td,
.entry-content table tbody tr:last-child td {
    border-bottom: none;
}

.article-text-content table tbody tr:nth-child(even) td,
.home-content__inner table tbody tr:nth-child(even) td,
.home-intro table tbody tr:nth-child(even) td,
.entry-content table tbody tr:nth-child(even) td {
    background: var(--bg-alt, #f8f9fa);
}

.article-text-content table tbody tr:hover td,
.home-content__inner table tbody tr:hover td,
.home-intro table tbody tr:hover td,
.entry-content table tbody tr:hover td {
    background: rgba(22, 163, 74, 0.05);
}

/* Responsive tables */
@media (max-width: 768px) {
    .article-text-content table,
    .home-content__inner table,
    .home-intro table,
    .entry-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   BLOCKQUOTES - БЛОК ВНИМАНИЯ
   ============================================ */

.article-text-content blockquote,
.home-content__inner blockquote,
.home-intro blockquote,
.entry-content blockquote {
    position: relative;
    margin: 2em 0;
    padding: 1.5em 1.5em 1.5em 4em;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    font-style: normal;
    font-size: 0.95em;
    line-height: 1.75;
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.article-text-content blockquote::before,
.home-content__inner blockquote::before,
.home-intro blockquote::before,
.entry-content blockquote::before {
    content: '\f071';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 1.2em;
    top: 1.5em;
    font-size: 1.2em;
    color: #f59e0b;
    line-height: 1;
}

.article-text-content blockquote p:first-child,
.home-content__inner blockquote p:first-child,
.home-intro blockquote p:first-child,
.entry-content blockquote p:first-child {
    margin-top: 0;
}

.article-text-content blockquote p:last-child,
.home-content__inner blockquote p:last-child,
.home-intro blockquote p:last-child,
.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-text-content blockquote strong,
.home-content__inner blockquote strong,
.home-intro blockquote strong,
.entry-content blockquote strong {
    color: #78350f;
    font-weight: 700;
}

.article-text-content blockquote a,
.home-content__inner blockquote a,
.home-intro blockquote a,
.entry-content blockquote a {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(0, 92, 49, 0.3);
    text-underline-offset: 2px;
}

.article-text-content blockquote a:hover,
.home-content__inner blockquote a:hover,
.home-intro blockquote a:hover,
.entry-content blockquote a:hover {
    color: #166534;
    text-decoration-color: #166534;
}

.article-text-content blockquote cite,
.home-content__inner blockquote cite,
.home-intro blockquote cite,
.entry-content blockquote cite {
    display: block;
    margin-top: 0.75em;
    padding-top: 0.75em;
    border-top: 1px solid #f0fdf4;
    font-style: normal;
    font-weight: 600;
    color: #16a34a;
    font-size: 0.85em;
}

.article-text-content blockquote cite::before,
.home-content__inner blockquote cite::before,
.home-intro blockquote cite::before,
.entry-content blockquote cite::before {
    content: '';
}

/* ============================================
   CODE & PRE - КОД
   ============================================ */

.article-text-content code,
.home-content__inner code,
.home-intro code,
.entry-content code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    background: var(--bg-alt, #f1f3f5);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-dark, #15803d);
}

.article-text-content pre,
.home-content__inner pre,
.home-intro pre,
.entry-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 1.5em;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.article-text-content pre code,
.home-content__inner pre code,
.home-intro pre code,
.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================
   LINKS - ССЫЛКИ (только для текстового контента)
   ============================================ */

.article-text-content a,
.home-content__inner a,
.home-intro a,
.entry-content a {
    color: var(--primary, #16a34a);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-text-content a:hover,
.home-content__inner a:hover,
.home-intro a:hover,
.entry-content a:hover {
    color: var(--primary-dark, #15803d);
    border-bottom-color: var(--primary, #16a34a);
}

/* ============================================
   IMAGES - ИЗОБРАЖЕНИЯ
   ============================================ */

.article-text-content img,
.home-content__inner img,
.home-intro img,
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-text-content figure,
.home-content__inner figure,
.home-intro figure,
.entry-content figure {
    margin: 2em 0;
}

.article-text-content figcaption,
.home-content__inner figcaption,
.home-intro figcaption,
.entry-content figcaption {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-light, #6c757d);
    margin-top: 0.75em;
    font-style: italic;
}

/* ============================================
   HORIZONTAL RULE - РАЗДЕЛИТЕЛЬ
   ============================================ */

.article-text-content hr,
.home-content__inner hr,
.home-intro hr,
.entry-content hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary, #16a34a), transparent);
    margin: 2.5em 0;
    border-radius: 3px;
}

/* ============================================
   SPECIAL BLOCKS - СПЕЦИАЛЬНЫЕ БЛОКИ
   ============================================ */

/* Info/Note block */
.article-text-content .note,
.home-content__inner .note,
.entry-content .note,
.article-text-content .info,
.home-content__inner .info,
.entry-content .info {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-left: 4px solid #16a34a;
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
}

/* Warning block */
.article-text-content .warning,
.home-content__inner .warning,
.entry-content .warning {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-left: 4px solid #ff9800;
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
}

/* Success block */
.article-text-content .success,
.home-content__inner .success,
.entry-content .success {
    background: linear-gradient(135deg, #f7fef9, #f0fdf4);
    border-left: 4px solid #16a34a;
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
}

/* Danger block */
.article-text-content .danger,
.home-content__inner .danger,
.entry-content .danger {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-left: 4px solid #f44336;
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
}

/* ============================================
   HOME PAGE SPECIFIC STYLES
   ============================================ */

/* Hero intro section on homepage */
.home-intro {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(0, 92, 49, 0.12));
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(22, 163, 74, 0.15);
}

.home-intro::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.home-intro > * {
    position: relative;
    z-index: 1;
}

.home-intro p:first-child {
    font-size: 1.15em;
    color: var(--heading-color, #1a1a2e);
}

/* Main content section on homepage */
.home-content {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 2px solid var(--border, #e9ecef);
    position: relative;
}

.home-content::before {
    content: 'Больше о каталоге';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-main, #f4f5f7);
    padding: 0 20px;
    font-size: 0.85em;
    color: var(--text-light, #6c757d);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.home-content__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Subtitle styling */
.home-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary, #16a34a);
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary, #16a34a);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .home-intro {
        padding: 25px;
        margin-bottom: 30px;
    }
    
    .home-content {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .home-content__inner {
        padding: 0;
    }
    
    .article-text-content h2,
    .home-content__inner h2,
    .home-intro h2,
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .article-text-content h3,
    .home-content__inner h3,
    .home-intro h3,
    .entry-content h3 {
        font-size: 1.25rem;
    }
    
    .article-text-content blockquote,
    .home-content__inner blockquote,
    .home-intro blockquote,
    .entry-content blockquote {
        padding: 1em 1.25em 1em 3em;
        font-size: 0.9em;
    }
    
    .article-text-content blockquote::before,
    .home-content__inner blockquote::before,
    .home-intro blockquote::before,
    .entry-content blockquote::before {
        font-size: 1em;
        left: 0.9em;
        top: 1.05em;
    }
}
