/**
 * Dobr Redesign - Main styles
 * Главная страница dobrokaluga.ru
 */

:root {
    --bg-canvas: #ffffff;
    --primary-blue: #50b3ff;
    --primary-purple: #b73bd4;
    --primary-coral: #f4635d;
    --text-main: #1a1a1a;
    --text-secondary: #666666;
    --text-on-accent: #ffffff;
    --radius-card: 24px;
    --radius-pill: 100px;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --gap-grid: 24px;
    --sidebar-width: 320px;
    --max-width: 1440px;
}

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

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* Kaluga brand mode: softer mint + sky palette */
body.kaluga-site {
    --bg-canvas: #f7fffc;
    --primary-blue: #33b39d;
    --primary-purple: #5d7cff;
    --primary-coral: #ff7f6b;
}

body.kaluga-site .site-logo::after {
    content: 'КАЛУГА';
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    vertical-align: middle;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
}

/* Unique hero look for Kaluga */
body.kaluga-site .hero-card.featured {
    background: linear-gradient(145deg, #1f9d8a 0%, #2fc5ac 45%, #77d9ca 100%);
}

body.kaluga-site .hero-card.secondary {
    background: linear-gradient(145deg, #4a67e6 0%, #6686ff 40%, #95acff 100%);
}

body.kaluga-site .widget-title::before {
    width: 10px;
    height: 10px;
    border-radius: 4px;
    transform: rotate(45deg);
}

body.kaluga-site .article-card:hover {
    box-shadow: 0 14px 36px rgba(51, 179, 157, 0.14);
}

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

/* Предотвращение съезжания — длинные слова и таблицы */
.content-body table,
.entry-content table,
pre {
    max-width: 100%;
    overflow-x: auto;
}

/* Мобильная оптимизация — фиксированные рамки, без съезжания */
/* 100% вместо 100vw — избегаем горизонтального скролла из-за scrollbar */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    body {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    a, button {
        -webkit-tap-highlight-color: rgba(80, 179, 255, 0.15);
    }
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    /* Ограничиваем область выпадающего меню — не выходить за экран */
    .site-nav {
        left: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
    }
    /* Декоративные blobs — уменьшаем на мобильных, чтобы не вызывали overflow */
    .shape-blob {
        max-width: 300px;
        max-height: 300px;
    }
    .page-wrapper {
        overflow-x: hidden !important;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* Обёртка страницы — ограничивает ширину, предотвращает горизонтальный скролл */
.page-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

/* Decorative blobs */
.shape-blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
}

.curve-accent {
    position: absolute;
    background: var(--primary-purple);
    border-radius: 100px;
    z-index: 1;
}

/* Container — фиксированные рамки, контент по центру. Без flex-grow, чтобы не было внутреннего скролла под футером */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
    min-width: 0;
    overflow-x: hidden;
    margin-inline: auto;
    isolation: isolate;
}

/* Header — логотип слева, гамбургер справа */
.site-header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 200;
    flex-wrap: wrap;
    isolation: isolate;
    pointer-events: auto;
}

.site-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -1px;
    color: var(--text-main);
}

.site-logo span {
    color: var(--primary-blue);
}

/* Гамбургер-кнопка */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: #f0f0f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Выпадающее меню */
.site-nav {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 8px;
    padding: 16px;
    display: none;
    z-index: 1000;
    pointer-events: auto;
}

.site-nav.is-open {
    display: block;
}

.nav-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

/* Навигация — простые ссылки по шаблону */
.site-nav .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav .nav-btn:hover {
    color: var(--primary-blue);
}

.site-nav a.nav-btn {
    display: inline-flex;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

/* Кнопка «Категории» — такой же стиль + иконка */
.nav-btn-categories {
    appearance: none;
    pointer-events: auto;
}

.nav-arrow {
    display: inline-block;
    font-size: 0.65em;
    margin-left: 2px;
    transition: transform 0.25s ease;
    opacity: 0.9;
}

.nav-btn-categories.is-open .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-wrap {
    position: relative;
}

/* Выпадающий список — СВЁРНУТ по умолчанию, раскрывается по клику */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 6px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    z-index: 1000;
    transition: opacity 0.2s ease, visibility 0.2s, transform 0.2s ease;
    pointer-events: none;
}

.nav-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-dropdown a:hover {
    background: linear-gradient(135deg, rgba(80, 179, 255, 0.12), rgba(183, 59, 212, 0.12));
    color: var(--primary-purple);
}

.site-nav ul:not(.nav-main) {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
}

.site-nav a:not(.nav-btn) {
    display: block;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    border-radius: 8px;
}

.site-nav a:not(.nav-btn):hover {
    background: #f0f0f5;
    color: var(--primary-blue);
}

.site-nav a:not(.nav-btn) {
    pointer-events: auto;
}

.nav-main {
    pointer-events: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-meta .time {
    font-weight: 600;
    color: var(--text-main);
}

/* Десктоп: меню горизонтально, градиентные кнопки */
@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }
    /* header-right на десктопе не нужен (гамбургер скрыт) — убираем pointer-events,
       чтобы он не перехватывал клики по меню при возможном наложении */
    .header-right {
        pointer-events: none;
    }
    .site-nav {
        position: static;
        display: flex !important;
        flex: 1;
        justify-content: center;
        background: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        position: relative;
        z-index: 50;
    }
    .nav-main {
        flex-direction: row;
        gap: 30px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .site-nav .nav-btn {
        padding: 6px 0;
        font-size: 1rem;
    }
    .nav-dropdown {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Main layout — двухколоночный grid как на single */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-areas: "main-content main-sidebar";
    gap: 60px;
    padding-bottom: 80px;
    margin-top: 40px;
    width: 100%;
    min-width: 0;
}

.main-layout > main {
    grid-area: main-content;
    min-width: 0;
}

.main-layout > .sidebar {
    grid-area: main-sidebar;
    min-width: 280px;
    align-self: start;
}

/* Hero section */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.hero-card {
    background-color: #f4f4f6;
    border-radius: var(--radius-card);
    padding: 40px;
    position: relative;
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Левая карточка — синий, холодные тона (без фиолетового) */
.hero-card.featured {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 40%, #60a5fa 100%);
    color: var(--text-on-accent);
}

.hero-card.featured::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-card.featured::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 20%;
    width: 200px;
    height: 400px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    z-index: 2;
    transform: rotate(-15deg);
    pointer-events: none;
}

/* Правая карточка — фиолетовые градиенты (явно другой цвет, не синий) */
.hero-card.secondary {
    background: linear-gradient(145deg, #5b21b6 0%, #7c3aed 35%, #a78bfa 70%, #c4b5fd 100%);
    color: white;
    justify-content: space-between;
}

.hero-card.secondary::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-card.secondary::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: rgba(236, 72, 153, 0.15);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-card.secondary .geo-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom left, rgba(192, 132, 252, 0.4), transparent 60%);
    opacity: 0.7;
    z-index: 1;
    pointer-events: none;
}

/* Hero без фото — только буквы на чистом фоне (шаблон) */
.hero-no-photo .hero-card.hero-text-only {
    min-height: 320px;
}

.hero-no-photo .hero-card.featured .hero-content {
    color: #fff;
}

.hero-no-photo .hero-card.featured .tag {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.hero-no-photo .hero-card.secondary {
    background: linear-gradient(145deg, #4c1d95 0%, #6d28d9 30%, #8b5cf6 60%, #a78bfa 100%);
}

.hero-no-photo .hero-card.secondary::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-no-photo .hero-card.secondary::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -5%;
    width: 180px;
    height: 180px;
    background: rgba(236, 72, 153, 0.12);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.hero-no-photo .hero-card.secondary .tag-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hero-no-photo .hero-card.secondary .hero-meta {
    color: rgba(255, 255, 255, 0.8);
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 90%;
}

.hero-card .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.hero-card .card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 50%);
    z-index: 3;
}

.tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-card.featured .tag {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue);
}

.hero-section h1,
.hero-section h2 {
    font-family: var(--font-display);
    line-height: 1.1;
    margin-bottom: 12px;
    font-weight: 700;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.hero-section h2 {
    font-size: 1.75rem;
}

.hero-meta {
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid);
}

.article-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 32px rgba(80, 179, 255, 0.12);
}

.article-card .card-image {
    height: 280px;
    background: linear-gradient(135deg, #f0f0f5 0%, #e8e8f0 100%);
    position: relative;
    overflow: hidden;
}

.article-card .card-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.article-card .card-image::after {
    content: '';
    position: absolute;
    z-index: 0;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-blue);
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
}

.article-card .card-image.purple::after {
    background: var(--primary-purple);
    top: -20px;
    right: -20px;
    bottom: auto;
    left: auto;
}

.article-card .card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card .category {
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.article-card h3 a {
    transition: color 0.2s ease;
}

.article-card h3 a:hover {
    color: var(--primary-blue);
}

.article-card .excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sidebar главной — единообразие с article-sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.widget {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid #eee;
    padding: 24px;
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.weather-widget {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.weather-region {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.weather-widget .temp {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    margin: 10px 0;
    position: relative;
    z-index: 2;
}

.weather-widget .condition {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.weather-shape {
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border: 20px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Кнопка «Предложить новость» — коралловый акцент, анимация блеска */
.widget-suggest-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    width: 100%;
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, #e85d5a 0%, var(--primary-coral) 50%, #ff8a87 100%);
    background-size: 200% 200%;
    color: var(--text-on-accent);
    border: none;
    border-radius: var(--radius-card);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.5s ease;
    animation: suggest-btn-glow 3s ease-in-out infinite;
}

.widget-suggest-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(244, 99, 93, 0.45);
    background-position: 100% 50%;
}

.widget-suggest-btn:active {
    transform: translateY(-1px);
}

.suggest-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: suggest-shine 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes suggest-shine {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

@keyframes suggest-btn-glow {
    0%, 100% { box-shadow: 0 4px 16px rgba(244, 99, 93, 0.3); }
    50% { box-shadow: 0 6px 24px rgba(244, 99, 93, 0.45); }
}

.suggest-btn-icon {
    font-size: 1.2rem;
    opacity: 0.95;
    animation: suggest-icon-bounce 2s ease-in-out infinite;
}

@keyframes suggest-icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.suggest-btn-text {
    position: relative;
    z-index: 2;
}

/* Рекламный блок */
.ad-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f5 100%);
    border: 1px dashed #ddd;
}

.ad-block-inner {
    padding: 4px 0;
}

.ad-block-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.ad-block-placeholder {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin-bottom: 12px;
}

.ad-block-placeholder-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ad-block-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.ad-block .ad-block-placeholder img {
    max-width: 100%;
    height: auto;
}

/* Модальное окно «Предложить новость» */
.suggest-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Открыто: display:flex показывает модал; закрыто — display:none убирает из hit-testing (pointer-events ненадёжен) */
.suggest-modal.is-open {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.suggest-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    pointer-events: inherit;
}

.suggest-modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-card);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.suggest-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f5;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
}

.suggest-modal-close:hover {
    background: var(--primary-blue);
    color: #fff;
}

.suggest-modal-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.suggest-modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.suggest-form .suggest-form-group {
    margin-bottom: 20px;
}

.suggest-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.suggest-form .required {
    color: var(--primary-coral);
}

.suggest-form input,
.suggest-form select,
.suggest-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.suggest-form input:focus,
.suggest-form select:focus,
.suggest-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.suggest-form textarea {
    resize: vertical;
    min-height: 100px;
}

.suggest-form input[type="file"] {
    padding: 8px;
    font-size: 0.9rem;
}

.suggest-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.suggest-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.suggest-btn-cancel {
    padding: 12px 24px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.suggest-btn-cancel:hover {
    background: #f8f9fa;
}

.suggest-btn-submit {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: linear-gradient(135deg, var(--primary-coral), #e85d5a);
    color: #fff;
    border-radius: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.suggest-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 99, 93, 0.4);
}

.suggest-success {
    text-align: center;
    padding: 40px 20px;
}

.suggest-success-icon {
    display: inline-block;
    width: 64px;
    height: 64px;
    line-height: 64px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 2rem;
    border-radius: 50%;
    margin-bottom: 20px;
}

.suggest-success p {
    font-size: 1.1rem;
    color: var(--text-main);
}

@media (max-width: 480px) {
    .suggest-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .suggest-modal {
        padding: 12px;
        align-items: flex-start;
    }
    .suggest-modal-content {
        max-height: 85vh;
        padding: 24px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .suggest-form input[type="file"] {
        font-size: 0.85rem;
        max-width: 100%;
    }
}

.trending-list {
    list-style: none;
}

.trending-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item a {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.trending-item a:hover {
    color: var(--primary-purple);
}

.trending-meta {
    font-size: 0.8rem;
    color: #999;
}

.trending-rank {
    color: var(--primary-blue);
    font-weight: 700;
    margin-right: 8px;
}

/* Newsletter widget */
.newsletter-widget {
    background: #111;
    color: white;
    border: none;
}

.newsletter-widget .widget-title {
    color: white;
}

.newsletter-widget .widget-title::before {
    background: var(--primary-blue);
}

.newsletter-widget p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #aaa;
}

.newsletter-widget input[type="email"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.newsletter-widget input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-widget button {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-display);
    transition: background 0.2s ease;
    min-height: 44px;
}

.newsletter-widget button:hover {
    background: #3b9aff;
}

.newsletter-widget input[type="email"] {
    min-height: 44px;
}

/* PWA install widget */
.pwa-install-widget {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    width: min(360px, calc(100vw - 24px));
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
    padding: 16px;
}

.pwa-install-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.pwa-install-desc {
    font-size: 0.9rem;
    line-height: 1.35;
    opacity: 0.95;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.pwa-install-btn {
    border: none;
    background: #fff;
    color: var(--primary-blue);
    font-weight: 700;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
}

.pwa-install-close {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-help {
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.35;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 8px 10px;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.hero-card {
    animation: fadeUp 0.6s ease forwards;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }

/* ===== Single article layout (single.php) ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-areas:
        "article-header article-sidebar"
        "article-main article-sidebar";
    gap: 60px;
    margin-top: 40px;
    padding-bottom: 80px;
}

.article-header {
    grid-area: article-header;
    margin-bottom: 24px;
}

.article-header .breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-header .breadcrumb a {
    color: var(--text-secondary);
}

.article-header .breadcrumb a:hover {
    color: var(--primary-blue);
}

.article-header .breadcrumb span {
    margin: 0 6px;
    color: var(--text-secondary);
}

.article-main {
    grid-area: article-main;
    min-width: 0;
}

.article-sidebar {
    grid-area: article-sidebar;
    min-width: 280px;
    align-self: start;
}

.article-title {
    font-family: var(--font-display);
    font-size: 2.75rem;
    line-height: 1.15;
    margin-bottom: 16px;
    font-weight: 700;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--text-secondary);
    font-weight: 500;
}

.article-meta span {
    white-space: nowrap;
}

.article-main-img {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: var(--radius-card);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.article-main-img-placeholder {
    min-height: 300px;
}

.article-main-img-placeholder::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.article-main-img img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

/* Подпись под главным фото статьи — автор фотографии */
.article-photo-credit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 12px 24px;
    margin-top: 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    font-family: var(--font-display), sans-serif;
    font-size: 0.9rem;
    color: var(--text-on-accent);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
    box-sizing: border-box;
}

.article-photo-credit-label {
    flex-shrink: 0;
    min-width: 3.2em;
    font-weight: 700;
    color: var(--text-on-accent);
}

.article-photo-credit-author {
    font-style: normal;
    color: var(--text-on-accent);
}

/* Подписи к фото внутри текста статьи (figcaption, wp-caption) */
.entry-content figure,
.content-body figure {
    margin: 24px 0;
}

.entry-content figcaption,
.entry-content .wp-caption-text,
.content-body figcaption,
.content-body .wp-caption-text {
    display: block;
    margin-top: 8px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--primary-blue);
}

.content-body,
.entry-content {
    font-size: 1.25rem;
    color: #333;
    line-height: 1.6;
}

.content-body p,
.entry-content p {
    margin-bottom: 24px;
}

.content-body blockquote,
.content-body .wp-block-quote,
.entry-content blockquote,
.entry-content .wp-block-quote {
    border-left: 4px solid var(--primary-blue);
    padding: 20px 0 20px 30px;
    margin: 40px 0;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.content-body blockquote p,
.content-body .wp-block-quote p,
.entry-content blockquote p,
.entry-content .wp-block-quote p {
    margin: 0;
}

.author-card {
    background: #f8f9fa;
    border-radius: var(--radius-card);
    padding: 30px;
    margin-top: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    background: var(--primary-purple);
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img,
.author-avatar .avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.author-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Article sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-self: start;
}

.article-sidebar .widget {
    border: 1px solid #eee;
}

.article-sidebar .widget-title::before {
    background: var(--primary-purple);
}

.similar-item {
    margin-bottom: 20px;
    text-decoration: none;
    display: block;
    color: inherit;
}

.similar-item:last-child {
    margin-bottom: 0;
}

.similar-item:hover h5 {
    color: var(--primary-blue);
}

.similar-thumb {
    height: 120px;
    background: #f0f0f5;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.similar-thumb-blue {
    background: rgba(80, 179, 255, 0.2);
}

.similar-thumb-purple {
    background: rgba(183, 59, 212, 0.2);
}

.similar-thumb-gray {
    background: #eee;
}

.similar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-item h5 {
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 700;
}

.similar-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.widget-tags {
    background: #f4f4f6;
    border: none;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background: #fff;
    padding: 6px 12px;
    font-size: 0.7rem;
    border-radius: var(--radius-pill);
    color: var(--text-main);
    transition: color 0.2s, background 0.2s;
}

.tag-link:hover {
    background: var(--primary-blue);
    color: var(--text-on-accent);
}

/* Footer */
.site-footer {
    background: #0d0d0d;
    color: #fff;
    padding: 18px 40px;
    margin-top: 60px;
    width: 100%;
    position: relative;
    z-index: 100;
    isolation: isolate;
}

.footer-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 0.88rem;
    line-height: 1.5;
}

.footer-line a {
    color: #888;
    transition: color 0.2s;
    pointer-events: auto;
}

.footer-line a:hover {
    color: var(--primary-blue);
}

.footer-sep {
    color: #555;
    user-select: none;
    margin: 0 4px;
    opacity: 0.8;
}

.footer-copy {
    color: #666;
    margin: 0;
}

/* ===== Archive page (page-archive.php) ===== */
.archive-header {
    padding: 60px 0 40px;
}

.archive-title {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 24px;
    font-weight: 700;
}

/* Поиск по заголовкам — в одну линию с фильтрами, тот же стиль что селекты и даты */
.filter-bar .filter-group-search {
    flex: 0 1 auto;
    min-width: 200px;
    width: 220px;
}
.filter-bar .filter-input-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(183, 59, 212, 0.2);
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.25;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    color: var(--text-main);
    -webkit-appearance: none;
    appearance: none;
}
.filter-bar .filter-input-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.85;
}
.filter-bar .filter-input-search:hover {
    border-color: rgba(80, 179, 255, 0.5);
}
.filter-bar .filter-input-search:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(80, 179, 255, 0.2);
}

.filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #f8f9ff 0%, #f5f0fa 100%);
    padding: 28px 32px;
    border-radius: var(--radius-card);
    align-items: flex-end;
    border: 1px solid rgba(80, 179, 255, 0.15);
    box-shadow: 0 4px 24px rgba(80, 179, 255, 0.06);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-purple);
    letter-spacing: 1.2px;
}

.filter-bar select {
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(183, 59, 212, 0.2);
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    min-width: 180px;
    min-height: 48px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
}

.filter-bar select:hover {
    border-color: rgba(80, 179, 255, 0.5);
}

.filter-bar select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(80, 179, 255, 0.2);
}

.archive-date-input {
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(183, 59, 212, 0.2);
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    min-width: 170px;
    min-height: 48px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    color: var(--text-main);
    box-sizing: border-box;
}

.archive-date-input:hover {
    border-color: rgba(80, 179, 255, 0.5);
}

.archive-date-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(80, 179, 255, 0.2);
}

.archive-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.archive-date-input::-webkit-date-and-time-value {
    padding-right: 8px;
}

.btn-filter {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #3b9eeb 100%);
    color: var(--text-on-accent);
    border: none;
    padding: 14px 36px;
    border-radius: 14px;
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(80, 179, 255, 0.3);
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(80, 179, 255, 0.4);
}

.archive-main {
    padding-bottom: 40px;
}

.archive-section {
    margin-bottom: 60px;
}

.month-label {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.month-label h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.month-line {
    flex-grow: 1;
    height: 1px;
    background: #eee;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.archive-item {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.2s;
}

.archive-item:hover {
    opacity: 0.85;
}

.archive-item-date {
    font-size: 0.85rem;
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 8px;
}

.archive-item-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 8px;
}

.archive-item-title:hover {
    color: var(--primary-blue);
}

.archive-item-cat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.archive-empty {
    padding: 60px 0;
    color: var(--text-secondary);
    text-align: center;
}

.archive-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 60px 0 100px;
    flex-wrap: wrap;
}

.archive-pagination .nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.archive-pagination a,
.archive-pagination span {
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #eee;
    font-weight: 600;
    transition: all 0.2s;
}

.archive-pagination a.page-numbers {
    background: #fff;
}

.archive-pagination a.page-numbers:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.archive-pagination span.current {
    background: var(--primary-purple);
    color: var(--text-on-accent);
    border-color: var(--primary-purple);
}

/* Responsive */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 280px;
    }
    .main-layout {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }
    .hero-section h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 1024px) {
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .archive-title {
        font-size: 3rem;
    }
    .article-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "article-header"
            "article-main"
            "article-sidebar";
        gap: 40px;
    }

    .article-sidebar {
        min-width: 0;
    }

    .article-title {
        font-size: 2.8rem;
    }

    .main-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "main-content" "main-sidebar";
        gap: 40px;
    }

    .main-layout > .sidebar {
        min-width: 0;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-card {
        min-height: 320px;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

}

@media (max-width: 768px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar select {
        min-width: 0;
        width: 100%;
    }
    .archive-title {
        font-size: 2.5rem;
        word-wrap: break-word;
    }
    .container {
        padding: 0 24px;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .hero-card {
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .article-card {
        border: 1px solid #e5e5ea;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .widget:not(.weather-widget):not(.widget-suggest-btn) {
        border: 1px solid #e5e5ea;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }

    .weather-widget {
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 4px 16px rgba(80, 179, 255, 0.2);
    }

    .widget-suggest-btn {
        box-shadow: 0 4px 16px rgba(244, 99, 93, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .site-header {
        padding: 16px 0;
        min-width: 0;
    }
    .site-logo {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-layout {
        margin-top: 24px;
        gap: 32px;
        padding-bottom: 60px;
    }

    .hero-section {
        margin-bottom: 28px;
        gap: 16px;
    }

    .hero-card {
        min-height: 280px;
        padding: 28px 24px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section h2 {
        font-size: 1.4rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card .card-image {
        height: 260px;
    }

    .article-card .card-image img {
        object-fit: cover;
        object-position: center center;
        background: #f4f4f6;
    }

    .article-card .card-body {
        padding: 20px;
    }

    .article-card h3 {
        font-size: 1.2rem;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .widget {
        padding: 20px;
    }

    .article-title {
        font-size: 1.75rem;
        word-wrap: break-word;
    }

    .article-main-img img {
        max-width: 100%;
        width: 100%;
    }

    .content-body,
    .entry-content {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .content-body {
        font-size: 1.1rem;
    }

    .content-body blockquote,
    .entry-content blockquote {
        font-size: 1.4rem;
        padding-left: 20px;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .site-footer {
        padding: 16px 24px;
        width: 100%;
    }

    .footer-line {
        gap: 10px 16px;
        font-size: 0.82rem;
    }

    .article-layout,
    .main-layout,
    main,
    .sidebar {
        min-width: 0;
        overflow-x: hidden;
    }

    .site-nav ul,
    .nav-main {
        flex-wrap: wrap;
        max-width: 100%;
    }

}

@media (max-width: 480px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    .container {
        padding: 0 20px;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .hero-card {
        border-width: 1px;
    }

    .article-card,
    .widget {
        border-color: #e0e0e5;
    }

    .archive-header,
    .archive-main {
        overflow-x: hidden;
    }

    .archive-item-title,
    .article-card h3,
    .similar-item h5 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-card {
        padding: 24px 20px;
        min-height: 240px;
    }

    .hero-section h1 {
        font-size: 1.65rem;
    }

    .hero-section h2 {
        font-size: 1.25rem;
    }

    .tag {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .article-card .card-image {
        height: 220px;
    }

    .article-card .card-body {
        padding: 16px;
    }

    .article-card h3 {
        font-size: 1.1rem;
    }

    .article-card .excerpt {
        -webkit-line-clamp: 2;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .main-layout {
        margin-top: 20px;
        gap: 28px;
    }

    .site-footer {
        padding: 14px 20px;
    }

    .footer-line {
        gap: 8px 14px;
        font-size: 0.8rem;
    }
}

/* ===== Последние новости (page-last-news.php) ===== */
.last-news-page .container {
    padding-bottom: 60px;
}

.last-news-filter-bar {
    margin: 40px 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 5;
}

.last-news-page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.filter-pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    flex-wrap: nowrap;
}

.filter-pills::-webkit-scrollbar {
    height: 4px;
}

.filter-pill {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    background: #f4f4f6;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.filter-pill:hover {
    background: #eaeaee;
    color: var(--text-main);
}

.filter-pill.active {
    background: var(--primary-blue);
    color: white;
}

.news-feed.last-news-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.last-news-card {
    animation: fadeUp 0.6s ease forwards;
}

.last-news-card .card-image {
    height: 240px;
    background-color: #f8f8fa;
}

.last-news-card .card-image::after {
    width: 150px;
    height: 150px;
    bottom: -50px;
    right: -50px;
}

.last-news-card .card-image.purple::after {
    top: -50px;
    left: -50px;
    bottom: auto;
    right: auto;
}

.last-news-card .card-body {
    padding: 30px;
}

.last-news-card .category {
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.last-news-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.last-news-card .excerpt {
    margin-bottom: 24px;
    -webkit-line-clamp: 3;
}

.last-news-card .card-footer {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #999;
}

.last-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(80, 179, 255, 0.1);
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0 60px;
    gap: 16px;
}

.loader-container > div {
    display: flex;
    gap: 8px;
}

.loader-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: inline-block;
    animation: loaderBounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; background: var(--primary-purple); }
.loader-dot:nth-child(3) { animation-delay: 0s; }

@keyframes loaderBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loading-text {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.last-news-pagination {
    margin: 20px 0 40px;
}

.last-news-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.last-news-pagination a,
.last-news-pagination span {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f4f4f6;
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.last-news-pagination a:hover {
    background: var(--primary-blue);
    color: white;
}

.last-news-pagination .current {
    background: var(--primary-blue);
    color: white;
}

.last-news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.last-news-load-more-wrap {
    text-align: center;
    margin: 24px 0 40px;
}

.btn-load-more {
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #3b9eeb;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(80, 179, 255, 0.35);
}

@media (max-width: 1024px) {
    .news-feed.last-news-feed {
        grid-template-columns: repeat(2, 1fr);
    }
    .last-news-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .news-feed.last-news-feed {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .last-news-page-title {
        font-size: 2.2rem;
    }
    /* Горизонтальная крутилка тем на мобильных — свайп влево/вправо */
    .last-news-filter-bar .filter-pills {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        padding: 8px 0 12px;
    }
    .last-news-filter-bar .filter-pill {
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .last-news-card .card-image {
        height: 200px;
    }
    .last-news-card .card-body {
        padding: 24px;
    }
    .last-news-card h3 {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .last-news-filter-bar {
        margin: 24px 0 20px;
        gap: 16px;
    }
    .last-news-page-title {
        font-size: 1.75rem;
    }
    .last-news-filter-bar .filter-pills {
        gap: 8px;
        padding: 6px 0 10px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-pill {
        padding: 8px 18px;
        font-size: 0.88rem;
        scroll-snap-align: start;
    }
    .news-feed.last-news-feed {
        gap: 20px;
    }
    .last-news-card .card-image {
        height: 180px;
    }
    .last-news-card .card-body {
        padding: 18px;
    }
    .last-news-card h3 {
        font-size: 1.15rem;
    }
    .last-news-card .excerpt {
        -webkit-line-clamp: 2;
    }
}

/* ===== Авторские статьи редакции (page-editorial.php) ===== */
body.editorial-page .shape-blob:first-of-type {
    width: 400px !important;
    height: 400px !important;
    top: -80px !important;
}
body.editorial-page .shape-blob:nth-of-type(2) {
    top: 80px !important;
    height: 320px !important;
    width: 320px !important;
    right: -60px !important;
}
body.editorial-page .site-footer {
    background: #0d0d0d !important;
    isolation: isolate;
}

.editorial-page .container {
    padding-bottom: 60px;
}

/* Hero секция — в стиле дизайна */
.section-hero-editorial.editorial-hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #f9f0ff 100%);
    border-radius: var(--radius-card);
    padding: 60px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.section-hero-editorial.editorial-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: var(--primary-blue);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(40px);
}

.editorial-hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 20px;
    color: var(--text-main);
}

.editorial-hero-desc {
    font-size: 1.2rem;
    max-width: 600px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Main layout для editorial */
.editorial-main-layout.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    margin-top: 0;
}

.editorial-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid);
}

/* Карточка статьи в стиле author-card */
.editorial-author-card.author-card-editorial {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    animation: editorialFadeUp 0.6s ease forwards;
}

.editorial-author-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.editorial-card-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
}

.editorial-card-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.editorial-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.editorial-author-avatar .avatar-img,
.editorial-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-author-meta {
    display: flex;
    flex-direction: column;
}

.editorial-author-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.editorial-author-role {
    font-size: 0.7rem;
    color: #888;
}

.editorial-card-body {
    padding: 20px 24px 24px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.editorial-article-cat {
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}

.editorial-article-cat:hover {
    text-decoration: underline;
}

.editorial-author-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 12px;
}

.editorial-author-card h3 a {
    text-decoration: none;
    color: inherit;
}

.editorial-author-card h3 a:hover {
    color: var(--primary-purple);
}

.editorial-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.editorial-meta-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
    border-top: 1px solid #f5f5f5;
    padding-top: 16px;
}

/* Виджет рассылки в сайдбаре editorial */
.widget-newsletter-editorial {
    background: var(--primary-purple);
    color: white;
    border: none;
}

.widget-newsletter-editorial .widget-title {
    color: white;
}

.widget-newsletter-editorial .widget-title::before {
    background: rgba(255, 255, 255, 0.8);
}

.widget-newsletter-editorial p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.editorial-newsletter-input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    margin-bottom: 12px;
    outline: none;
    font-family: var(--font-body);
}

.editorial-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.editorial-newsletter-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: white;
    color: var(--primary-purple);
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-display);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.editorial-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@keyframes editorialFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Пагинация и load more */
.editorial-pagination,
.editorial-load-more-wrap {
    margin-top: 24px;
}

/* Респонс editorial */
@media (max-width: 1024px) {
    .editorial-main-layout.main-layout {
        grid-template-columns: 1fr;
    }
    .editorial-news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-hero-editorial.editorial-hero {
        padding: 40px 24px;
    }
    .editorial-hero-title {
        font-size: 2.5rem;
    }
    .editorial-hero-desc {
        font-size: 1rem;
    }
    .editorial-author-card h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .section-hero-editorial.editorial-hero {
        padding: 32px 20px;
    }
    .editorial-hero-title {
        font-size: 2rem;
    }
    .editorial-card-header,
    .editorial-card-body {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Пустое состояние «Авторские статьи» — в стиле темы */
.editorial-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    margin: 20px 0 40px;
    background: linear-gradient(135deg, rgba(80, 179, 255, 0.08) 0%, rgba(183, 59, 212, 0.08) 100%);
    border-radius: var(--radius-card);
    border: 1px solid rgba(80, 179, 255, 0.15);
}

.editorial-empty-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--primary-blue);
}

.editorial-empty-icon svg {
    opacity: 0.9;
}

.editorial-empty-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px;
}

.editorial-empty-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 0 28px;
}

.editorial-empty-cta {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-blue), #3b9eeb);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.editorial-empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(80, 179, 255, 0.35);
    color: white;
}

@media (max-width: 768px) {
    .editorial-page-desc {
        font-size: 1rem;
        margin: 6px 0 20px 0;
    }
}

@media (max-width: 480px) {
    .editorial-page-desc {
        font-size: 0.95rem;
        margin: 4px 0 16px 0;
    }
    .editorial-empty-state {
        padding: 40px 24px;
        margin: 16px 0 40px;
    }
    .editorial-empty-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }
    .editorial-empty-icon svg {
        width: 64px;
        height: 64px;
    }
    .editorial-empty-title {
        font-size: 1.5rem;
    }
    .editorial-empty-desc {
        font-size: 1rem;
        margin-bottom: 24px;
    }
}

/* ===== Контакты (page-kontakty.php) ===== */
body.contact-page .contact-page-header,
body.contact-page .contact-layout {
    position: relative;
    z-index: 10;
}

.contact-page .shape-blob:first-of-type {
    top: -100px !important;
    right: -100px !important;
    left: auto !important;
    background: var(--primary-purple) !important;
}
.contact-page .shape-blob:nth-of-type(2) {
    top: auto !important;
    bottom: 100px !important;
    left: -100px !important;
    right: auto !important;
    background: var(--primary-blue) !important;
    opacity: 0.1 !important;
}

.contact-page .container {
    padding-bottom: 40px;
}

.contact-page-header {
    margin: 40px 0 60px;
    position: relative;
    z-index: 10;
    display: block;
    visibility: visible;
}


.contact-page-title {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--text-main);
}

.contact-page-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.5;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
    z-index: 10;
    min-height: 1px;
}


.contact-layout .feedback-form {
    background: #fff;
    border: 1px solid #eee;
    padding: 48px;
    border-radius: var(--radius-card);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    display: block;
    visibility: visible;
}

.contact-form .form-group {
    margin-bottom: 24px;
}

.contact-form .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(80, 179, 255, 0.1);
}

.submit-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.submit-btn:hover {
    background: #3ea0ef;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.contact-layout .contact-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
    visibility: visible;
}

.contact-info .info-block h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info .info-block h3::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary-purple);
    border-radius: 3px;
    transform: rotate(45deg);
}

.contact-info .info-detail {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
}

.contact-info .info-row {
    margin-bottom: 12px;
}

.contact-info .info-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.contact-info .info-detail a {
    color: var(--text-main);
    transition: color 0.2s;
}

.contact-info .info-detail a:hover {
    color: var(--primary-blue);
}

.social-grid {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-page .social-link {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: #f4f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
}

.contact-page .social-link:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-4px);
}

.contact-page .map-container {
    width: 100%;
    height: 450px;
    max-height: 450px;
    background: #f0f0f5;
    border-radius: var(--radius-card);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
    z-index: 1;
}

.contact-form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.contact-form-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.contact-form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-page-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .feedback-form {
        padding: 30px;
    }
    .contact-page-title {
        font-size: 2.5rem;
    }
    .contact-page .map-container {
        height: 350px;
    }
}

/* ===== Юридический раздел (шаблон как в дизайне) ===== */

/* Policy: другой фон — один blob справа */
.policy-page .shape-blob:first-of-type {
    display: none;
}
.policy-page .shape-blob:nth-of-type(2) {
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 500px !important;
    height: 500px !important;
    background: var(--primary-purple) !important;
    opacity: 0.1 !important;
}

.policy-page .site-header {
    padding: 30px 0;
    border-bottom: 1px solid #f0f0f0;
}

.policy-page .nav-btn {
    position: relative;
    padding-bottom: 4px;
}
.policy-page .nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-purple);
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.policy-page .nav-btn:hover::after {
    width: 100%;
}

.policy-page .container {
    padding-bottom: 100px;
}

.policy-header {
    padding: 60px 0 40px;
    position: relative;
    z-index: 5;
    animation: fadeUp 0.6s ease forwards;
}

.policy-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    background: linear-gradient(90deg, var(--text-main), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.update-info {
    background: #f8f9fa;
    padding: 24px;
    border-radius: var(--radius-card);
    border-left: 6px solid var(--primary-blue);
    margin-bottom: 40px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

.policy-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 60px;
    margin-top: 40px;
    padding-bottom: 100px;
    position: relative;
    z-index: 5;
}

.anchor-nav {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.anchor-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.anchor-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-left: 2px solid #eee;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.anchor-link:hover {
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    background: rgba(80, 179, 255, 0.05);
}

.anchor-link.active {
    color: var(--primary-purple);
    border-left-color: var(--primary-purple);
    font-weight: 700;
}

.policy-content {
    max-width: 800px;
}

.policy-section {
    margin-bottom: 60px;
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.policy-section h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-main);
}

.policy-section h2::before {
    content: '';
    width: 32px;
    height: 4px;
    background: var(--primary-blue);
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

.policy-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.policy-section ul {
    margin: 20px 0 20px 24px;
    list-style: none;
    padding: 0;
}

.policy-section li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.policy-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary-purple);
    border-radius: 50%;
}

.policy-section a {
    color: var(--primary-blue);
}

.policy-section a:hover {
    text-decoration: underline;
}

.policy-related {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    font-size: 1rem;
}

.policy-related a {
    color: var(--primary-blue);
    font-weight: 600;
}

.policy-related a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .policy-layout {
        grid-template-columns: 1fr;
    }
    .anchor-nav {
        display: none;
    }
    .policy-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .policy-title {
        font-size: 2.2rem;
    }
    .policy-section h2 {
        font-size: 1.75rem;
    }
}
