/* =========================================================
   THE PROFIT ERA — NEWS / INSIGHTS PORTAL
   Design system: Primary #2563eb, Dark #0f172a
   Fully responsive: mobile-first with progressive enhancement
========================================================= */

/* ---------- THEME TOKENS ---------- */
:root {
    --tpe-primary: #2563eb;
    --tpe-primary-dark: #1d4ed8;
    --tpe-primary-rgb: 37, 99, 235;
    --tpe-primary-hover: #1d4ed8;
    --tpe-success: #16a34a;
    --tpe-warning: #d97706;
    --tpe-danger: #dc2626;
    --tpe-accent-purple: #7c3aed;
    --tpe-accent-pink: #db2777;

    --tpe-bg: #f4f7fb;
    --tpe-surface: #ffffff;
    --tpe-surface-muted: #f8fafc;
    --tpe-surface-border: #e2e8f0;
    --tpe-text: #0f172a;
    --tpe-muted: #64748b;
    --tpe-soft: #475569;
    --tpe-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --tpe-shadow-hover: 0 12px 32px rgba(37, 99, 235, 0.12);
    --tpe-radius: 14px;
    --tpe-radius-sm: 10px;
    --tpe-radius-xs: 7px;

    --tpe-topbar-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a5f 100%);
    --tpe-topbar-border: rgba(96, 165, 250, 0.2);
    --tpe-brand-gradient: linear-gradient(90deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);

    --tpe-ad-bg: #f1f5f9;
    --tpe-ad-border: #cbd5e1;
    --tpe-ad-text: #94a3b8;

    --tpe-container-max: 1200px;
}

[data-bs-theme="dark"] {
    --tpe-primary: #3b82f6;
    --tpe-primary-dark: #2563eb;
    --tpe-primary-rgb: 59, 130, 246;
    --tpe-primary-hover: #60a5fa;
    --tpe-success: #4ade80;
    --tpe-warning: #fbbf24;
    --tpe-danger: #f87171;

    --tpe-bg: #0b1220;
    --tpe-surface: #111c2f;
    --tpe-surface-muted: #17243a;
    --tpe-surface-border: #263754;
    --tpe-text: #e5edf8;
    --tpe-muted: #94a8c4;
    --tpe-soft: #cbd5e1;
    --tpe-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --tpe-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.4);

    --tpe-topbar-bg: linear-gradient(135deg, #020617 0%, #0a0f1e 60%, #141b2d 100%);
    --tpe-topbar-border: rgba(96, 165, 250, 0.15);

    --tpe-ad-bg: #0f172a;
    --tpe-ad-border: #1e293b;
    --tpe-ad-text: #475569;
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }

body {
    background: var(--tpe-bg);
    color: var(--tpe-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.1px;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--tpe-primary); }

img { max-width: 100%; height: auto; }

/* ---------- MAIN CONTAINER ---------- */
main.container {
    max-width: var(--tpe-container-max);
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    main.container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* =========================================================
   NAVBAR / HEADER
========================================================= */
.tpe-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--tpe-topbar-bg);
    border-bottom: 1px solid var(--tpe-topbar-border);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
    min-height: 60px;
    padding: 8px 0;
}

.tpe-navbar .container {
    max-width: var(--tpe-container-max);
}

.tpe-navbar .navbar-brand { padding: 0; gap: 8px; }

.tpe-navbar-logo {
    height: 34px;
    width: 34px;
    object-fit: cover;
    border-radius: 8px;
}

.tpe-navbar-brand-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    background: var(--tpe-brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.tpe-nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 7px 12px !important;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.tpe-nav-link:hover,
.tpe-nav-link:focus {
    color: #ffffff !important;
    background: rgba(96, 165, 250, 0.12);
}

.tpe-nav-link i { font-size: 0.85rem; }

/* THEME TOGGLE */
.tpe-theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
}

.tpe-theme-toggle:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
    color: #ffffff;
    transform: rotate(15deg);
}

.tpe-theme-icon-light { display: none; }
.tpe-theme-icon-dark { display: inline-block; }

/* CTA BUTTON */
.tpe-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--tpe-primary), var(--tpe-primary-dark));
    color: #fff !important;
    border: none;
    border-radius: 9px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.tpe-cta-btn:hover {
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* MOBILE NAV COLLAPSE */
.tpe-navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
}

.tpe-navbar-toggler-icon {
    filter: invert(1);
    width: 1.2em;
    height: 1.2em;
}

/* MOBILE NAV MENU */
@media (max-width: 991px) {
    .tpe-navbar .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        border-radius: 12px;
        padding: 16px;
        margin-top: 8px;
    }

    .tpe-nav-link {
        padding: 12px 14px !important;
        font-size: 0.9rem;
        border-radius: 10px;
        width: 100%;
        justify-content: flex-start;
    }

    .tpe-nav-link:hover {
        background: rgba(96, 165, 250, 0.1);
    }

    .navbar-nav .dropdown-menu {
        background: rgba(15, 23, 42, 0.8);
        border: 1px solid rgba(96, 165, 250, 0.15);
        padding: 6px;
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    .dropdown-item:hover {
        background: rgba(96, 165, 250, 0.12);
        color: #fff !important;
    }
}

/* DROPDOWN (desktop) */
.tpe-dropdown {
    background: var(--tpe-surface);
    border: 1px solid var(--tpe-surface-border);
    border-radius: 10px;
    box-shadow: var(--tpe-shadow-hover);
    padding: 6px;
    min-width: 200px;
}

.tpe-dropdown-item {
    border-radius: 7px;
    color: var(--tpe-text) !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.tpe-dropdown-item:hover {
    background: rgba(var(--tpe-primary-rgb), 0.08);
    color: var(--tpe-primary) !important;
}

/* =========================================================
   TOPIC CHIPS
========================================================= */
.tpe-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tpe-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--tpe-surface);
    border: 1px solid var(--tpe-surface-border);
    color: var(--tpe-soft);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.18s ease;
}

.tpe-chip:hover {
    color: var(--tpe-primary);
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.tpe-chip i { font-size: 0.68rem; color: var(--tpe-primary); }

/* =========================================================
   HERO + TRENDING ROW
========================================================= */
.tpe-hero-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    margin-bottom: 28px;
}

.tpe-hero-carousel {
    border-radius: var(--tpe-radius);
    overflow: hidden;
    box-shadow: var(--tpe-shadow);
    border: 1px solid var(--tpe-surface-border);
}

.hero-wrapper {
    height: 380px;
    position: relative;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-fallback {
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 55%, rgba(0,0,0,0) 100%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    bottom: 24px;
    left: 24px;
    right: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--tpe-danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-summary {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--tpe-text);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.hero-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.carousel-item { transition: opacity 0.8s ease-in-out; }

.carousel-indicators {
    margin-bottom: 12px;
    gap: 5px;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 0;
    transition: all 0.2s ease;
}

.carousel-indicators .active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* TRENDING PANEL */
.tpe-trending-panel {
    background: var(--tpe-surface);
    border: 1px solid var(--tpe-surface-border);
    border-radius: var(--tpe-radius);
    box-shadow: var(--tpe-shadow);
    height: 100%;
    overflow: hidden;
}

.tpe-trending-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--tpe-surface-border);
}

.tpe-trending-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--tpe-text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.tpe-trending-header h3 i { color: var(--tpe-danger); }

.tpe-trending-list {
    padding: 8px 12px;
}

.tpe-trending-item {
    display: flex;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
    align-items: flex-start;
}

.tpe-trending-item:hover { background: var(--tpe-surface-muted); }

.tpe-trending-item:not(:last-child) {
    border-bottom: 1px solid var(--tpe-surface-border);
}

.tpe-trending-rank {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(var(--tpe-primary-rgb), 0.1);
    color: var(--tpe-primary);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpe-trending-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tpe-trending-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tpe-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tpe-trending-item:hover .tpe-trending-title { color: var(--tpe-primary); }

.tpe-trending-date {
    font-size: 0.7rem;
    color: var(--tpe-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* HERO RESPONSIVE */
@media (max-width: 991px) {
    .tpe-hero-row {
        grid-template-columns: 1fr;
    }
    .hero-wrapper { height: 320px; }
}

@media (max-width: 576px) {
    .hero-wrapper { height: 260px; }
    .hero-content { bottom: 16px; left: 16px; right: 16px; }
    .hero-title { font-size: 1.15rem; }
    .hero-summary { font-size: 0.82rem; -webkit-line-clamp: 2; }
    .hero-badge { font-size: 0.62rem; padding: 3px 8px; }
    .hero-btn { font-size: 0.75rem; padding: 6px 14px; }
    .tpe-trending-panel { max-height: none; }
}

/* =========================================================
   SECTION HEADERS
========================================================= */
.tpe-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tpe-surface-border);
}

.tpe-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--tpe-text);
    font-size: 1.1rem;
    font-weight: 800;
}

.tpe-section-heading h2 i { color: var(--tpe-primary); font-size: 1rem; }

.tpe-view-all {
    color: var(--tpe-muted);
    font-size: 0.76rem;
    font-weight: 700;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.tpe-view-all:hover { color: var(--tpe-primary); }

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tpe-text);
    margin: 0;
}

/* =========================================================
   ARTICLE CARDS GRID
========================================================= */
.tpe-home-section { margin-bottom: 36px; }

.tpe-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.tpe-card-grid-ad {
    grid-column: 1 / -1;
}

.article-link { display: block; }

.article-card-clean {
    background: var(--tpe-surface);
    border: 1px solid var(--tpe-surface-border);
    border-radius: var(--tpe-radius);
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.article-card-clean:hover {
    transform: translateY(-3px);
    box-shadow: var(--tpe-shadow-hover);
    border-color: #93c5fd;
}

.image-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card-clean:hover .image-wrapper img { transform: scale(1.06); }

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card-clean:hover .image-overlay { opacity: 1; }

.thumbnail-fallback {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: rgba(255,255,255,0.4);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-wrapper {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.publish-date {
    font-size: 0.68rem;
    color: var(--tpe-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.publish-date i { font-size: 0.75rem; }

.article-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 4px 0 6px;
    line-height: 1.35;
    color: var(--tpe-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-clean:hover .article-title { color: var(--tpe-primary); }

.article-summary {
    font-size: 0.82rem;
    color: var(--tpe-muted);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.tpe-read-more {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--tpe-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.article-card-clean:hover .tpe-read-more { gap: 7px; }

/* NEW BADGE */
.tpe-new-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(90deg, var(--tpe-success), #22c55e);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* CARD GRID RESPONSIVE */
@media (max-width: 576px) {
    .tpe-card-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .article-title { font-size: 0.9rem; }
    .content-wrapper { padding: 12px 14px 14px; }
}

/* =========================================================
   ADS
========================================================= */
.tpe-ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tpe-ad-bg);
    border: 1px dashed var(--tpe-ad-border);
    border-radius: var(--tpe-radius-sm);
    color: var(--tpe-ad-text);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    margin: 0 auto;
}

.tpe-ad-slot .tpe-ad-label { font-size: 0.62rem; opacity: 0.7; margin-bottom: 2px; }
.tpe-ad-slot .tpe-ad-size { font-size: 0.78rem; font-weight: 800; }
.tpe-ad-slot .tpe-ad-placement { display: block; margin-top: 4px; font-size: 0.62rem; color: var(--tpe-primary); opacity: 0.7; }

.tpe-ad-leaderboard { width: 100%; max-width: 728px; min-height: 90px; margin: 14px auto; }
.tpe-ad-rectangle { width: 300px; min-height: 250px; max-width: 100%; }
.tpe-ad-infeed { width: 100%; min-height: 120px; }
.tpe-ad-inarticle { width: 100%; max-width: 728px; min-height: 120px; margin: 28px auto; }
.tpe-ad-skyscraper { width: 160px; min-height: 600px; max-width: 100%; }

/* ARTICLE LAYOUT RAILS */
.tpe-article-layout {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 24px;
    align-items: start;
    max-width: 1280px;
    margin: 20px auto 0;
    padding: 0 16px;
}

.tpe-article-rail {
    position: sticky;
    top: 80px;
    display: flex;
    justify-content: center;
}

.tpe-article-main { min-width: 0; }

@media (max-width: 1200px) {
    .tpe-article-layout { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
    .tpe-article-rail { display: none; }
}

/* =========================================================
   FOOTER
========================================================= */
.tpe-footer {
    background: var(--tpe-surface);
    border-top: 1px solid var(--tpe-surface-border);
    color: var(--tpe-soft);
    margin-top: 40px;
}

.tpe-footer-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tpe-text);
    margin-bottom: 12px;
}

.tpe-footer-logo { height: 28px; width: auto; border-radius: 6px; }

.tpe-footer-desc {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--tpe-muted);
    margin-bottom: 8px;
}

.tpe-footer-tagline {
    color: var(--tpe-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.tpe-footer-col-title {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tpe-text);
    margin-bottom: 12px;
}

.tpe-footer-links { list-style: none; padding: 0; margin: 0; }
.tpe-footer-links li { margin-bottom: 7px; }

.tpe-footer-links a {
    color: var(--tpe-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.tpe-footer-links a:hover { color: var(--tpe-primary); }

.tpe-footer-disclaimer {
    border-top: 1px solid var(--tpe-surface-border);
    font-size: 0.75rem;
    color: var(--tpe-muted);
    line-height: 1.6;
}

.tpe-footer-bottom {
    border-top: 1px solid var(--tpe-surface-border);
    font-size: 0.78rem;
    color: var(--tpe-muted);
}

.tpe-footer-ecosystem a {
    color: var(--tpe-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.tpe-footer-ecosystem a:hover { color: var(--tpe-primary); }

/* FOOTER RESPONSIVE */
@media (max-width: 576px) {
    .tpe-footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .tpe-footer-disclaimer { font-size: 0.72rem; }
}

/* =========================================================
   SOCIAL SHARE
========================================================= */
.tpe-share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--tpe-surface-border);
    flex-wrap: wrap;
}

.tpe-share-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpe-muted);
    margin-right: 4px;
}

.tpe-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--tpe-surface-border);
    background: var(--tpe-surface);
    color: var(--tpe-soft);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tpe-share-btn:hover {
    color: var(--tpe-primary);
    border-color: var(--tpe-primary);
    transform: translateY(-1px);
}

/* =========================================================
   PORTAL CTA
========================================================= */
.tpe-portal-cta {
    border-radius: var(--tpe-radius);
    overflow: hidden;
}

.tpe-portal-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.06));
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: var(--tpe-radius);
}

.tpe-portal-cta-inner h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tpe-text);
}

.tpe-portal-cta-inner p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--tpe-muted);
}

@media (max-width: 576px) {
    .tpe-portal-cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }
}

/* =========================================================
   ARTICLE DISCLAIMER
========================================================= */
.tpe-article-disclaimer {
    padding: 14px 16px;
    background: var(--tpe-surface-muted);
    border: 1px solid var(--tpe-surface-border);
    border-radius: var(--tpe-radius-sm);
    font-size: 0.77rem;
    color: var(--tpe-muted);
    line-height: 1.6;
}

/* =========================================================
   RELATED ARTICLES
========================================================= */
.tpe-related-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--tpe-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tpe-related-title i { color: var(--tpe-primary); }

.tpe-related-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--tpe-surface-border);
    border-radius: var(--tpe-radius-sm);
    background: var(--tpe-surface);
    transition: all 0.2s ease;
    height: 100%;
}

.tpe-related-card:hover {
    border-color: #93c5fd;
    box-shadow: var(--tpe-shadow);
    transform: translateY(-2px);
}

.tpe-related-card img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.tpe-related-body { flex: 1; min-width: 0; }

.tpe-related-body h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 4px 0 0;
    color: var(--tpe-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 576px) {
    .tpe-related-card img { width: 64px; height: 64px; }
    .tpe-related-body h3 { font-size: 0.82rem; }
}

/* =========================================================
   PAGINATION
========================================================= */
.tpe-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.tpe-page-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px solid var(--tpe-surface-border);
    border-radius: 8px;
    background: var(--tpe-surface);
    color: var(--tpe-text);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tpe-page-link:hover {
    border-color: var(--tpe-primary);
    color: var(--tpe-primary);
}

.tpe-page-link.active {
    background: var(--tpe-primary);
    border-color: var(--tpe-primary);
    color: #fff;
}

/* =========================================================
   BOOTSTRAP DARK OVERRIDES
========================================================= */
[data-bs-theme="dark"] .text-dark { color: var(--tpe-text) !important; }
[data-bs-theme="dark"] .bg-light { background-color: var(--tpe-surface-muted) !important; }
[data-bs-theme="dark"] .text-muted { color: var(--tpe-muted) !important; }
[data-bs-theme="dark"] .bg-white { background-color: var(--tpe-surface) !important; color: var(--tpe-text); }
[data-bs-theme="dark"] .dropdown-menu { background: var(--tpe-surface); border-color: var(--tpe-surface-border); }
[data-bs-theme="dark"] .form-control { background-color: var(--tpe-surface-muted); border-color: var(--tpe-surface-border); color: var(--tpe-text); }
