@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap');

/* ============================================
   Общая атмосфера: один лист старого сайта
   ============================================ */

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

ul,
ol {
    list-style: none;
    padding: 0;
}

body {
    margin: 0;
    font-family: 'PT Serif', 'Times New Roman', serif;
    background: linear-gradient(135deg, rgba(241, 232, 214, 0.8), rgba(225, 209, 185, 0.8)),
    url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    color: #1f160d;
    line-height: 1.65;
}

a {
    color: #8a2b06;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #4d1800;
}

img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: 0;
}

.media-asset {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
}

.media-asset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Лист
   ============================================ */

.page {
    min-height: 100vh;
    max-width: 960px;
    margin: 24px auto 72px;
    background: #fffef6;
    border: 1px solid #d9cba1;
    box-shadow: 0 22px 58px rgba(33, 16, 4, 0.25);
    display: flex;
    flex-direction: column;
}

.content {
    display: flex;
    flex-direction: column;
    padding: 36px 48px 48px;
    gap: 32px;
}

/* ============================================
   Шапка и подвал — единственные отдельные блоки
   ============================================ */

.wrap-footer {
    margin-top: auto;
}

.site-header,
.site-footer {
    background: linear-gradient(180deg, #f6dec1 0%, #eccda2 100%);
    border-bottom: 1px solid #c79f64;
    padding: 28px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-footer {
    border-top: 1px solid #c79f64;
    border-bottom: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

.brand-mark {
    color: inherit;
    font-size: 26px;
    font-weight: 720;
    line-height: 31px;
    word-wrap: break-word;
    margin: 0;
}

.brand-caption {
    margin: 0;
    color: rgba(31, 22, 13, 0.8);
    font-size: 13px;
    font-weight: 400;
    line-height: 15px;
    word-wrap: break-word;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 18px;
    font-size: 0.95rem;
    order: 2;
}

.site-nav a {
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    border-color: #4d1800;
}

.search {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid rgba(77, 24, 0, 0.3);
    background: rgba(255, 253, 244, 0.6);
}

.search input {
    border: none;
    background: transparent;
    font-family: inherit;
    min-width: 200px;
}

.search input:focus {
    outline: none;
}

.search button {
    border: none;
    background: none;
    color: #4d1800;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Burger Menu */
.burger-menu {
    position: relative;
    z-index: 1000;
}

.burger-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4d1800;
}

.burger-button:hover {
    color: #2d0e00;
}

.burger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    background: rgba(77, 24, 0, 0.4);
}

.menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: linear-gradient(180deg, #f6dec1 0%, #eccda2 100%);
    box-shadow: -4px 0 20px rgba(77, 24, 0, 0.2);
    border-left: 1px solid #c79f64;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(77, 24, 0, 0.2);
}

.menu-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4d1800;
}

.menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4d1800;
}

.menu-close:hover {
    color: #2d0e00;
}

.menu-search {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(77, 24, 0, 0.2);
}

.menu-search form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(77, 24, 0, 0.3);
    background: rgba(255, 253, 244, 0.6);
    border-radius: 0;
}

.menu-search input {
    background: transparent;
    border: none;
    padding: 8px 12px;
    flex: 1;
    min-width: 0;
    color: #1f160d;
}

.menu-search input::placeholder {
    color: rgba(77, 24, 0, 0.5);
}

.menu-search button {
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    background: none;
    color: #4d1800;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 0;
}

.menu-nav {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(77, 24, 0, 0.2);
}

.menu-nav a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #4d1800;
    font-size: 1rem;
    border-bottom: 1px solid transparent;
}

.menu-nav a:hover,
.menu-nav a.active {
    border-color: #4d1800;
    color: #2d0e00;
    font-weight: 600;
}

.menu-section {
    padding-bottom: 16px;
}

.menu-section-title {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(77, 24, 0, 0.8);
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-list li a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #4d1800;
}

.menu-list li a:hover,
.menu-list li a.active {
    background: rgba(255, 253, 244, 0.8);
    color: #2d0e00;
}

/* Menu animations */
.menu-enter-active,
.menu-leave-active {
    transition: opacity 0.3s ease;
}

.menu-enter-from,
.menu-leave-to {
    opacity: 0;
}

.menu-enter-active .menu-content,
.menu-leave-active .menu-content {
    transition: transform 0.3s ease;
}

.menu-enter-from .menu-content,
.menu-leave-to .menu-content {
    transform: translateX(100%);
}

@media (max-width: 768px) {
    .menu-content {
        max-width: 100%;
    }
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    text-decoration: none;
}

.site-footer {
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: center;
}

.footer-domain {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-copyright {
    margin: 0;
    color: rgba(77, 24, 0, 0.8);
    font-size: 0.85rem;
}

/* ============================================
   Общие разделители
   ============================================ */

.hero,
.highlight-stack,
.category-page,
.category-hero,
.article-grid,
.search-page,
.blocks-stack,
.media-asset,
.error .panel {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px dotted #cbb88d;
}

.hero:last-child,
.highlight-stack:last-child,
.category-page:last-child,
.category-hero:last-child,
.article-grid:last-child,
.search-page:last-child,
.blocks-stack:last-child,
.media-asset:last-child,
.error .panel:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ============================================
   Страница статьи
   ============================================ */

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: rgba(31, 22, 13, 0.72);
    flex-wrap: wrap;
}

.article-date {
    color: rgba(31, 22, 13, 0.72);
}

.article-separator {
    color: rgba(31, 22, 13, 0.5);
}

.article-category,
.article-tag {
    color: #8a2b06;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.article-category:hover,
.article-tag:hover {
    opacity: 0.7;
}

.article-tag-separator {
    color: rgba(31, 22, 13, 0.5);
}

.article-header {
    margin-bottom: 24px;
    padding-bottom: 0;
    border: none;
}

.article-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(31, 22, 13, 0.8);
    line-height: 1.6;
}

.article-cover {
    margin: 24px 0;
}

.article-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.article-body {
    margin: 24px 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rich-text-block {
    padding: 0;
    line-height: 1.7;
    padding-bottom: 0;
    border-bottom: none;
}

.article-author {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dotted #cbb88d;
    font-size: 0.9rem;
    color: rgba(31, 22, 13, 0.72);
}

.article-author-label {
    font-weight: 600;
    margin-right: 8px;
}

.article-author-name {
    color: #26170f;
}

/* ============================================
   Текстовые акценты
   ============================================ */

h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin: 0 0 12px;
    color: #26170f;
    line-height: 1.2;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 900;
    font-family: var(--font-heading);
}

h2 {
    margin: 0 0 12px;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 900;
    font-family: var(--font-heading);
}

h3 {
    font-size: 1.4rem;
}

p {
    margin: 0 0 16px;
}

.muted,
.description,
.excerpt,
.meta {
    color: rgba(31, 22, 13, 0.72);
}

.meta {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pill {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border: 1px solid rgba(138, 43, 6, 0.3);
    border-radius: 999px;
    background: rgba(255, 249, 230, 0.6);
}

.pill-outline {
    background: transparent;
}

/* ============================================
   Контент без карточек
   ============================================ */

.hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-bottom: none;
}

.hero-side {
    margin: -24px -48px;
    padding: 48px;
    background: linear-gradient(180deg, #ffebd6 0%, #e8dcc2 100%);
}

.hero-feature {
    margin-bottom:32px;
}

.hero-media {
    width: 100%;
    border: 1px solid #d9cba1;
    padding: 4px;
    background: rgba(255, 250, 233, 0.6);
}

.hero-media img {
    display: block;
}

.hero-bullets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 18px;
}

.hero-bullet::marker {
    color: #8a2b06;
}

.highlight-stack,
.blocks-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-card,
.category-card,
.article-card,
.search-item,
.article-grid .article-card {
    border: none;
    border-bottom: 1px dotted rgba(203, 184, 141, 0.8);
    margin: 0;
    padding: 16px 0 12px;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.highlight-card:last-child,
.category-card:last-child,
.article-card:last-child,
.search-item:last-child {
    border-bottom: none;
}

.highlight-card h3 {
    margin: 12px 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-list {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.category-list-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.grid,
.article-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-card a,
.article-card .card-link,
.search-item a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.category-hero .hero-link {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    gap: 32px;
}

.hero-feature .feature-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.highlight-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.category-lead-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.card-body {
    padding: 0;
    gap: 8px;
    display: flex;
    flex-direction: column;
}

.search-results {
    display: flex;
    flex-direction: column;
}

.search-item:hover {
    border-color: rgba(138, 43, 6, 0.4);
}

.back-link,
.see-all,
.read-more {
    color: #8a2b06;
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

/* ============================================
   Content Layout
   ============================================ */

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-layout__details {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.content-layout__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-layout__sticky {
    position: sticky;
    top: 24px;
}

@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .content-layout__sticky {
        position: static;
    }
}

/* ============================================
   Страница автора
   ============================================ */

.author-header {
    padding-bottom: 1.5rem;
}

.author-info {
    max-width: 100%;
}

.author-name {
    font-size: 23px;
    font-weight: 900;
    line-height: 29px;
    margin: 0 0 1rem 0;
}

.author-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(31, 22, 13, 0.72);
}

.author-separator {
    color: rgba(31, 22, 13, 0.5);
}

.author-caption-text {
    font-size: 0.9rem;
}

.author-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    border: 1px solid rgba(138, 43, 6, 0.4);
    background: rgba(255, 244, 218, 0.9);
    padding: 10px 22px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    color: #4d1800;
    display: inline-block;
}

.btn.primary {
    background: #d9a068;
}

.btn.secondary {
    background: rgba(31, 22, 13, 0.1);
    color: #1f160d;
    border: 1px solid rgba(31, 22, 13, 0.2);
}

.btn.ghost {
    background: transparent;
}

.load-more {
    display: flex;
}

.load-more-btn {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
}

/* ============================================
   Медиа и ошибки
   ============================================ */

.error {
    padding: 36px;
}

.error .panel {
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.error .card {
    border: none;
    padding: 0 0 16px;
}

.error .btn {
    margin-right: 16px;
}

.error .actions {
    padding: 16px 0;
}

.category-hero {
    display: flex;
    flex-direction: row;
    align-items: end;
    gap: 24px;
}

/* ============================================
   Утилиты
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.loader,
.empty {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(31, 22, 13, 0.72);
}

.loader-full {
    width: 100%;
    justify-content: center;
    padding: 48px 24px;
}

.loader-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loader-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #8a2b06;
    animation: pulse 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.spinner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(31, 22, 13, 0.2);
    border-top-color: #8a2b06;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Sidebar Top News Widget
   ============================================ */

.sidebar-topnews {
    background-color: #fffef6;
    border-radius: 0;
    padding: 20px;
    border: 1px solid rgba(31, 22, 13, 0.15);
}

.sidebar-topnews__title {
    border-bottom: 2px solid #8a2b06;
    font: 800 17px/20px 'PT Serif', 'Times New Roman', serif;
    padding-bottom: 16px;
    color: #1f160d;
}

.sidebar-topnews__topics {
    border-bottom: 1px solid rgba(31, 22, 13, 0.15);
    padding-bottom: 12px;
}

.sidebar-topnews__topics:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-topnews .btn {
    display: block;
    margin: 16px auto 0;
    max-width: max-content;
}

/* ============================================
   Card Mini Component
   ============================================ */

.card-mini {
    border-bottom: 1px solid rgba(31, 22, 13, 0.15);
    display: -webkit-box;
    display: flex;
    padding: 10px 0;
    text-decoration: none;
}

.card-mini:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-mini__image-wrap {
    -webkit-box-ordinal-group: 2;
    border-radius: 0;
    height: 40px;
    margin: 4px 0 -4px 10px;
    min-width: 40px;
    order: 1;
    overflow: hidden;
    width: 40px;
}

.card-mini__image {
    height: auto;
    line-height: 0;
    width: 40px;
}

.card-mini__text {
    -webkit-box-flex: 1;
    flex-grow: 1;
}

.card-mini__title {
    color: #1f160d;
    display: inline;
    font: 400 14px/1.25 'PT Serif', 'Times New Roman', serif;
    -webkit-transition: color 0.2s ease-out;
    transition: color 0.2s ease-out;
    margin: 0;
}

.card-mini__title:after {
    content: ' ';
}

.card-mini:visited .card-mini__title {
    color: rgba(31, 22, 13, 0.6);
}

@supports (-moz-appearance: none) {
    .card-mini:visited .card-mini__title {
        color: #1f160d;
    }
}

.card-mini:hover .card-mini__title {
    color: #8a2b06;
}

.card-mini__info {
    -webkit-box-align: center;
    align-items: center;
    color: rgba(31, 22, 13, 0.6);
    display: -webkit-box;
    display: flex;
    flex-wrap: wrap;
    font: 400 10px/1.35 'PT Serif', 'Times New Roman', serif;
    margin-top: 3px;
}

.card-mini__info-item {
    margin-right: 5px;
}

.card-mini__icon {
    height: 14px;
    margin-right: 5px;
    vertical-align: middle;
    width: 14px;
}

.card-mini__icon:last-child {
    margin-right: 0;
}

.card-mini__icon._play {
    fill: #8a2b06;
}

.card-mini__icon._external {
    color: rgba(31, 22, 13, 0.4);
    height: 15px;
}

.card-mini__icon._exclusive {
    height: 16px;
    margin-bottom: -1px;
    margin-top: -1px;
    width: 16px;
}

.card-mini__icon._partner {
    height: 14px;
    max-width: 80px;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
}

.card-mini__ad-title {
    -webkit-box-ordinal-group: 0;
    background-color: rgba(31, 22, 13, 0.1);
    border-radius: 0;
    color: rgba(31, 22, 13, 0.7);
    font: 400 10px/1.35 'PT Serif', 'Times New Roman', serif;
    order: -1;
    padding: 1px 5px;
}

/* ============================================
   Адаптив
   ============================================ */

@media (max-width: 900px) {
    .site-header,
    .site-footer,
    .content,
    .error {
        padding: 24px;
    }

    .error .actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .page {
        margin: 0;
    }
}

/* ============================================
   Tags Select
   ============================================ */
.tags-select {
    display: none;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag-link.active .pill {
    background: #8a2b06;
    color: #fffef6;
    border-color: #8a2b06;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .tags-select {
        display: block;
    }

    .tags-list {
        display: none;
    }
}

.tags-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fffef6;
    border: 1px solid #d9cba1;
    border-radius: 0;
    color: #1f160d;
    font-size: 1rem;
    font-family: 'PT Serif', 'Times New Roman', serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231f160d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: border-color 0.2s ease;
}

.tags-select:hover {
    border-color: #c79f64;
}

.tags-select:focus {
    outline: none;
    border-color: #8a2b06;
    box-shadow: 0 0 0 2px rgba(138, 43, 6, 0.1);
}

.tags-select option {
    background: #fffef6;
    color: #1f160d;
    padding: 0.5rem;
}

@media (max-width: 640px) {
    .search input {
        min-width: 140px;
    }

    .site-nav {
        flex-wrap: wrap;
    }
}

