@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    /* Цветовая гамма "Классическая редакция" */
    --bg-main: #F2F2F2;        /* Светло-серый фон (как стол) */
    --bg-card: #FFFFFF;        /* Белоснежный лист бумаги */
    --bg-header: #FFFFFF;
    
    --accent: #9B1C26;         /* Глубокий красный/бордовый (для закладки и ссылок) */
    --accent-hover: #7a151d;
    
    --text-white: #111111;     /* Инвертируем! Заголовки теперь почти черные */
    --text-gray: #333333;      /* Темно-серый для основного текста (хорошая читаемость) */
    --border-color: #E5E5E5;   /* Очень светлые разделители */
    
    /* Классические шрифты */
    --font-heading: 'Playfair Display', serif; /* Заголовки с засечками */
    --font-main: 'Lora', serif;                /* Текст с засечками */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: var(--font-main); 
    background-color: var(--bg-main); 
    color: var(--text-gray); 
    line-height: 1.8; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

a { text-decoration: none; color: var(--accent); transition: all 0.3s ease; }
a:hover { opacity: 0.8; text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text-white); font-weight: 700; font-family: var(--font-heading); }

/* Сужаем контейнер для идеальной длины строки при чтении */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- HEADER --- */
/* Делаем хедер частью белого листа или прозрачным */
.site-header { background: var(--bg-header); border-bottom: 1px solid var(--border-color); box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; max-width: 900px; margin: 0 auto; }
.header-left { display: flex; align-items: center; gap: 10px; color: var(--text-white); cursor: pointer; }
.header-left svg { fill: var(--text-white); }
.logo { font-size: 1.8rem; font-weight: 800; color: var(--text-white); letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-heading);}
.header-right { color: var(--text-white); }
.header-right svg { fill: var(--text-white); }

.header-nav { background: var(--bg-header); border-bottom: 1px solid var(--border-color); border-top: none; }
.nav-links { display: flex; justify-content: center; gap: 40px; padding: 15px 20px; max-width: 900px; margin: 0 auto; flex-wrap: wrap; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;}
.nav-links a { color: #666; font-weight: 500; font-family: sans-serif; }
.nav-links a:hover { color: var(--text-white); text-decoration: none; }

/* --- TAG CLOUD --- */
.tag-cloud-wrapper { margin: 40px auto 20px; max-width: 800px; padding: 0; text-align: center; }
.tag-cloud-title { display: none; } /* Скрываем заголовок тегов */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag-item { 
    background: transparent; border: 1px solid #CCC; color: #555; 
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-family: sans-serif; text-transform: uppercase; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 6px;
}
.tag-item:hover { background: #EEE; color: #000; border-color: #AAA; transform: none; text-decoration: none;}
.tag-count { background: transparent; color: var(--accent); padding: 0; font-weight: 700; }

/* --- ИМИТАЦИЯ БЕЛОГО ЛИСТА (Для статьи и сеток) --- */
/* Превращаем контейнеры в непрерывный лист бумаги */
.hero-grid, .bottom-grid { background: var(--bg-card); padding: 40px 60px; max-width: 800px; margin: 0 auto; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }

/* Принудительно делаем сетку одноколоночной (как в мобилке), чтобы выглядело как сплошная статья */
.hero-grid, .hero-right { display: flex; flex-direction: column; gap: 40px; }
.bottom-grid { display: flex; flex-direction: column; gap: 40px; margin-bottom: 60px; padding-bottom: 60px; }

/* --- КАРТОЧКИ (Имитируем иллюстрации в тексте) --- */
.post-thumb-card { 
    position: relative; border-radius: 12px; overflow: hidden; 
    display: flex; flex-direction: column; justify-content: flex-end; 
    padding: 0; transition: none; background: transparent; border: none; height: auto !important; min-height: unset !important;
}
.post-thumb-card:hover { transform: none; opacity: 1; }

/* Картинки-заглушки (если они заданы через градиенты, делаем их серыми плейсхолдерами с закруглениями) */
.bg-gradient-1, .bg-gradient-2, .bg-gradient-3 { 
    background: #E5E5E5 !important; 
    border-radius: 16px; 
    height: 350px !important; 
    width: 100%;
    margin-bottom: 20px;
}

.cat-badge { 
    background: transparent; color: var(--accent); 
    padding: 0; font-size: 0.75rem; font-weight: 700; font-family: sans-serif;
    text-transform: uppercase; border-radius: 0; display: block; 
    margin-bottom: 10px; text-align: center; letter-spacing: 2px;
}

.post-thumb-title { 
    color: var(--text-white); font-size: 1.8rem; line-height: 1.3; font-weight: 700; 
    text-shadow: none; text-align: center; text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 15px; position: relative; padding: 0 20px;
}

/* --- BOTTOM POST GRID (Убираем стили сетки) --- */
.section-header { text-align: center; justify-content: center; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 40px; }
.section-header h3 { font-size: 1rem; font-family: sans-serif; color: #888; font-weight: 400;}
.section-header h3::before { display: none; }


/* --- ПРЕДСТАВЛЕНИЕ СТАТЬИ (Центральный элемент дизайна) --- */
.post-container { 
    max-width: 800px; margin: 40px auto 80px; background: var(--bg-card); 
    padding: 80px 80px; border-radius: 4px; border: none; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.06); 
}
@media(max-width: 768px) { 
    .post-container, .hero-grid, .bottom-grid { padding: 40px 20px; margin-top: 20px;} 
}

.post-header { margin-bottom: 50px; text-align: center; }
/* Главный заголовок статьи */
.post-h1 { 
    font-size: 2.5rem; line-height: 1.3; margin-bottom: 30px; color: var(--text-white); 
    text-transform: uppercase; font-weight: 800; letter-spacing: 1px;
}
.post-meta-info { 
    display: flex; align-items: center; justify-content: center; gap: 15px; 
    color: #888; font-size: 0.85rem; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px;
    border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 15px 0; 
}
.post-meta-info img { width: 40px; height: 40px; border-radius: 50%; filter: grayscale(100%); }
.post-meta-text strong { color: var(--text-white); display: inline; font-size: 0.85rem; margin-right: 5px; }

/* POST CONTENT */
.post-content { font-size: 1.05rem; line-height: 2; color: var(--text-gray); }
/* Выравнивание по ширине (justify) как в классических газетах/книгах */
.post-content p { margin-bottom: 25px; text-align: justify; hyphens: auto; }

.post-content h2 { 
    font-size: 1.8rem; margin: 60px 0 25px; color: var(--text-white); 
    text-align: center; text-transform: uppercase; border-bottom: none; 
}
.post-content h3 { font-size: 1.4rem; margin: 40px 0 15px; color: var(--text-white); text-align: center; font-style: italic; text-transform: none;}
.post-content ul, .post-content ol { margin: 0 0 25px 40px; padding-left: 0; }
.post-content li { margin-bottom: 10px; padding-left: 10px;}

/* Таблицы стилизуем минималистично */
.post-content table { width: 100%; border-collapse: collapse; margin: 40px 0; border: none; border-top: 2px solid var(--text-white); border-bottom: 2px solid var(--text-white); }
.post-content th, .post-content td { padding: 15px; border: none; border-bottom: 1px solid var(--border-color); text-align: left; }
.post-content th { background: transparent; font-weight: 700; color: var(--text-white); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 1px;}

/* МАГИЯ CSS: Тот самый пунктирный блок с красной закладкой (из скриншота) */
.post-content blockquote, .faq-block { 
    background: transparent;
    border: 1.5px dashed rgba(155, 28, 38, 0.4); /* Пунктирная красная рамка */
    border-radius: 12px;
    padding: 35px 35px 25px 35px;
    margin: 50px 0; 
    position: relative;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-style: normal;
}

/* Красная закладка (ribbon) в верхнем левом углу */
.post-content blockquote::before, .faq-block::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 25px;
    width: 20px;
    height: 32px;
    background-color: var(--accent);
    /* Создаем форму флажка с помощью clip-path */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}

.faq-question { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; color: var(--text-white); font-family: var(--font-heading); }
.faq-answer { font-size: 0.95rem; color: #555; text-align: justify; }

/* --- PAGINATION --- */
.pagination { display: flex; justify-content: center; gap: 10px; margin: 40px 0 80px; }
.page-link { 
    display: inline-flex; align-items: center; justify-content: center; 
    width: 35px; height: 35px; border: none; border-radius: 50%; 
    font-size: 1rem; color: #888; background: transparent; font-family: var(--font-heading);
}
.page-link:hover, .page-link.active { background: transparent; color: var(--accent); font-weight: 700; text-decoration: underline;}

/* --- FOOTER --- */
.site-footer { background: var(--bg-main); border-top: none; padding: 60px 0 40px; margin-top: auto; }
.footer-container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 30px; max-width: 600px; margin: 0 auto; }
.footer-logo { font-size: 1.5rem; font-weight: 700; color: #333; margin-bottom: 0; display: block; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px;}
.footer-text { color: #888; font-size: 0.85rem; line-height: 1.6; margin-bottom: 0; font-family: sans-serif; }
.footer-title { display: none; } /* Скрываем лишние заголовки в подвале для минимализма */
.footer-links { list-style: none; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-family: sans-serif; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px;}
.footer-links li { margin-bottom: 0; }
.footer-links a { color: #666; }
.footer-links a:hover { color: var(--accent); text-decoration: none;}
.contact-info { display: none; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #DDD; font-size: 0.75rem; color: #AAA; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px;}