/* --- ПОДКЛЮЧЕНИЕ ШРИФТОВ И ПЕРЕМЕННЫХ --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --bg-sand: #EFECE1;    
    --dark-brown: #332315; 
    --olive: #4E5941;      
    --red: #a80019;       
    --text-dark: #2A2A2A;  
    --white: #FFFFFF;
    --gold: #d4a373;
    
    --serif: 'Playfair Display', serif;
    --sans: 'Manrope', sans-serif;
    
    --transition: all 0.4s ease;
}

/* Принудительно задаем шрифт для блоков страницы записи, чтобы он не перебивался дефолтным стилем темы */
.article-header-box,
.article-content,
.related-news {
    font-family: var(--sans);
}

.article-header-box h1,
.article-content h2,
.article-content h3,
.article-content blockquote,
.related-header h2,
.news-info h4 {
    font-family: var(--serif);
}

/* --- ЖУРНАЛЬНЫЙ HERO --- */
.article-hero { position: relative; height: 65vh; min-height: 450px; background-size: cover; background-position: center; }
.article-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%); }

/* Блок заголовка */
.article-header-box { position: relative; z-index: 2; margin-top: -120px; background: var(--white); padding: 70px 80px; border-radius: 12px; box-shadow: 0 30px 60px rgba(0,0,0,0.05); max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dark); font-weight: 600; font-size: 12px; text-transform: uppercase; margin-bottom: 30px; letter-spacing: 1px; opacity: 0.6; transition: var(--transition); }
.back-link:hover { opacity: 1; color: var(--red); transform: translateX(-5px); }

.article-meta { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 25px; }
.article-badge { background: var(--red); color: var(--white); font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 6px 14px; border-radius: 4px; letter-spacing: 1px; box-shadow: 0 5px 15px rgba(168,0,25,0.2); }
.article-date { color: var(--text-dark); opacity: 0.5; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

.article-header-box h1 { font-family: var(--serif); font-size: clamp(32px, 4vw, 52px); margin-bottom: 20px; line-height: 1.1; color: var(--dark-brown); }

/* --- КОНТЕНТ СТАТЬИ --- */
.article-content { max-width: 760px; margin: 60px auto 100px; padding: 0 20px; font-size: 16px; line-height: 1.8; color: var(--text-dark); font-weight: 500; }
.article-content p { margin-bottom: 25px; opacity: 0.9; }
.article-content p:first-of-type { font-size: 20px; font-weight: 500; color: var(--dark-brown); line-height: 1.6; margin-bottom: 40px; }
.article-content h2, .article-content h3 { font-family: var(--serif); color: var(--dark-brown); margin: 60px 0 25px; line-height: 1.2; }
.article-content h2 { font-size: 32px; }
.article-content h3 { font-size: 26px; }
.article-content blockquote { margin: 50px 0; padding: 20px 0 20px 30px; border-left: 3px solid var(--red); font-family: var(--serif); font-size: 24px; font-style: italic; color: var(--dark-brown); line-height: 1.5; }
.article-content ul, .article-content ol { margin: 30px 0 40px; padding-left: 0; list-style: none; }
.article-content ul li, .article-content ol li { margin-bottom: 15px; position: relative; padding-left: 30px; opacity: 0.9; }
.article-content ul li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.article-content strong, .article-content b { color: var(--dark-brown); font-weight: 800; }
.article-content img { border-radius: 12px; margin: 40px 0; width: 100%; height: auto; object-fit: cover; }
.article-content figure { margin: 40px 0; }
.article-content figure img { margin: 0; }

/* --- ЧИТАЙТЕ ТАКЖЕ (СЕТКА) --- */
.related-news { padding: 100px 0; background: var(--white); }
.related-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.related-header h2 { font-family: var(--serif); font-size: clamp(28px, 4vw, 42px); color: var(--dark-brown); line-height: 1.1; margin: 0; text-transform: uppercase; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.news-card { background: var(--bg-sand); border-radius: 8px; overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; position: relative; }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); background: var(--white); }

.news-img { height: 240px; position: relative; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-img img { transform: scale(1.05); }

.badge { position: absolute; top: 15px; left: 15px; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 6px 12px; z-index: 2; letter-spacing: 1px; border-radius: 4px; }
.badge.news { background: var(--olive); color: var(--white); }
.badge.promo { background: var(--red); color: var(--white); box-shadow: 0 5px 15px rgba(168,0,25,0.3); }

.news-info { padding: 35px 30px; display: flex; flex-direction: column; flex-grow: 1; }
.news-info .date { font-size: 12px; color: var(--text-dark); opacity: 0.6; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.news-info h4 { font-family: var(--serif); font-size: 22px; margin-bottom: 15px; color: var(--dark-brown); line-height: 1.3; transition: var(--transition); }
.news-card:hover h4 { color: var(--red); }

.read-more { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--dark-brown); display: inline-flex; align-items: center; gap: 8px; margin-top: auto; transition: var(--transition); letter-spacing: 1px; }
.read-more i { transition: transform 0.3s; font-size: 14px; color: var(--gold); }
.news-card:hover .read-more { color: var(--red); }
.news-card:hover .read-more i { color: var(--red); transform: translateX(5px); }

/* Анимации */
.anim-up { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.anim-up.show { opacity: 1; transform: translateY(0); }

/* АДАПТИВ */
@media(max-width: 1024px) {
    .article-header-box { margin-left: 20px; margin-right: 20px; padding: 50px 40px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .news-card:nth-child(3) { display: none; }
}
@media(max-width: 768px) {
    .article-hero { height: 50vh; min-height: 350px; }
    .article-header-box { margin-top: -80px; padding: 30px 20px; margin-left: 10px; margin-right: 10px; }
    .article-meta { flex-direction: column; gap: 10px; }
    
    /* Уменьшаем контент статьи для мобильных */
    .article-content { margin-top: 30px; font-size: 14px; line-height: 1.6; } /* Основной текст */
    .article-content p { margin-bottom: 20px; }
    .article-content p:first-of-type { font-size: 16px; margin-bottom: 30px; line-height: 1.5; } /* Лид-абзац (вводный) */
    .article-content h2 { font-size: 24px; margin: 40px 0 15px; } /* Заголовки H2 */
    .article-content h3 { font-size: 20px; margin: 30px 0 15px; } /* Заголовки H3 */
    .article-content blockquote { padding: 15px 0 15px 20px; font-size: 18px; margin: 30px 0; border-left-width: 2px; } /* Цитаты */
    
    .related-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .news-grid { grid-template-columns: 1fr; gap: 20px; }
    .news-card:nth-child(3) { display: flex; }
}