/* 
  Editorial Theme for Anamek Blog
  Aligned with the Anamek Dictionary academic color palette.
*/

:root {
    /* Map blog variables to dictionary design tokens */
    --paper: #fdfdfb;
    /* lex-bg */
    --ink: #4e6476;
    /* dictionary primary navy */
    --ink-soft: #334e68;
    /* lex-secondary */
    --ink-muted: #627d98;
    --cream: #f8f9fa;
    /* lex-sidebar-bg */
    --accent-editorial: #4e6476;
    /* dictionary primary */
    --accent2-editorial: #f99417;
    /* dictionary orange */
    --gold: #f99417;
    /* dictionary orange accent */
    --rule-color: #bcccdc;
    /* lex-border */
    --highlight: #fff5e9;
    /* light orange tint */
    --mono-bg: #1a2a3a;
    /* lex-primary dark */
    --mono-text: #e2e8f0;

    /* Direct dictionary tokens (for clarity) */
    --lex-primary: #1a2a3a;
    --lex-secondary: #334e68;
    --lex-accent: #f99417;
    --lex-bg: #fdfdfb;
    --lex-sidebar-bg: #f8f9fa;
    --lex-text: #102a43;
    --lex-border: #bcccdc;
}

.blog-article-body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 19px;
    line-height: 1.8;
}

/* ── HERO ── */
.editorial-hero {
    background: #4e6476;
    /* Match dictionary header exactly */
    padding: 100px 40px 80px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.editorial-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(249, 148, 23, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--gold);
}

.editorial-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

/* ── CONTENT ── */
.editorial-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 80px 40px 100px;
}

.post-content.editorial {
    font-family: 'Source Serif 4', serif;
    font-size: 1.2rem;
    color: var(--ink-soft);
    line-height: 1.85;
}

.post-content.editorial h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 2px solid var(--rule-color);
    padding-bottom: 12px;
    margin: 60px 0 24px;
    line-height: 1.3;
}

.post-content.editorial h3 {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gold);
    margin: 40px 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.post-content.editorial p {
    margin-bottom: 28px;
}

.post-content.editorial blockquote {
    margin: 50px 0;
    padding: 30px 40px;
    background: var(--cream);
    border-left: 4px solid var(--gold);
    position: relative;
    border-radius: 0 8px 8px 0;
}

.post-content.editorial blockquote p {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--ink);
    margin: 0;
    line-height: 1.7;
}

/* ── TABLES ── */
.post-content.editorial table {
    width: 100%;
    margin: 40px 0;
    border-collapse: collapse;
    font-size: 0.95rem;
    border: 1px solid var(--rule-color);
}

.post-content.editorial thead tr {
    background: var(--ink);
}

.post-content.editorial thead th {
    padding: 15px 20px;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.post-content.editorial tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--cream);
    border-right: 1px solid var(--rule-color);
}

/* ── CUSTOM COMPONENTS (To be used manually in Markdown if needed) ── */
.rule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.rule-card {
    background: var(--mono-bg);
    border-radius: 6px;
    padding: 24px;
    position: relative;
}

.rule-card .rule-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    color: var(--mono-text);
    font-weight: 600;
}

/* ── NAVBAR OVERRIDES ── */
.editorial-mode .main-header {
    background: #4e6476 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editorial-mode .main-header .nav-menu a,
.editorial-mode .main-header .secondary-brand {
    color: rgba(255, 255, 255, 0.9) !important;
}

.editorial-mode .main-header .nav-menu a:hover {
    color: var(--gold) !important;
}

.editorial-mode .main-header .lang-text {
    color: #ffffff !important;
}


/* ── CONTENT REFINEMENTS ── */
.post-content.editorial ul,
.post-content.editorial ol {
    margin-bottom: 28px;
    padding-left: 20px;
}

.post-content.editorial li {
    margin-bottom: 12px;
}

.post-content.editorial hr {
    margin: 60px 0;
    border: 0;
    border-top: 1px solid var(--rule-color);
    opacity: 0.5;
}

.post-content.editorial em {
    color: var(--accent-editorial);
}

.post-content.editorial strong {
    color: var(--ink);
}

/* ── SHARING & FOOTER ── */
.editorial-footer {
    border-top: 1px solid var(--rule-color);
    padding-top: 40px;
    margin-top: 60px;
}

.share-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

.share-btn:hover {
    transform: translateY(-3px);
}

/* ── TRIBE GRID ── */
.tribe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 28px 0 40px;
}

@media (max-width: 580px) {
    .tribe-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tribe-item {
    padding: 14px 16px;
    border: 1px solid var(--rule-color);
    background: var(--paper);
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.tribe-item.highlight-tribe {
    border-color: var(--gold);
    background: var(--highlight);
}

/* ── NOTE BOX ── */
.note-box {
    background: var(--highlight);
    border: 1px solid var(--rule-color);
    border-left: 3px solid var(--gold);
    padding: 20px 24px;
    margin: 36px 0;
    font-size: 0.95rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.note-box strong {
    color: var(--gold) !important;
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}