/* ===========================================
   ГЕРАКЛ — Пергаментная тема
   =========================================== */

/* --- Переменные --- */
:root {
    --primary: #8b4513;
    --primary-light: #a0522d;
    --bg: #f5f0e8;
    --bg-card: #ebe5d9;
    --bg-surface: #e0d8c8;
    --text: #3a2e1a;
    --text-muted: #6b5d4f;
    --accent: #2c5f2d;
    --border: #c9b99a;
    --gold: #b8860b;
    --font-heading: 'Cinzel', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --max-width: 1140px;
    --radius: 6px;
}

/* --- Сброс --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

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

/* --- Контейнер --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ===========================================
   ШАПКА
   =========================================== */
.site-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.logo-icon { font-size: 1.6rem; }

.main-nav { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.nav-link:hover { color: var(--primary); background: var(--bg); }
.nav-link.active { color: var(--primary); background: var(--bg); font-weight: 600; }
.nav-icon { margin-right: 4px; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.4rem;
    padding: 4px 10px;
    cursor: pointer;
    color: var(--text);
}

/* ===========================================
   ХЛЕБНЫЕ КРОШКИ
   =========================================== */
.breadcrumbs {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumb-sep { margin: 0 6px; opacity: 0.5; }
.breadcrumb-current { color: var(--text-muted); }

/* ===========================================
   ОСНОВНОЙ КОНТЕНТ
   =========================================== */
.site-main { padding: 40px 0 60px; min-height: 60vh; }

/* --- Hero (главная) — двухколоночный --- */
.hero {
    /* Вырываем из контейнера на всю ширину */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 48px 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 100vw;
    background: linear-gradient(160deg, #3a2510 0%, #5c3a1e 25%, #7a4a28 50%, #8b6914 100%);
    border-bottom: 4px solid var(--gold);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Греческий меандр сверху */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--gold) 0px, var(--gold) 12px,
        transparent 12px, transparent 16px,
        var(--gold) 16px, var(--gold) 22px,
        transparent 22px, transparent 26px
    );
    opacity: 0.7;
}

/* Декоративное свечение */
.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(184, 134, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 620px;
    position: relative;
    z-index: 1;
    padding-bottom: 48px;
}

.hero-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 6px rgba(184, 134, 11, 0.4));
    animation: heroShimmer 3s ease-in-out infinite;
}

@keyframes heroShimmer {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: #f5e6c8;
    margin-bottom: 14px;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(245, 230, 200, 0.8);
    margin: 0 0 20px;
    line-height: 1.6;
}

/* Разделительная линия под подзаголовком */
.hero-divider {
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    position: relative;
    z-index: 1;
}

/* Быстрые факты в hero */
.hero-facts {
    display: flex;
    gap: 1.5rem;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-fact {
    color: rgba(245, 230, 200, 0.7);
    font-size: 0.82rem;
    line-height: 1.3;
}

.hero-fact-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 2px;
}

/* CTA кнопка в hero */
.hero-cta {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold), #d4a017);
    color: #2a1a08 !important;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.3);
    letter-spacing: 0.02em;
}
.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.45);
    background: linear-gradient(135deg, #d4a017, var(--gold));
}

/* Картинка в hero */
.hero-image {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    align-self: center;
}
.hero-image img {
    display: block;
    width: 360px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
    animation: heroFloat 4s ease-in-out infinite;
    border-radius: 12px;
    -webkit-mask-image: radial-gradient(ellipse 85% 90% at 50% 45%, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 90% at 50% 45%, black 60%, transparent 100%);
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}


/* --- Факт-карточки (не кликабельные) --- */
.facts-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}
.fact-card {
    padding: 20px 20px 20px 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius);
    cursor: default;
}
.fact-card-icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 8px;
}
.fact-card-value {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.fact-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- Сетка разделов (главная) --- */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.section-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.25s;
    text-decoration: none;
    overflow: hidden;
}
.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
.section-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s;
}
.section-card:hover .section-card-img {
    transform: scale(1.05);
}
.section-card-body {
    padding: 20px 20px 24px;
}
.section-card-icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.section-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 6px;
}
.section-card-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* --- Карточная сетка (хаб) --- */
.hub-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}
.hub-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary);
}
.hub-description { color: var(--text-muted); margin-top: 8px; font-size: 1.05rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.hub-card {
    display: block;
    padding: 24px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}
.hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border-color: var(--gold);
}
.hub-card-icon { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.hub-card-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--border);
    line-height: 1;
}
.hub-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 6px;
}
.hub-card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.hub-text {
    max-width: 780px;
    font-size: 1rem;
    line-height: 1.8;
}
.hub-text p { margin-bottom: 1em; }

/* ===========================================
   СТАТЬЯ — 2 КОЛОНКИ
   =========================================== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

.article-main h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    border-left: 3px solid var(--gold);
    padding-left: 16px;
    margin-bottom: 28px;
    font-style: italic;
}

.article-main h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.article-main h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text);
    margin: 28px 0 12px;
}

.article-main p { margin-bottom: 1.1em; }

.article-main ul, .article-main ol {
    margin: 0 0 1.1em 24px;
}
.article-main li { margin-bottom: 0.4em; }

.article-main blockquote {
    border-left: 3px solid var(--gold);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}
.article-main blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: normal;
}

/* Факт-бокс */
.fact-box {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    margin: 20px 0;
}
.fact-icon { font-size: 1.4rem; flex-shrink: 0; }
.fact-box p { margin: 0; }

/* Таблица */
.table-wrap { overflow-x: auto; margin: 20px 0; }
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table-wrap th, .table-wrap td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.table-wrap th {
    background: var(--bg-surface);
    font-weight: 600;
    font-family: var(--font-heading);
}
.table-wrap tr:nth-child(even) td {
    background: var(--bg-card);
}

/* ===========================================
   САЙДБАР
   =========================================== */
.article-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-toc,
.sidebar-facts,
.sidebar-related {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-toc h3,
.sidebar-facts h3,
.sidebar-related h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar-toc ul { list-style: none; }
.sidebar-toc li { margin-bottom: 6px; }
.sidebar-toc a {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    padding: 3px 0;
}
.sidebar-toc a:hover { color: var(--primary); }
.sidebar-toc .toc-level-3 { padding-left: 14px; }

.sidebar-facts dl {
    font-size: 0.88rem;
    display: grid;
    gap: 0;
}
.sidebar-facts dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    margin: 0;
    padding: 10px 0 2px;
}
.sidebar-facts dt:first-of-type {
    padding-top: 0;
}
.sidebar-facts dd {
    margin: 0;
    padding: 0 0 9px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    line-height: 1.45;
}
.sidebar-facts dd:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-related ul { list-style: none; }
.sidebar-related li { margin-bottom: 8px; }
.sidebar-related li:last-child { margin-bottom: 0; }
.related-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: calc(var(--radius) - 2px);
    transition: background 0.2s;
    text-decoration: none;
}
.related-card:hover {
    background: var(--bg-surface);
}
.related-thumb {
    width: 56px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.related-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card:hover .related-title {
    color: var(--primary);
}

/* ===========================================
   FAQ
   =========================================== */
.faq-block { margin-top: 48px; }
.faq-block h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--bg-card);
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 40px;
}
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 300;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--primary); }

.faq-answer {
    padding: 0 20px 16px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.faq-answer p { margin-bottom: 0.8em; }

.faq-intro {
    margin-bottom: 28px;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ===========================================
   ПОДВАЛ
   =========================================== */
.site-footer {
    margin-top: 60px;
    padding: 32px 0;
    background: var(--bg-card);
    border-top: 2px solid var(--border);
}
.footer-inner { text-align: center; }
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.footer-nav a { font-size: 0.85rem; color: var(--text-muted); }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* --- Intro-block (главная) --- */
.intro-block {
    max-width: 780px;
    margin: 0 auto 48px;
    font-size: 1.05rem;
    line-height: 1.8;
}
.intro-block p { margin-bottom: 1em; }

/* ===========================================
   АДАПТИВНОСТЬ
   =========================================== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px 0;
        gap: 24px;
    }
    .hero-content { max-width: 100%; }
    .hero-facts { justify-content: center; }
    .hero-divider { margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
    .hero-image { align-self: center; }
    .hero-image img { width: 260px; }
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .mobile-menu-btn { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 2px solid var(--border);
        flex-direction: column;
        padding: 12px 20px;
    }
    .main-nav.open { display: flex; }
    .nav-link { padding: 10px 0; }

    .hero-title { font-size: 1.6rem; }
    .hero-image { align-self: center; }
    .hero-image img { width: 200px; }
    .article-main h1 { font-size: 1.6rem; }
    .article-main h2 { font-size: 1.2rem; }

    .card-grid { grid-template-columns: 1fr; }
    .section-grid { grid-template-columns: 1fr; }

    .article-sidebar { grid-template-columns: 1fr; }

    .hub-card-number { font-size: 1.5rem; }
}

/* --- Греческий орнамент (декоративная полоска) --- */
.site-header::after {
    content: '';
    display: block;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--gold) 0px,
        var(--gold) 8px,
        transparent 8px,
        transparent 12px,
        var(--primary) 12px,
        var(--primary) 20px,
        transparent 20px,
        transparent 24px
    );
}

/* На главной убираем полосу под хедером */
body.is-home .site-header {
    border-bottom: none;
}
body.is-home .site-header::after {
    display: none;
}
body.is-home .site-main {
    padding: 0 0 60px;
}

/* ===========================================
   ПРОГРЕСС-БАР ЧТЕНИЯ
   =========================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    z-index: 200;
    width: 0%;
    transition: width 0.1s linear;
}

/* ===========================================
   БЛОК «В ДВУХ СЛОВАХ»
   =========================================== */
.summary-box {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
}
.summary-header {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.summary-box p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
}
.summary-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary) !important;
}

/* ===========================================
   КАРТИНКИ В СТАТЬЕ
   =========================================== */
.article-hero-img,
.article-inline-img {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.article-hero-img img,
.article-inline-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px;
    background: var(--bg-surface);
}
.article-hero-img figcaption,
.article-inline-img figcaption {
    padding: 10px 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* ===========================================
   ИНТЕРЕСНЫЕ ФАКТЫ
   =========================================== */
.fun-facts {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.fun-facts h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 16px;
}
.fun-facts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fun-facts-list li {
    position: relative;
    padding: 12px 16px 12px 40px;
    margin-bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.93rem;
    line-height: 1.6;
}
.fun-facts-list li::before {
    content: '⚡';
    position: absolute;
    left: 14px;
    top: 12px;
}

/* ===========================================
   КВИЗ «ПРОВЕРЬ СЕБЯ»
   =========================================== */
.quiz-block {
    margin-top: 36px;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.quiz-block h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: none;
}
.quiz-question {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text);
}
.quiz-counter {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.quiz-options {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}
.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    font-size: 0.93rem;
    font-family: var(--font-body);
    color: var(--text);
    transition: all 0.2s;
}
.quiz-option:hover:not(:disabled) {
    border-color: var(--primary);
    background: #f0ebe0;
}
.quiz-option.correct {
    border-color: var(--accent);
    background: #e8f5e9;
    color: var(--accent);
    font-weight: 600;
}
.quiz-option.wrong {
    border-color: #c62828;
    background: #ffebee;
    color: #c62828;
}
.quiz-option:disabled {
    cursor: default;
    opacity: 0.7;
}
.quiz-feedback {
    font-size: 0.9rem;
    padding: 8px 0;
    min-height: 20px;
}
.quiz-next {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: background 0.2s;
}
.quiz-next:hover { background: var(--primary-light); }
.quiz-result {
    text-align: center;
    padding: 20px;
}
.quiz-score {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.quiz-message {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ===========================================
   НАВИГАЦИЯ ← / →
   =========================================== */
.labor-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}
.labor-nav-link {
    display: flex;
    align-items: stretch;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
    overflow: hidden;
}
.labor-nav-link:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.labor-nav-img {
    width: 120px;
    min-height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}
.labor-nav-prev .labor-nav-img { border-radius: var(--radius) 0 0 var(--radius); }
.labor-nav-next { flex-direction: row-reverse; }
.labor-nav-next .labor-nav-img { border-radius: 0 var(--radius) var(--radius) 0; }
.labor-nav-text {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.labor-nav-next .labor-nav-text { text-align: right; }
.labor-nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.labor-nav-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}
.labor-nav-placeholder { visibility: hidden; }

@media (max-width: 640px) {
    .labor-nav { grid-template-columns: 1fr; }
    .labor-nav-next { text-align: left; }
    .summary-box { padding: 16px; }
    .quiz-block { padding: 20px 16px; }
}

/* ===========================================
   ЗАГОЛОВОК + ШАРИНГ (строка)
   =========================================== */
.article-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    justify-content: space-between;
}
.article-title-row h1 { flex: 1; }

/* ===========================================
   ВИДЖЕТ «ПОДЕЛИТЬСЯ»
   =========================================== */
.share-widget {
    position: relative;
    flex-shrink: 0;
}
.share-trigger {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.share-trigger:hover {
    border-color: var(--primary);
    background: var(--bg-surface);
}
.share-popup {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 50;
    white-space: nowrap;
}
.share-widget:hover .share-popup,
.share-widget:focus-within .share-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.share-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background: transparent;
    color: var(--text-muted);
}
.share-link:hover { transform: scale(1.15); }
.share-vk:hover { color: #4a76a8; background: rgba(74,118,168,0.1); }
.share-tg:hover { color: #0088cc; background: rgba(0,136,204,0.1); }
.share-wa:hover { color: #25d366; background: rgba(37,211,102,0.1); }
.share-ok:hover { color: #ee8208; background: rgba(238,130,8,0.1); }
.share-x:hover  { color: #000; background: rgba(0,0,0,0.06); }
.share-copy:hover { color: var(--primary); background: rgba(139,69,19,0.1); }

/* Нижний блок шеринга */
.share-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.share-bottom-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.share-bottom .share-popup {
    bottom: 100%;
    top: auto;
    margin-top: 0;
    margin-bottom: 6px;
    left: 0;
    right: auto;
}

@media (max-width: 640px) {
    .article-title-row { flex-wrap: wrap; }
    .share-bottom .share-popup { right: auto; left: 0; }
}

/* ===========================================
   ССЫЛКИ В ТЕКСТЕ СТАТЬИ
   =========================================== */
article p a,
article li a,
.fact-box a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(184, 134, 11, 0.35);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    font-weight: 500;
    transition: color 0.2s, text-decoration-color 0.2s, background 0.2s;
    border-radius: 2px;
    padding: 0 2px;
}
article p a:hover,
article li a:hover,
.fact-box a:hover {
    color: #d4a017;
    text-decoration-color: #d4a017;
    background: rgba(184, 134, 11, 0.08);
}

/* ===========================================
   ПРЕВЬЮ-ТУЛТИП ПРИ НАВЕДЕНИИ НА ССЫЛКУ
   =========================================== */
.link-preview {
    position: absolute;
    z-index: 1000;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
}
.link-preview.visible {
    opacity: 1;
    transform: translateY(0);
}
.link-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.link-preview-title {
    padding: 10px 14px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.4;
    font-weight: 600;
}

@media (max-width: 768px) {
    .link-preview { display: none !important; }
}

/* ===========================================
   ХАБ-СТРАНИЦЫ — Сетка карточек
   =========================================== */

/* --- Заголовок хаба --- */
.hub-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hub-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.hub-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.65;
}

/* --- Картинка во вступлении хаба --- */
.hub-intro-image {
    float: right;
    width: 300px;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 640px) {
    .hub-intro-image {
        float: none;
        display: block;
        width: 220px;
        margin: 0 auto 1rem;
    }
}

/* --- Сетка --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* --- Карточка --- */
.hub-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.15);
    border-color: var(--gold);
}

/* --- Изображение карточки --- */
.hub-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.hub-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hub-card:hover .hub-card-img img {
    transform: scale(1.06);
}

/* --- Бейдж номера --- */
.hub-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* --- Тело карточки --- */
.hub-card-body {
    padding: 1rem 1.15rem 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    line-height: 1;
}

/* Номер без картинки (для хабов вроде FAQ) */
.hub-card-number {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
}

.hub-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.hub-card:hover .hub-card-title {
    color: var(--gold);
}

.hub-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    flex: 1;
}

/* Карточки БЕЗ картинки — иконка покрупнее */
.hub-card:not(.has-image) .hub-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hub-card:not(.has-image) .hub-card-body {
    padding: 1.25rem;
}

/* --- Текст под карточками --- */
.hub-text {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 800px;
}

.hub-text p {
    margin-bottom: 0.75rem;
}

/* ===========================================
   ПОДВИГИ ХАБ — Полноценная контент-страница
   =========================================== */

/* --- Вступление / Заключение --- */
.hub-intro,
.hub-outro {
    margin-bottom: 2.5rem;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
}

.hub-intro p,
.hub-outro p {
    margin-bottom: 1rem;
}

.hub-outro h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* --- Сводная таблица --- */
.hub-table-wrap {
    margin-bottom: 2.5rem;
}

.hub-table-wrap h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(139, 69, 19, 0.08);
}

.hub-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.hub-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 12px 16px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border-bottom: 2px solid var(--gold);
}

.hub-table th:first-child {
    text-align: center;
    width: 40px;
}

.hub-table td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(201, 185, 154, 0.4);
    vertical-align: middle;
}

.hub-table td:first-child {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* Полосатые строки */
.hub-table tbody tr:nth-child(odd) {
    background: rgba(235, 229, 217, 0.5);
}

.hub-table tbody tr:nth-child(even) {
    background: rgba(245, 240, 232, 0.5);
}

/* Hover с золотой полосой слева */
.hub-table tbody tr {
    transition: background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.hub-table tbody tr:hover {
    background: rgba(184, 134, 11, 0.08);
    box-shadow: inset 3px 0 0 var(--gold);
}

/* Последняя строка — без нижнего бордера */
.hub-table tbody tr:last-child td {
    border-bottom: none;
}

.hub-table a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.3);
    transition: color 0.2s, border-color 0.2s;
}

.hub-table a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Блоки подвигов --- */
.labors-list {
    margin-bottom: 2.5rem;
}

.labor-block {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.labor-block:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.1);
}

/* Чередование — каждый чётный блок с картинкой справа */
.labor-block:nth-child(even) {
    flex-direction: row-reverse;
}

/* --- Картинка подвига --- */
.labor-block-img {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    align-self: flex-start;
}

.labor-block-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    transition: transform 0.4s ease;
}

.labor-block:hover .labor-block-img img {
    transform: scale(1.04);
}

.labor-block-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Чётные блоки — бейдж справа */
.labor-block:nth-child(even) .labor-block-badge {
    left: auto;
    right: 8px;
}

/* --- Тело подвига --- */
.labor-block-body {
    flex: 1;
    min-width: 0;
}

.labor-block-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.labor-block-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.labor-block-title a:hover {
    color: var(--gold);
}

.labor-block-icon {
    margin-right: 0.4rem;
}

/* --- Мета-теги (противник, место, оружие) --- */
.labor-block-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.labor-meta-tag {
    font-size: 0.8rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 2px 8px;
    color: var(--text-muted);
    white-space: nowrap;
}

.labor-meta-tag strong {
    color: var(--primary);
    font-weight: 600;
}

/* --- Текст описания --- */
.labor-block-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.labor-block-text p {
    margin-bottom: 0.5rem;
}

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

/* --- Ссылка «читать подробнее» --- */
.labor-block-link {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.labor-block-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- Адаптивность --- */
@media (max-width: 720px) {
    .labor-block {
        flex-direction: column !important;
        padding: 1rem;
    }

    .labor-block-img {
        flex: none;
        width: 100%;
    }

    .labor-block-title {
        font-size: 1.1rem;
    }

    .hub-table {
        font-size: 0.8rem;
    }

    .hub-table th,
    .hub-table td {
        padding: 8px 10px;
    }
}

/* ===========================================
   ГЛАВНАЯ СТРАНИЦА — расширенные блоки
   =========================================== */

/* --- О Геракле --- */
.about-block {
    margin-bottom: 2rem;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
}

.about-block h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-block p {
    margin-bottom: 1rem;
}

.about-block a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.3);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.about-block a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Ключевые факты --- */
.facts-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.fact-card {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(139, 69, 19, 0.12);
    border-color: var(--gold);
}

.fact-card-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.fact-card-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.fact-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* --- Краткий обзор подвигов --- */
.labors-overview {
    margin-bottom: 2.5rem;
}

.labors-overview h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.labors-overview-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.labors-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.labor-mini-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.labor-mini-card:hover {
    border-color: var(--gold);
    background: var(--bg-surface);
    transform: translateY(-2px);
}

.labor-mini-num {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 20px;
    letter-spacing: 0.03em;
}

.labor-mini-icon {
    font-size: 1.15rem;
}

.labor-mini-name {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.2;
}

/* --- CTA кнопка --- */
.labors-overview-cta {
    text-align: center;
}

.cta-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 69, 19, 0.3);
}

/* --- Текст про культуру --- */
.intro-block h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* --- Адаптивность главной --- */
@media (max-width: 900px) {
    .facts-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .labors-mini-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .facts-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .fact-card {
        padding: 1rem 0.5rem;
    }

    .labors-mini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .labor-mini-card {
        padding: 0.5rem 0.65rem;
    }

    .labor-mini-name {
        font-size: 0.75rem;
    }

    .cta-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.5rem;
    }
}
