/* ==========================================
   ГЛОБАЛЬНАЯ ТИПОГРАФИКА И СТИЛИ КОНТЕНТА
   (WP ENTRY CONTENT & TYPOGRAPHY)
   ========================================== */

/* Фоновый цвет для холста редактора Гутенберг */
.editor-styles-wrapper {
    background-color: var(--color-bg, #0B0C10) !important;
    color: var(--color-text, #EAEAEA);
}

body,
.entry-content,
.content-area,
.editor-styles-wrapper {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==========================================
   ОБЕРТКА СТРАНИЦ И СТАТЕЙ (LAYOUT & ПОДЛОЖКА)
   ========================================== */

/* Внешний отступ от шапки сайта */
.site-content-wrapper {
    padding-top: clamp(2.5rem, 5vw, 4rem);
    padding-bottom: clamp(3.5rem, 6vw, 6rem);
    background-color: var(--color-bg, #0B0C10);
    position: relative;
    z-index: 2;
}

/* Сброс лишних фонов и отступов у общих контейнеров */
.content-area,
.site-main,
.single-post .site-main,
.page .site-main {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Единая фирменная подложка-карточка (расширенная версия) */
.content-card-wrapper {
    max-width: 900px!important; /* Увеличено с 900px */
    width: 100%;
    margin-inline: auto;
    background: linear-gradient(180deg, rgba(25, 28, 34, 0.75) 0%, rgba(14, 16, 20, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg, 16px);
    padding: clamp(2rem, 4.5vw, 3.8rem) clamp(1.8rem, 5vw, 4.5rem);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

/* Очистка стилей внешних оберток на статических страницах */
.page .content-area,
.single .content-area {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Шапка статьи / страницы */
.entry-header {
    margin-bottom: 1.5rem;
}

/* Хлебные крошки внутри карточки */
.article-breadcrumbs,
.breadcrumbs,
.breadcrumbs-nav,
.dc24-breadcrumbs,
.rank-math-breadcrumb {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.85rem !important;
    padding: 0 !important;
    background: transparent !important;
}

.article-breadcrumbs a,
.breadcrumbs a,
.dc24-breadcrumbs a,
.rank-math-breadcrumb a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition-base, 0.2s ease);
}

.article-breadcrumbs a:hover,
.breadcrumbs a:hover,
.dc24-breadcrumbs a:hover,
.rank-math-breadcrumb a:hover {
    color: var(--color-primary, #D4AF37);
}

/* Главный заголовок H1 */
.entry-title,
.content-card-wrapper > header > h1,
.content-card-wrapper > h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    margin-top: 0 !important;
    margin-bottom: 0.65rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* Дата публикации */
.entry-meta {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 1.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==========================================
   БАЗОВЫЕ ЗАГОЛОВКИ (H1 - H6)
   ========================================== */
h1, h2, h3, h4, h5, h6,
.editor-styles-wrapper .wp-block-heading {
    font-family: var(--font-heading);
    color: var(--color-heading, #FFFFFF);
    font-weight: 600;
    line-height: var(--lh-heading, 1.25);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
    margin-top: var(--space-6, 2rem);
    margin-bottom: var(--space-3, 1rem);
    clear: both;
}

h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); color: #F3F4F6; }
h4 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); opacity: 0.9; }
h5 { font-size: 1rem; opacity: 0.85; }
h6 { font-size: 0.9rem; opacity: 0.8; letter-spacing: 0.04em; }

.entry-content > *:first-child,
.content-area > *:first-child {
    margin-top: 0 !important;
}

/* Подзаголовки со стилизованной золотой линией внутри статей */
.entry-content h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    border-left: 3.5px solid var(--color-primary, #D4AF37);
    padding-left: 0.85rem;
    margin-top: clamp(2rem, 3vw, 2.8rem);
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #FFFFFF;
}

.entry-content h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    margin-top: 1.6rem;
    margin-bottom: 0.75rem;
    color: #F3F4F6;
}

/* ==========================================
   ТЕКСТ СТАТЕЙ (.ENTRY-CONTENT) - МЯГКИЙ ГРАФИТ
   ========================================== */
.entry-content,
.editor-styles-wrapper {
    color: rgba(255, 255, 255, 0.76);
    font-size: clamp(1.03rem, 1.2vw, 1.12rem);
    line-height: 1.75;
    letter-spacing: 0.012em;
}

.entry-content p,
.comment-content p,
.editor-styles-wrapper p,
.editor-styles-wrapper .wp-block-paragraph {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.76);
    letter-spacing: 0.012em;
    margin-top: 0;
    margin-bottom: 1.4rem;
}

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

.entry-content strong,
.entry-content b,
.editor-styles-wrapper strong {
    font-weight: 600;
    color: #FFFFFF;
}

/* ==========================================
   ИЗОБРАЖЕНИЯ И МЕДИА
   ========================================== */
.entry-content figure,
.editor-styles-wrapper figure,
.entry-content .wp-block-image,
.editor-styles-wrapper .wp-block-image {
    margin: clamp(1.8rem, 3vw, 2.5rem) 0;
    padding: 0;
    background: transparent !important;
    border: none !important;
}

.entry-content img,
.entry-content figure img,
.entry-content .wp-block-image img,
.editor-styles-wrapper .wp-block-image img {
    border-radius: var(--radius-md, 10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65);
    max-width: 100%;
    height: auto;
    display: block;
}

.wp-caption-text,
figcaption {
    font-size: var(--fs-sm, 0.875rem);
    color: var(--color-text-muted, #95A5A6);
    text-align: center;
    margin-top: var(--space-2, 0.5rem);
    letter-spacing: 0.01em;
}

/* ==========================================
   ССЫЛКИ
   ========================================== */
.entry-content a {
    color: var(--color-primary, #D4AF37);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color var(--transition-base, 0.2s ease), text-decoration-color var(--transition-base, 0.2s ease);
}

.entry-content a:hover {
    color: var(--color-primary-hover, #F5D061);
    text-decoration: none;
}

/* ==========================================
   СПИСКИ
   ========================================== */
.entry-content ul,
.entry-content ol,
.editor-styles-wrapper ul.wp-block-list,
.editor-styles-wrapper ol.wp-block-list {
    margin: 0 0 1.5rem 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.76);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.entry-content ul { list-style: disc !important; }
.entry-content ol { list-style: decimal !important; }

.entry-content li,
.editor-styles-wrapper li {
    font-size: 1.03rem;
    line-height: 1.65;
    margin-bottom: var(--space-2, 0.4rem);
}

.entry-content ul::marker,
.entry-content ol::marker {
    color: var(--color-primary, #D4AF37);
}

/* ==========================================
   ЦИТАТЫ (BLOCKQUOTE)
   ========================================== */
blockquote,
.entry-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 3.5px solid var(--color-primary, #D4AF37);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.06) 0%, rgba(25, 28, 34, 0.4) 100%);
    border-radius: 0 8px 8px 0;
}

blockquote p,
.entry-content blockquote p {
    font-style: italic;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.12rem;
    line-height: 1.65;
    margin-bottom: 0 !important;
}

.aligncenter { margin-inline: auto; display: block; }
.alignleft { float: left; margin-right: var(--space-5, 1.5rem); margin-bottom: var(--space-4, 1rem); }
.alignright { float: right; margin-left: var(--space-5, 1.5rem); margin-bottom: var(--space-4, 1rem); }
.clear { clear: both; }

/* ==========================================
   АДАПТИВНОСТЬ
   ========================================== */
@media (max-width: 768px) {
    .content-card-wrapper {
        padding: 1.5rem 1.1rem;
    }

    .entry-content p {
        font-size: 0.98rem;
        line-height: 1.65;
    }
}