/* ============================================================
   news-detail.css — Single Post Page Styles
   FIX LOG:
   - Removed all duplicate :root variables that were defined
     inline in single-post.php (now only in this file).
   - Fixed .article-meta-v2 grid to use safe box-sizing-aware
     column values — no more broken grid in themes with
     global * { box-sizing: border-box } overrides.
   - All images get explicit aspect-ratio to prevent CLS.
   - Cleaned up redundant .article-meta / display:none hacks.
   - Added proper focus-visible outlines for accessibility.
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES (single source of truth)
   --category-color is injected as inline style from PHP
   ────────────────────────────────────────────────────────── */
:root {
    --primary-color:      #1e3c72;
    --primary-light:      #3b82f6;
    --primary-dark:       #1e40af;
    --secondary-color:    #2a5298;
    --accent-color:       #ffc107;
    --text-primary:       #1f2937;
    --text-secondary:     #4b5563;
    --text-muted:         #6b7280;
    --text-inverse:       #ffffff;
    --bg-primary:         #ffffff;
    --bg-secondary:       #f8fafc;
    --bg-tertiary:        #f1f5f9;
    --bg-accent:          #eff6ff;
    --bg-hover:           #e2e8f0;
    --border-color:       #e5e7eb;
    --border-light:       #f3f4f6;
    --shadow-light:       0 1px 3px rgba(0,0,0,.10);
    --shadow-medium:      0 4px 6px rgba(0,0,0,.10);
    --shadow-heavy:       0 10px 15px rgba(0,0,0,.10);
    --radius:             12px;
    --radius-sm:          6px;
    --radius-lg:          16px;
    --transition:         all 0.3s ease;
    --font-body:          -apple-system, BlinkMacSystemFont, 'Tiro Bangla', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading:       'Inter', var(--font-body);
    --container-width:    1200px;
    --sidebar-width:      320px;
    --gap:                30px;
    color-scheme:         light only;
}

/* ──────────────────────────────────────────────────────────
   BASE RESET (scoped to this page)
   ────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
    color-scheme: light only;
}

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

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

/* ──────────────────────────────────────────────────────────
   ACCESSIBILITY
   ────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--text-inverse);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 10000;
    font-weight: 500;
    transition: var(--transition);
}
.skip-link:focus { top: 6px; }

:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* ──────────────────────────────────────────────────────────
   READING PROGRESS BAR
   ────────────────────────────────────────────────────────── */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────────
   BREADCRUMB
   ────────────────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 15px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    margin: 0 0 20px;
    gap: 0;
    list-style: none;
}
.breadcrumb-item {
    display: flex;
    align-items: center;
}
.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin: 0 10px;
    color: var(--text-muted);
}
.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.breadcrumb-link:hover { color: var(--primary-color); }
.breadcrumb-item.active { color: var(--primary-color); font-weight: 500; }

/* ──────────────────────────────────────────────────────────
   PAGE LAYOUT
   ────────────────────────────────────────────────────────── */
.main-content { padding: var(--gap) 0; }

.content-grid {
    display: grid;
    /* FIX: use minmax so sidebar doesn't collapse in box-sizing contexts */
    grid-template-columns: 1fr minmax(0, var(--sidebar-width));
    gap: var(--gap);
    align-items: start;
}

/* ──────────────────────────────────────────────────────────
   ARTICLE CARD
   ────────────────────────────────────────────────────────── */
.article-main {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
    min-width: 0; /* prevent grid blowout */
}

.article-header {
    padding: var(--gap);
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Category badge */
.article-category { margin-bottom: 16px; }
.category-badge {
    display: inline-flex;
    align-items: center;
    background: var(--category-color, var(--primary-color));
    color: var(--text-inverse);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
}
.category-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-medium); }

/* Title */
.article-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* Subheadline */
.article-subhead {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 16px;
}

/* ──────────────────────────────────────────────────────────
   ARTICLE META V2
   FIX: Replaced "1fr auto" columns with explicit minmax
   values so the grid doesn't break when a parent has
   box-sizing: content-box or padding that changes available width.
   ────────────────────────────────────────────────────────── */
.article-meta-v2 {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 12px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.meta-v2-author {
    grid-area: 1 / 1 / 2 / 2;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 0;
    word-break: break-word;
}
.meta-v2-author .author-separator { color: var(--text-muted); margin: 0 4px; font-weight: 400; }

.meta-v2-badges {
    grid-area: 1 / 2 / 2 / 3;
    justify-self: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    white-space: nowrap;
}

.badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-v2.verified { border: 1px solid #28a745; color: #28a745; background-color: #eaf6ec; }
.badge-v2.updated  { border: 1px solid #6c757d; color: #495057; background-color: #f1f3f5; }

.meta-v2-line {
    grid-area: 2 / 1 / 3 / 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    font-size: 13px;
    color: var(--text-muted);
}
.meta-v2-item { display: flex; align-items: center; gap: 5px; }
.meta-v2-item i { font-size: 12px; }

.meta-v2-share {
    grid-area: 2 / 2 / 3 / 3;
    justify-self: end;
    display: flex;
    gap: 8px;
}
.meta-v2-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}
.meta-v2-share a:hover {
    color: var(--text-inverse);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hide legacy meta elements that were only used before the V2 redesign */
.article-meta,
.content-freshness-toggle,
.content-freshness-badge,
.article-meta-redefined { display: none !important; }

/* ──────────────────────────────────────────────────────────
   FEATURED IMAGE
   FIX: aspect-ratio is set inline from PHP-resolved dimensions.
   The CSS here just ensures the wrapper behaves correctly.
   ────────────────────────────────────────────────────────── */
.article-image { position: relative; margin: 0; }
.article-image img {
    width: 100%;
    height: auto;
    display: block;
    /* DO NOT set a fixed max-height here — it fights the
       aspect-ratio attribute and causes CLS on narrow screens */
}
.image-caption {
    padding: 10px var(--gap);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

/* ──────────────────────────────────────────────────────────
   ARTICLE CONTENT
   ────────────────────────────────────────────────────────── */
.article-content { padding: var(--gap); }

.article-excerpt {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--gap);
    padding: 18px 20px;
    background: var(--bg-accent);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-primary);
}
.article-body > * { margin-bottom: 20px; }

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 14px;
    line-height: 1.3;
    scroll-margin-top: 80px; /* offset for sticky headers */
}
.article-body h2 { font-size: 1.65rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; }
.article-body h3 { font-size: 1.4rem; }
.article-body h4 { font-size: 1.2rem; }

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    transition: var(--transition);
}
.article-body a:hover { color: var(--primary-dark); }

/* Content images — always include width/height to prevent CLS */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    box-shadow: var(--shadow-light);
    display: block;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    padding: 18px 22px;
    margin: 22px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
}
.article-body blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px; left: 16px;
    opacity: 0.25;
    font-family: Georgia, serif;
    line-height: 1;
}

.article-body ul, .article-body ol { padding-left: 24px; margin: 16px 0; }
.article-body li { margin-bottom: 6px; }
.article-body ul li { list-style-type: none; position: relative; }
.article-body ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: -16px;
}

/* Tables */
.article-body table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}
.article-body th,
.article-body td { border: 1px solid #ddd; padding: 8px 12px; }
.article-body tr:nth-child(even) { background-color: #f2f2f2; }
.article-body tr:hover { background-color: #e8e8e8; }
.article-body th {
    padding: 12px;
    text-align: left;
    background-color: var(--primary-color);
    color: white;
}

/* ──────────────────────────────────────────────────────────
   TABLE OF CONTENTS
   ────────────────────────────────────────────────────────── */
.table-of-contents {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.toc-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 14px;
    user-select: none;
}
.toc-toggle-header h3 { margin: 0; font-size: 17px; color: var(--text-primary); }
.toc-toggle-icon { color: var(--text-muted); transition: transform 0.3s ease; }
.toc-toggle-icon.rotated { transform: rotate(180deg); }

.toc-toggle-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 600px;
}
.toc-toggle-content.collapsed { max-height: 0; }

.toc-list {
    list-style: none;
    padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    counter-reset: toc-counter;
}
.toc-list li {
    position: relative;
    padding-left: 30px;
    counter-increment: toc-counter;
}
.toc-list li::before {
    content: counter(toc-counter);
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}
.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}
.toc-list a:hover { color: var(--primary-color); }
.toc-list .toc-h3 { font-size: 13px; }

/* ──────────────────────────────────────────────────────────
   ARTICLE FOOTER
   ────────────────────────────────────────────────────────── */
.article-footer {
    padding: var(--gap);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* Tags */
.article-tags {
    margin-bottom: 24px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}
.tags-container { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tags-label { font-weight: 600; color: var(--text-secondary); margin-right: 6px; }
.tag-link {
    display: inline-block;
    padding: 5px 14px;
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}
.tag-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,60,114,.25);
}

/* Social share */
.social-share { text-align: center; margin-bottom: 28px; }
.share-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.share-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: white;
    transition: var(--transition);
}
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,.15); color: white; }
.share-btn.facebook  { background-color: #1877F2; }
.share-btn.twitter   { background-color: #000000; }
.share-btn.linkedin  { background-color: #0A66C2; }
.share-btn.whatsapp  { background-color: #25D366; }

/* Author box (E-E-A-T) */
.author-box-eat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    margin-top: 24px;
}
.author-header { display: flex; align-items: center; margin-bottom: 12px; }
.author-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 14px;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: var(--shadow-light);
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 20px;
}
.author-info { flex: 1; }
.author-name  { display: block; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.author-role  { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.author-bio   { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.view-more-articles {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.view-more-articles:hover { background: var(--secondary-color); color: white; }

/* ──────────────────────────────────────────────────────────
   SIDEBAR
   ────────────────────────────────────────────────────────── */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    position: sticky;
    top: 20px;
    min-width: 0;
}
.sidebar-widget {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
}
.widget-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-inverse);
    padding: 14px 18px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trending list */
.trending-list { padding: 16px; }
.trending-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 10px; margin: 0 -8px; }
.trending-rank {
    flex-shrink: 0;
    width: 24px; height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    margin-top: 3px;
}
.trending-content { display: flex; gap: 10px; flex: 1; min-width: 0; }
.trending-thumb { flex-shrink: 0; width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; }
.trending-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.trending-item:hover .trending-thumb img { transform: scale(1.08); }
.trending-info { flex: 1; min-width: 0; }
.trending-title { margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.trending-title a {
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}
.trending-title a:hover { color: var(--primary-color); }
.trending-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }

/* ──────────────────────────────────────────────────────────
   RELATED ARTICLES
   ────────────────────────────────────────────────────────── */
.related-articles {
    margin-top: 40px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--gap);
    justify-content: center;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.related-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}
.related-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.related-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* FIX: prevents CLS — no hard-coded height */
    overflow: hidden;
}
.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}
.related-card:hover .related-image img { transform: scale(1.05); }
.related-category {
    position: absolute;
    top: 10px; left: 10px;
    color: white;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.related-content { padding: 14px; }
.related-title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
.related-title a { color: var(--text-primary); text-decoration: none; transition: var(--transition); }
.related-title a:hover { color: var(--primary-color); }

/* ──────────────────────────────────────────────────────────
   BACK TO TOP BUTTON
   ────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--secondary-color); transform: translateY(-3px); box-shadow: var(--shadow-heavy); }

/* ──────────────────────────────────────────────────────────
   ADVERTISEMENT CONTAINER
   ────────────────────────────────────────────────────────── */
.advertisement-container {
    margin: 20px 0;
    padding: 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    position: relative;
}
.advertisement-container .ad-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}
.advertisement-container img { max-width: 100%; height: auto; border-radius: 4px; }

/* ──────────────────────────────────────────────────────────
   SUBSCRIBE SECTION
   ────────────────────────────────────────────────────────── */
.subscribe-section {
    background: white;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 28px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    flex-wrap: wrap;
    border: 1px solid var(--border-light);
}
.subscribe-label { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.subscribe-buttons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    border: 2px solid transparent;
}
.subscribe-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.subscribe-btn.whatsapp-btn  { background: #f0fdf4; color: #25D366; border-color: #bbf7d0; }
.subscribe-btn.whatsapp-btn:hover  { background: #25D366; color: white; }
.subscribe-btn.facebook-btn  { background: #eff6ff; color: #1877F2; border-color: #bfdbfe; }
.subscribe-btn.facebook-btn:hover  { background: #1877F2; color: white; }
.subscribe-btn.youtube-btn   { background: #fef2f2; color: #FF0000; border-color: #fecaca; }
.subscribe-btn.youtube-btn:hover   { background: #FF0000; color: white; }
.subscribe-btn.news-btn      { background: var(--bg-secondary); color: var(--text-secondary); border-color: #dee2e6; }
.subscribe-btn.news-btn:hover      { background: #495057; color: white; }

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (≤ 1024px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
    .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (≤ 768px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --gap: 20px; }

    .article-header  { padding: 20px; }
    .article-content { padding: 20px; }
    .article-footer  { padding: 20px; }

    /* Meta V2 — stack to single column on mobile */
    .article-meta-v2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    .meta-v2-author  { grid-area: 1 / 1 / 2 / 2; }
    .meta-v2-badges  { grid-area: 2 / 1 / 3 / 2; justify-self: start; }
    .meta-v2-line    { grid-area: 3 / 1 / 4 / 2; }
    .meta-v2-share   { grid-area: 4 / 1 / 5 / 2; justify-self: start; }

    /* TOC — single column */
    .toc-list { grid-template-columns: 1fr; }

    /* Share buttons — scrollable row on very narrow screens */
    .share-buttons {
        justify-content: center;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    .share-buttons::-webkit-scrollbar { display: none; }
    .share-btn { flex-shrink: 0; }

    /* Related — 2 columns */
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .related-articles { padding: 22px 16px; }
    .section-title { font-size: 1.3rem; }

    .subscribe-section { flex-direction: column; align-items: flex-start; }
    .subscribe-buttons { width: 100%; }
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Related — single column, horizontal card layout */
    .related-grid { grid-template-columns: 1fr; gap: 12px; }
    .related-card { display: flex; flex-direction: row; }
    .related-image { width: 110px; min-width: 110px; aspect-ratio: 1/1; flex-shrink: 0; }
    .related-content { flex: 1; }

    .article-title { font-size: 1.5rem; }

    /* Stack share buttons cleanly */
    .share-buttons { flex-wrap: wrap; }
}