/* ===== WULTREX — Основные стили (тёмная тема) ===== */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --border: #2a2a2a;
    --border-light: #333333;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #c49b5f;
    --accent-hover: #d4ab6f;
    --accent-dim: rgba(196, 155, 95, 0.15);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.25s ease;
    --container: 1140px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    gap: 0;
}

.logo-text {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding: 4px 0;
    transition: color var(--transition);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Main ===== */
.site-main {
    flex: 1;
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Section headings ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.section-header a {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

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

/* About Block */
.about-block {
    border-top: 1px solid var(--border);
    padding-top: 50px;
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1em;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--accent);
    font-weight: 600;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 17px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs span { color: var(--text-muted); }

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-light);
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.card-image-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 40px;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.card-body h3 a:hover { color: var(--accent); }

.card-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Poet Cards ===== */
.poet-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform var(--transition), border-color var(--transition);
    text-decoration: none;
}

.poet-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-light);
}

.poet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.poet-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-family: var(--font-display);
    color: var(--accent);
    flex-shrink: 0;
}

.poet-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.poet-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Poem List ===== */
.poems-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poem-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
}

.poem-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.poem-item h3 {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.poem-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.poem-year {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.poem-item .arrow {
    color: var(--text-muted);
    transition: color var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.poem-item:hover .arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* Year filters */
.year-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.year-btn {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.year-btn:hover {
    border-color: var(--border-light);
    color: #fff;
}

.year-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

/* Poem year footer (on poem page) */
.poem-year-footer {
    margin-top: 2em;
    font-size: 15px;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
}

/* ===== Single Content ===== */
.content-single {
    max-width: 760px;
    margin: 0 auto;
}

.content-single .content-body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text-primary);
}

.content-body p { margin-bottom: 1.2em; }
.content-body h2 { font-size: 26px; margin: 1.5em 0 0.6em; color: #fff; font-family: var(--font-display); }
.content-body h3 { font-size: 22px; margin: 1.3em 0 0.5em; color: #fff; }
.content-body img { border-radius: var(--radius); margin: 1.5em 0; }
.content-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 1.5em 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}
.content-body ul, .content-body ol { margin: 1em 0; padding-left: 1.5em; }
.content-body li { margin-bottom: 0.4em; }
.content-body a { color: var(--accent); text-decoration: underline; }
.content-body pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    margin: 1.5em 0;
}

/* Article Footer Media (embed + Yandex Music) */
.article-footer-media {
    margin-top: 2.5em;
    padding-top: 2em;
    border-top: 1px solid var(--border);
}

.embed-player {
    margin-bottom: 1.5em;
    border-radius: var(--radius);
    overflow: hidden;
}

.embed-player iframe {
    max-width: 100%;
    border-radius: var(--radius);
}

/* Yandex Music Button */
.music-link-block {
    margin-top: 0;
}

/* Linked Poem Block */
.linked-poem-block {
    margin-top: 1.5em;
}

.linked-poem-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.linked-poem-block .poem-item-poet {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-yandex-music {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #ffdb4d 0%, #fc0 100%);
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.25);
}

.btn-yandex-music:hover {
    background: linear-gradient(135deg, #ffe066 0%, #ffd633 100%);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.35);
    transform: translateY(-2px);
    color: #000;
}

.btn-yandex-music svg {
    flex-shrink: 0;
}

/* Poem content — preserve line breaks */
.poem-content {
    font-family: var(--font-display);
    font-size: 19px;
    line-height: 2;
    white-space: pre-line;
    color: var(--text-primary);
}

/* ===== Track iframe container ===== */
.track-player {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.track-player iframe {
    width: 100%;
    border: none;
    border-radius: var(--radius);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.pagination a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.pagination a:hover {
    border-color: var(--accent);
    color: #fff;
}

.pagination .current {
    background: var(--accent);
    color: #0a0a0a;
    font-weight: 600;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 30px;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.footer-brand .logo-text {
    font-size: 18px;
    letter-spacing: 3px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
}

.footer-nav a:hover { color: #fff; }

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

.social-link svg {
    display: block;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p { font-size: 16px; }

/* ===== 404 ===== */
.page-404 {
    text-align: center;
    padding: 100px 20px;
}

.page-404 h1 {
    font-family: var(--font-display);
    font-size: 64px;
    color: var(--accent);
    margin-bottom: 16px;
}

.page-404 p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #0a0a0a;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background var(--transition);
}

.btn:hover {
    background: var(--accent-hover);
    color: #0a0a0a;
}

/* ===== Featured image ===== */
.featured-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(calc(-100% - 71px));
        transition: transform var(--transition);
    }
    
    .main-nav.open {
        transform: translateY(0);
    }
    
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 17px; }
    .page-header h1 { font-size: 28px; }
    .section-header h2 { font-size: 24px; }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .content-single .content-body { font-size: 16px; }
    .poem-content { font-size: 17px; }
}

@media (max-width: 480px) {
    .hero { padding: 50px 10px 40px; }
    .hero h1 { font-size: 26px; }
    .site-main { padding: 24px 0; }
}

/* ===== Ambient Glow (desktop only) — закомментировано, нагружает ЦП ===== */
/*
.ambient-glow {
    display: none;
}

@media (min-width: 769px) {
    .ambient-glow {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 0;
        overflow: hidden;
        pointer-events: none;
    }

    .glow-orb {
        position: absolute;
        border-radius: 50%;
        will-change: transform;
    }

    .glow-1 {
        width: 1400px;
        height: 1400px;
        background: radial-gradient(circle, rgba(196, 155, 95, 0.21) 0%, rgba(196, 155, 95, 0.04) 50%, transparent 70%);
        filter: blur(120px);
        top: -10%;
        left: -5%;
        animation: glowDrift1 30s ease-in-out infinite;
    }

    .glow-2 {
        width: 1200px;
        height: 1200px;
        background: radial-gradient(circle, rgba(196, 155, 95, 0.17) 0%, rgba(196, 155, 95, 0.03) 50%, transparent 70%);
        filter: blur(140px);
        top: 40%;
        right: -10%;
        animation: glowDrift2 40s ease-in-out infinite;
    }

    .glow-3 {
        width: 1000px;
        height: 1000px;
        background: radial-gradient(circle, rgba(196, 155, 95, 0.14) 0%, rgba(196, 155, 95, 0.02) 50%, transparent 70%);
        filter: blur(100px);
        bottom: -5%;
        left: 30%;
        animation: glowDrift3 50s ease-in-out infinite;
    }

    @keyframes glowDrift1 {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(15vw, 20vh); }
        50% { transform: translate(5vw, 50vh); }
        75% { transform: translate(-10vw, 30vh); }
    }

    @keyframes glowDrift2 {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(-20vw, -15vh); }
        50% { transform: translate(-30vw, 10vh); }
        75% { transform: translate(-10vw, -25vh); }
    }

    @keyframes glowDrift3 {
        0%, 100% { transform: translate(0, 0); }
        25% { transform: translate(20vw, -30vh); }
        50% { transform: translate(-15vw, -20vh); }
        75% { transform: translate(10vw, -10vh); }
    }
}
*/

