/* ============================================================
   news-enhancements.css
   Miglioramenti grafici per pagine News:
   - Card articolo espandibili con animazione
   - Hero articolo con gradient + breadcrumbs migliori
   - Sidebar TOC + reading progress bar
   - Typography articolo (h1-h6, blockquote, code, ul/ol)
   - Author box + share buttons più visibili
   - Related posts grid con hover effects
   ============================================================ */

/* ==================== CARD ESPANDIBILE ==================== */

.news-card--expandable {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(0,0,0,0.04);
}
.news-card--expandable:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.news-card--expandable:hover .news-image img {
    transform: scale(1.05);
}
.news-image-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45));
    pointer-events: none;
}
.news-category-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
}

.news-card-expand-btn,
.news-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.news-card-expand-btn {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    justify-content: center;
}
.news-card-expand-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.news-card-expand-btn[aria-expanded="true"] {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}
.news-card-readmore {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.news-card-readmore:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

.news-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(180deg, #f8fafc, white);
}

/* Pannello espansione inline */
.news-card-expand {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(0,0,0,0.05);
    animation: slideDown 0.35s cubic-bezier(.16,1,.3,1);
}
@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to   { opacity: 1; max-height: 800px; }
}
.news-card-expand-inner {
    padding: 20px;
}
.news-card-expand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.news-card-expand-header strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6366f1;
    font-size: 0.9rem;
}
.news-card-collapse-btn {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
}
.news-card-collapse-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: rotate(90deg);
}
.news-card-expand-content {
    color: var(--text-secondary, #4b5563);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.news-card-expand-content p {
    margin: 0;
}
.news-card-expand-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .news-card-actions { flex-direction: column; }
    .news-card-expand-btn, .news-card-readmore { width: 100%; justify-content: center; }
    .news-card-expand-actions { flex-direction: column; }
    .news-card-expand-actions .btn { width: 100%; justify-content: center; }
}


/* ==================== ARTICLE HERO ==================== */

.article-page {
    padding-bottom: 80px;
}
.article-hero {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, #f8fafc 0%, white 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 20px;
}
.article-breadcrumb a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}
.article-breadcrumb a:hover {
    text-decoration: underline;
}
.article-breadcrumb i {
    color: #cbd5e1;
}
.article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.article-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    padding: 4px 10px;
    background: rgba(0,0,0,0.04);
    border-radius: 20px;
}
.article-hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
    margin: 12px 0;
    max-width: 880px;
}
.article-lead {
    font-size: 1.15rem;
    color: var(--text-secondary, #4b5563);
    line-height: 1.6;
    max-width: 780px;
    margin: 0;
}

/* ==================== COVER IMAGE FULL-WIDTH ==================== */

.article-cover {
    padding: 40px 0;
}
.article-cover img {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ==================== ARTICLE BODY (typography migliore) ==================== */

.article-body {
    padding: 40px 0 60px;
}
.article-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #1f2937;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 2em 0 0.6em;
    line-height: 1.25;
}
.article-content h1 { font-size: 2rem; }
.article-content h2 {
    font-size: 1.6rem;
    padding-bottom: 0.3em;
    border-bottom: 2px solid #e2e8f0;
}
.article-content h3 { font-size: 1.3rem; }
.article-content h4 { font-size: 1.1rem; }
.article-content p {
    margin: 0 0 1.2em;
}
.article-content a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-content a:hover {
    color: #4f46e5;
}
.article-content strong {
    color: #0f172a;
    font-weight: 700;
}
.article-content blockquote {
    border-left: 4px solid #6366f1;
    background: #f5f3ff;
    padding: 16px 20px;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
    color: #4338ca;
    font-style: italic;
}
.article-content blockquote p:last-child {
    margin-bottom: 0;
}
.article-content ul, .article-content ol {
    padding-left: 1.5em;
    margin: 0 0 1.2em;
}
.article-content li {
    margin-bottom: 0.4em;
    padding-left: 0.4em;
}
.article-content ul li::marker { color: #6366f1; }
.article-content code {
    background: #f1f5f9;
    color: #be185d;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.92em;
}
.article-content pre {
    background: #0f172a;
    color: #f1f5f9;
    padding: 18px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
}
.article-content table th,
.article-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.article-content table th {
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
}


/* ==================== TAGS ==================== */

.article-tags {
    max-width: 760px;
    margin: 40px auto 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.article-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary, #64748b);
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 4px;
}
.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: white;
    color: #6366f1;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #c7d2fe;
    transition: all 0.2s;
}
.article-tag:hover {
    background: #6366f1;
    color: white;
}


/* ==================== SHARE BUTTONS ==================== */

.article-share {
    max-width: 760px;
    margin: 32px auto 0;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.article-share-label {
    font-weight: 600;
    color: #1f2937;
    margin-right: 8px;
}
.article-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    -webkit-tap-highlight-color: transparent;
}
.article-share-btn:hover {
    background: #1f2937;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}


/* ==================== AUTHOR BOX ==================== */

.article-author-box {
    max-width: 760px;
    margin: 32px auto 0;
    padding: 24px;
    background: linear-gradient(135deg, #eff6ff, #ede9fe);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #c7d2fe;
}
.article-author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}
.article-author-info h4 {
    margin: 0 0 4px;
    color: #1f2937;
    font-size: 1.05rem;
    font-weight: 700;
}
.article-author-info p {
    margin: 0;
    color: var(--text-secondary, #4b5563);
    font-size: 0.9rem;
}


/* ==================== CTA BOX ==================== */

.article-cta-box {
    max-width: 760px;
    margin: 48px auto 0;
    padding: 36px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    border-radius: 20px;
    text-align: center;
}
.article-cta-box h3 {
    color: white;
    font-size: 1.4rem;
    margin: 0 0 12px;
}
.article-cta-box p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}


/* ==================== READING PROGRESS BAR ==================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    z-index: 99999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 6px rgba(99,102,241,0.4);
}


/* ==================== NEWS BADGE MODERNO (hero) ==================== */

.hero-badge--news-modern {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35), 0 2px 6px rgba(236, 72, 153, 0.25);
    position: relative;
    overflow: hidden;
}
.hero-badge--news-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.hero-badge--news-modern:hover::before {
    transform: translateX(100%);
}
.hero-badge--news-modern .hero-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}
.hero-badge--news-modern .hero-badge-icon i {
    color: white;
}
.hero-badge--news-modern .hero-badge-sparkle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,0.95);
    color: #6366f1;
    border-radius: 50%;
    margin-left: 2px;
    animation: pulse-sparkle 2s ease-in-out infinite;
}
@keyframes pulse-sparkle {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
    50%      { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-badge--news-modern .hero-badge-sparkle {
        animation: none;
    }
    .hero-badge--news-modern::before {
        transition: none;
    }
}


/* ==================== ARCHIVIO DIVIDER (separatore visuale) ==================== */

.news-archive-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 60px 0 40px;
    text-align: center;
}
.news-archive-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1 50%, transparent);
}
.news-archive-divider-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    white-space: nowrap;
}
.news-archive-divider-label i {
    color: #8b5cf6;
}

/* Archive cards: leggermente più piccole/compatte */
.news-card--archive .news-image {
    aspect-ratio: 16 / 10;
}
.news-card--archive .news-body {
    padding: 16px;
}
.news-card--archive .news-body h3 {
    font-size: 1.05rem;
    line-height: 1.35;
}
.news-card--archive .news-body p {
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ==================== PAGINAZIONE NUMERATA MODERNA ==================== */

.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px auto 0;
    padding: 20px 0;
}
.news-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: white;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.news-pagination-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.news-pagination-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.news-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}
.news-pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    background: white;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.news-pagination-num:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}
.news-pagination-num.is-active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    font-weight: 700;
}
.news-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 42px;
    color: #94a3b8;
    font-weight: 700;
    user-select: none;
}
.news-pagination-info {
    margin-left: 12px;
    font-size: 0.88rem;
    color: #64748b;
}
.news-pagination-info strong {
    color: #1e293b;
}

@media (max-width: 640px) {
    .news-pagination { gap: 4px; }
    .news-pagination-numbers { gap: 2px; padding: 0 4px; }
    .news-pagination-num { min-width: 36px; height: 38px; font-size: 0.85rem; }
    .news-pagination-btn { width: 38px; height: 38px; }
    .news-pagination-info { display: none; }
}


/* ==================== NEWSLETTER INLINE (banner in cima alla pagina news) ==================== */

.news-newsletter-inline {
    padding: 0 0 60px;
    background: white;
    scroll-margin-top: 100px; /* offset per ancoraggio navbar */
}

.news-newsletter-inline-box {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: center;
    background: linear-gradient(135deg, #eff6ff 0%, #ede9fe 50%, #fce7f3 100%);
    border: 1px solid #c7d2fe;
    border-radius: 24px;
    padding: 32px 40px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.news-newsletter-inline-box::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse-blob 8s ease-in-out infinite;
}

@keyframes pulse-blob {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50%      { transform: scale(1.15); opacity: 0.8; }
}

.news-newsletter-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 18px;
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.news-newsletter-inline-content {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.news-newsletter-inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 8px;
    border: 1px solid #c7d2fe;
}

.news-newsletter-inline-content h2 {
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-weight: 800;
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.2;
}

.news-newsletter-inline-content p {
    font-size: 0.92rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    max-width: 520px;
}

.news-newsletter-inline-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 280px;
    position: relative;
    z-index: 1;
}

.news-newsletter-inline-form input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    color: #1e293b;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.news-newsletter-inline-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.news-newsletter-inline-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: all 0.2s;
    font-family: inherit;
}

.news-newsletter-inline-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.news-newsletter-inline-trust {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.news-newsletter-inline-trust i {
    color: #10b981;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .news-newsletter-inline-box {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 28px 24px;
    }
    .news-newsletter-inline-icon { margin: 0 auto; }
    .news-newsletter-inline-form { min-width: 0; max-width: 360px; margin: 0 auto; }
}

@media (max-width: 480px) {
    .news-newsletter-inline { padding: 0 0 40px; }
    .news-newsletter-inline-box { padding: 20px; }
    .news-newsletter-inline-icon { width: 56px; height: 56px; }
    .news-newsletter-inline-icon i { width: 24px; height: 24px; }
    .news-newsletter-inline-content h2 { font-size: 1.1rem; }
    .news-newsletter-inline-content p { font-size: 0.85rem; }
}


/* ==================== NEWSLETTER INLINE nella pagina news ==================== */

.news-newsletter-section {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, white 0%, #f8fafc 100%);
}

@media (max-width: 768px) {
    .news-newsletter-section { padding: 40px 0 30px; }
}


/* ==================== RELATED POSTS ==================== */

.article-related {
    padding: 60px 0;
    background: #f8fafc;
}
.article-related .news-card {
    transition: transform 0.25s, box-shadow 0.25s;
}
.article-related .news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}


/* ==================== ARTICLE 2-COL LAYOUT (sidebar TOC) ==================== */

@media (min-width: 1024px) {
    .article-body .container {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 60px;
        max-width: 1100px;
    }
    .article-content { max-width: 100%; }
    .article-tags,
    .article-share,
    .article-author-box,
    .article-cta-box {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.article-toc-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #e2e8f0;
}
.article-toc-list li {
    padding: 4px 0 4px 12px;
}
.article-toc-list a {
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: color 0.2s;
}
.article-toc-list a:hover,
.article-toc-list a.active {
    color: #6366f1;
    font-weight: 600;
}

@media (max-width: 1023px) {
    .article-sidebar { display: none; }
}

/* ==================== RESPONSIVE MOBILE ==================== */

@media (max-width: 768px) {
    .article-hero { padding: 110px 0 40px; }
    .article-content { font-size: 1rem; line-height: 1.7; }
    .article-content h1 { font-size: 1.7rem; }
    .article-content h2 { font-size: 1.35rem; }
    .article-cover { padding: 20px 0; }
    .article-author-box { flex-direction: column; text-align: center; }
    .article-tags, .article-share, .article-author-box, .article-cta-box { padding: 16px; }
}

@media (max-width: 480px) {
    .article-hero { padding: 100px 0 30px; }
    .article-content h1 { font-size: 1.5rem; }
    .article-content h2 { font-size: 1.2rem; }
    .article-content blockquote { padding: 12px 14px; }
}

/* Print: no header decoration, no sidebar TOC */
@media print {
    .article-hero { background: white; padding: 20px 0; border: none; }
    .article-cover { display: none; }
    .article-sidebar, .article-share, .article-cta-box { display: none; }
    .article-content { font-size: 11pt; max-width: 100%; }
}