/* ===== Single Post page redesign ===== */

/* ── Reading progress bar ── */
.ehc-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 9999;
    pointer-events: none;
}
.ehc-reading-progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(197, 168, 128, 0.5);
}

/* ── Article header ── */
.ehc-article-header {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px var(--space-lg) 40px;
    text-align: center;
}
.ehc-cat-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(197, 168, 128, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(197, 168, 128, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}
.ehc-cat-badge:hover {
    background: var(--color-accent);
    color: #0a0a0a;
}
.ehc-article-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-secondary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}
.ehc-article-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 32px;
}
.ehc-article-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}
.ehc-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}
.ehc-author-info { text-align: right; line-height: 1.3; }
.ehc-author-name { color: var(--color-secondary); font-weight: 600; font-size: var(--text-sm); }
.ehc-author-role { font-size: var(--text-xs); opacity: 0.7; }
.ehc-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.6;
}
.ehc-meta-item { white-space: nowrap; }

/* ── 2-col layout ── */
.ehc-article-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg) 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

/* ── Article main ── */
.ehc-article-main { min-width: 0; }
.ehc-article-featured {
    margin: 0 0 48px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ehc-article-featured img { width: 100%; height: auto; display: block; }

/* ── Prose typography ── */
.ehc-prose {
    font-size: 1.125rem;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.88);
    max-width: 720px;
}
.ehc-prose > * + * { margin-top: 24px; }
.ehc-prose p { color: rgba(255, 255, 255, 0.82); margin: 0; }
.ehc-prose p:first-of-type::first-letter {
    font-size: 3.8em;
    float: right;
    line-height: 0.9;
    color: var(--color-accent);
    padding-left: 14px;
    font-weight: 700;
    font-family: var(--font-heading);
}
.ehc-prose h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 500;
    color: var(--color-secondary);
    margin: 56px 0 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.3;
    scroll-margin-top: 100px;
}
.ehc-prose h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 500;
    color: var(--color-secondary);
    margin: 40px 0 16px;
    line-height: 1.4;
    scroll-margin-top: 100px;
}
.ehc-prose h2::before { content: ""; display: block; width: 40px; height: 2px; background: var(--gradient-accent); margin-bottom: 16px; }
.ehc-prose a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(197, 168, 128, 0.3);
    transition: all 0.2s ease;
}
.ehc-prose a:hover { border-bottom-color: var(--color-accent); background: rgba(197, 168, 128, 0.08); }
.ehc-prose strong { color: var(--color-secondary); font-weight: 700; }
.ehc-prose blockquote {
    border-right: 3px solid var(--color-accent);
    padding: 20px 28px;
    background: rgba(197, 168, 128, 0.05);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--color-secondary);
    font-size: 1.2rem;
    line-height: 1.7;
    margin: 32px 0;
}
.ehc-prose blockquote p { color: inherit; }
.ehc-prose ul, .ehc-prose ol { padding-right: 28px; color: rgba(255, 255, 255, 0.82); }
.ehc-prose ul li, .ehc-prose ol li { margin-bottom: 10px; padding-right: 8px; }
.ehc-prose ul li::marker { color: var(--color-accent); }
.ehc-prose ol li::marker { color: var(--color-accent); font-weight: 600; }
.ehc-prose code {
    font-family: 'SF Mono', Menlo, monospace;
    background: rgba(197, 168, 128, 0.1);
    color: var(--color-accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}
.ehc-prose pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    margin: 24px 0;
}
.ehc-prose pre code { background: transparent; padding: 0; color: #e8cfa0; }
.ehc-prose img {
    border-radius: var(--radius-md);
    margin: 32px 0;
    max-width: 100%;
    height: auto;
}
.ehc-prose figure { margin: 32px 0; }
.ehc-prose figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: 12px;
    font-style: italic;
}
.ehc-prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(197, 168, 128, 0.3), transparent);
    margin: 40px 0;
}
.ehc-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: var(--text-base);
}
.ehc-prose th, .ehc-prose td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ehc-prose th { color: var(--color-secondary); font-weight: 600; background: rgba(255, 255, 255, 0.04); }

/* ── Tags ── */
.ehc-tags-row {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ehc-tags-label { color: var(--color-text-muted); font-size: var(--text-sm); margin-left: 8px; }
.ehc-tag-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.25s ease;
}
.ehc-tag-pill:hover { border-color: var(--color-accent); color: var(--color-accent); background: rgba(197, 168, 128, 0.05); }

/* ── Author bio ── */
.ehc-author-bio {
    margin-top: 56px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(197, 168, 128, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.ehc-author-bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-accent);
    flex-shrink: 0;
}
.ehc-author-bio-content { flex: 1; }
.ehc-author-bio-name { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-secondary); font-weight: 600; }
.ehc-author-bio-role { font-size: var(--text-sm); color: var(--color-accent); margin: 4px 0 12px; }
.ehc-author-bio-text { color: var(--color-text-muted); line-height: 1.7; margin: 0 0 12px; font-size: var(--text-sm); }
.ehc-author-bio-link { color: var(--color-accent); text-decoration: none; font-size: var(--text-sm); font-weight: 600; }

/* ── CTA ── */
.ehc-article-cta {
    margin-top: 48px;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(197, 168, 128, 0.12), rgba(197, 168, 128, 0.03));
    border: 1px solid rgba(197, 168, 128, 0.35);
    border-radius: var(--radius-xl);
    text-align: center;
}
.ehc-cta-emoji { font-size: 2.5rem; margin-bottom: 12px; }
.ehc-article-cta h3 { font-family: var(--font-heading); color: var(--color-secondary); margin-bottom: 12px; font-size: var(--text-2xl); font-weight: 500; }
.ehc-article-cta p { color: var(--color-text-muted); margin-bottom: 20px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Comments placeholder ── */
.ehc-comments-section {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ehc-section-subtitle {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--color-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}
.ehc-comments-note {
    color: var(--color-text-muted);
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
}
.ehc-comments-note a { color: var(--color-accent); text-decoration: none; }

/* ── Sticky Sidebar ── */
.ehc-article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ehc-sidebar-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.ehc-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── TOC ── */
.ehc-toc { display: flex; flex-direction: column; gap: 4px; }
.ehc-toc a {
    display: block;
    padding: 8px 12px;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border-right: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.5;
}
.ehc-toc a:hover { color: var(--color-secondary); background: rgba(255, 255, 255, 0.04); }
.ehc-toc a.active {
    color: var(--color-accent);
    background: rgba(197, 168, 128, 0.08);
    border-right-color: var(--color-accent);
}
.ehc-toc a.lvl-3 { padding-right: 28px; font-size: var(--text-xs); }
.ehc-toc-empty { color: var(--color-text-muted); font-size: var(--text-sm); padding: 8px 0; opacity: 0.7; }

/* ── TTS compact ── */
.ehc-tts-compact { display: flex; flex-direction: column; gap: 10px; }
.ehc-tts-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ehc-tts-btn-main {
    width: 48px; height: 48px;
    background: var(--gradient-accent);
    color: #0a0a0a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(197, 168, 128, 0.3);
}
.ehc-tts-btn-main:hover { transform: scale(1.05); }
.ehc-tts-btn-main.playing { background: linear-gradient(135deg, #dc3232, #a00); color: #fff; animation: ehc-tts-pulse 2s infinite; }
@keyframes ehc-tts-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 50, 50, 0.4); } 50% { box-shadow: 0 0 0 10px rgba(220, 50, 50, 0); } }
.ehc-tts-btn-sm {
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.ehc-tts-btn-sm:hover { background: rgba(255, 255, 255, 0.12); color: var(--color-secondary); }
.ehc-tts-progress { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; cursor: pointer; overflow: hidden; }
.ehc-tts-progress-fill { height: 100%; background: var(--gradient-accent); width: 0%; transition: width 0.3s; border-radius: 3px; }
.ehc-tts-meta { display: flex; gap: 8px; }
.ehc-tts-select {
    flex: 1; min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
.ehc-tts-select:focus { outline: none; border-color: var(--color-accent); }
.ehc-tts-status { color: var(--color-text-muted); font-size: 12px; text-align: center; }
.ehc-tts-loading { display: none; }
.ehc-tts-loading.active { display: flex; align-items: center; gap: 6px; color: var(--color-accent); }
.ehc-tts-spinner { width: 12px; height: 12px; border: 2px solid rgba(212, 175, 55, 0.3); border-top-color: var(--color-accent); border-radius: 50%; animation: ehc-tts-spin 0.8s linear infinite; }
@keyframes ehc-tts-spin { to { transform: rotate(360deg); } }

/* ── Share buttons ── */
.ehc-share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ehc-share-btn {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}
.ehc-share-btn:hover { transform: translateY(-2px); color: var(--color-secondary); border-color: var(--color-accent); background: rgba(197, 168, 128, 0.08); }
.ehc-share-wa:hover { background: rgba(37, 211, 102, 0.15); border-color: #25d366; color: #25d366; }
.ehc-share-tw:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; color: #fff; }
.ehc-share-li:hover { background: rgba(10, 102, 194, 0.15); border-color: #0a66c2; color: #0a66c2; }
.ehc-share-fb:hover { background: rgba(24, 119, 242, 0.15); border-color: #1877f2; color: #1877f2; }
.ehc-share-copy { font-size: 16px; }
.ehc-share-copy.copied { background: rgba(76, 175, 80, 0.2); border-color: #4caf50; color: #4caf50; }
.ehc-share-save.saved { background: rgba(197, 168, 128, 0.2); border-color: var(--color-accent); color: var(--color-accent); }

/* ── Related posts ── */
.ehc-related-section {
    padding: 60px var(--space-lg) 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(197, 168, 128, 0.04) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ehc-related-inner { max-width: 1200px; margin: 0 auto; }
.ehc-related-header { text-align: center; margin-bottom: 40px; }
.ehc-related-eyebrow { color: var(--color-accent); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.ehc-related-title { font-family: var(--font-heading); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--color-secondary); margin-top: 8px; font-weight: 500; }
.ehc-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Scroll reveal ── */
.ehc-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.ehc-reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Mobile ── */
@media (max-width: 1024px) {
    .ehc-article-layout { grid-template-columns: 1fr; gap: 40px; }
    .ehc-article-sidebar { position: static; }
    .ehc-related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .ehc-article-header { padding: 110px var(--space-md) 32px; }
    .ehc-article-meta { padding: 10px 16px; gap: 8px; font-size: var(--text-xs); }
    .ehc-author-avatar { width: 32px; height: 32px; }
    .ehc-article-layout { padding: 0 var(--space-md) 60px; }
    .ehc-prose { font-size: 1.05rem; line-height: 1.85; }
    .ehc-prose p:first-of-type::first-letter { font-size: 3em; padding-left: 10px; }
    .ehc-author-bio { flex-direction: column; align-items: center; text-align: center; }
    .ehc-related-grid { grid-template-columns: 1fr; }
    .ehc-share-row { grid-template-columns: repeat(6, 1fr); }
    .ehc-share-btn { aspect-ratio: auto; padding: 12px 0; }
}
