/* assets/css/style.css - NEWS PORTAL PROFESSIONAL DESIGN */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;600;700&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --primary: #2563eb;
  --secondary: #0f172a;
  --accent: #ef4444; /* News Red */
  --bg-main: #ffffff;
  --bg-soft: #f1f5f9;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { margin:0; padding:0; box-sizing:border-box; }
body, html { width: 100%; margin: 0; padding: 0; overflow-x: hidden; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-soft); color: var(--text-dark); line-height: 1.6; }
a { text-decoration:none; color:inherit; transition: 0.3s; }
img { max-width:100%; height:auto; display:block; border-radius: 8px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* --- Top Bar & Header --- */
.top-bar { background: var(--secondary); color: #94a3b8; padding: 8px 0; font-size: 0.75rem; font-weight: 600; width: 100%; overflow: hidden; }
.top-bar .container { display:flex; justify-content:space-between; align-items:center; flex-wrap: wrap; gap: 5px; }
@media (max-width: 768px) {
    .top-bar .container { justify-content: center; text-align: center; font-size: 0.7rem; flex-direction: column; gap: 5px; }
    .top-bar .container div:last-child { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
    .top-bar .container div:last-child a { margin-left: 0 !important; }
}

header { background: #fff; padding: 25px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
header .container { display:flex; justify-content:space-between; align-items:center; flex-wrap: wrap; gap: 15px; }

.logo { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 800; color: var(--secondary); letter-spacing: -1.5px; }
.logo span { color: var(--primary); }
@media (max-width: 768px) {
    header { padding: 15px 0; }
    .logo { font-size: 1.8rem; margin-bottom: 10px; width: 100%; text-align: center; }
    header .container { flex-direction: column; justify-content: center; align-items: center; }
    .header-search { width: 100%; }
    .header-search form { width: 100%; }
    .header-search input { width: 100%; box-sizing: border-box; }
}

.main-nav { display:flex; gap: 30px; list-style:none; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { font-weight: 700; font-size: 0.85rem; color: var(--text-dark); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 0; display: block; }
.main-nav a:hover { color: var(--primary); }

/* --- Dropdown Menu (Premium) --- */
.dropdown-menu {
  position: absolute; top: 100%; left: 0; width: 220px; background: #fff;
  border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.3s; padding: 15px 0; z-index: 1001;
}
.main-nav li:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  padding: 10px 25px; text-transform: none; font-size: 0.95rem; font-weight: 600; color: var(--text-dark);
  display: block; letter-spacing: 0;
}
.dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.dropdown-menu i { float: right; margin-top: 5px; font-size: 0.8rem; opacity: 0.5; }

@media (max-width: 991px) { .main-nav { display:none; } }

/* --- News Layout --- */

.hero-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 40px; }
@media (max-width: 768px) { .hero-dual { grid-template-columns: 1fr; } }

.hero-card { position: relative; border-radius: 4px; overflow: hidden; }
.hero-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-card .cat { color: #84cc16; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin: 15px 0 8px; display: block; }
.hero-card h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.25; color: #111; margin-bottom: 10px; }
.hero-card .date { font-size: 0.8rem; color: #94a3b8; font-weight: 500; }

.news-feed-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 991px) { .news-feed-container { grid-template-columns: 1fr; } }

.news-item-horizontal { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid #f1f5f9; align-items: flex-start; }
.news-item-content { flex: 1; }
.news-item-content .cat { color: #84cc16; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; display: block; }
.news-item-content h3 { font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: #111; margin-bottom: 8px; }
.news-item-content .date { font-size: 0.75rem; color: #94a3b8; font-weight: 500; }
.news-item-thumb { width: 110px; height: 110px; flex-shrink: 0; }
.news-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

/* Sidebar Widgets */
.sidebar-widget { background: #fff; padding: 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid var(--border); }
.widget-title { font-size: 1rem; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; border-left: 4px solid var(--primary); padding-left: 12px; color: var(--secondary); }

.trending-item { display:flex; gap: 15px; margin-bottom: 15px; align-items: center; padding-bottom: 15px; border-bottom: 1px dashed var(--border); }
.trending-item:last-child { border: none; margin-bottom: 0; padding-bottom: 0; }
.trending-num { font-size: 1.5rem; font-weight: 800; color: #e2e8f0; font-family: 'Outfit'; }
.trending-content h4 { font-size: 0.9rem; font-weight: 700; color: var(--secondary); line-height: 1.3; }

/* 🛍️ MARKETPLACE STYLES */
.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #edf2f7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.premium-ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.author-info {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-top: 1px solid #f1f5f9;
}

.author-avatar {
    width: 24px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50%;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #475569;
}

.price-tag {
    background: #f1f0ff;
    color: #6366f1;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-block;
}

.card-footer-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.metric-item {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.metric-item i {
    margin-right: 5px;
}

/* Footer (Removed to avoid conflict with footer.php) */
/* Footer styles have been moved to footer.php for component isolation */

/* Bottom Nav (Mobile Only) */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: 65px; background: #fff; border-top: 1px solid var(--border); display: none; justify-content: space-around; align-items: center; z-index: 2000; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); font-size: 0.65rem; font-weight: 700; flex: 1; }
.nav-item i { font-size: 1.3rem; margin-bottom: 2px; }
.nav-item.active { color: var(--primary); }

@media (max-width: 768px) { 
    .bottom-nav { display: flex; } 
    body { padding-bottom: 70px; }
}

/* --- Admin Panel --- */
.admin-card { background: #fff; border-radius: 12px; padding: 25px; margin-bottom: 25px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.btn { padding: 10px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; border: none; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: var(--accent); color: #fff; }

.form-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 0.9rem; }
.form-control:focus { outline: none; border-color: var(--primary); }

/* --- Category Sections (Updated to Reference Image) --- */
.category-section { margin-bottom: 60px; }
.section-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    padding-bottom: 12px; 
    border-bottom: 2px solid #e2e8f0;
}
.section-header h2 { 
    font-size: 1.6rem; 
    font-weight: 800; 
    color: var(--secondary); 
    position: relative;
    font-family: 'Outfit';
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.section-header h2::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #84cc16; /* Professional Green Accent */
}
.section-header a { 
    font-size: 0.8rem; 
    font-weight: 800; 
    color: var(--primary); 
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 18px;
    background: #fff;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
}
.section-header a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.category-grid-horizontal { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
}

@media (max-width: 850px) {
    .category-grid-horizontal { grid-template-columns: 1fr; gap: 30px; }
}

.post-item-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: 0.3s;
}

.post-item-horizontal:hover {
    transform: translateX(5px);
}

.post-item-info {
    flex: 1;
}

.post-item-info .cat-label {
    color: #84cc16;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
    letter-spacing: 0.5px;
}

.post-item-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 12px;
}

/* --- Market Data Ticker (100% Pixel Perfect) --- */
.wrap-market-data {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: stretch;
    margin: 15px 0;
    overflow: hidden;
    height: 52px;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

.market-index {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 0 15px;
    border-right: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.market-index .val { color: #ef4444; font-weight: 800; font-size: 0.85rem; line-height: 1; }
.market-index .pct { color: #ef4444; font-weight: 700; font-size: 0.75rem; margin-top: 2px; }

.market-ticker-container {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.market-ticker-scroll {
    display: flex;
    animation: tickerScroll 45s linear infinite;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.market-item {
    display: grid;
    grid-template-columns: minmax(60px, auto) auto;
    column-gap: 20px;
    padding: 0 20px;
    border-right: 1px solid #e2e8f0;
    align-content: center;
    flex-shrink: 0;
}

.footer-bottom { background: #0f172a; padding: 20px 0; text-align: center; color: #94a3b8; font-size: 0.85rem; }

/* FIX MOBILE OVERFLOW */
@media (max-width: 768px) {
    body, html { width: 100%; }
    .article-header h1 { font-size: 2rem !important; line-height: 1.3 !important; }
    .ad-leaderboard { width: 100% !important; max-width: 100% !important; overflow: hidden; box-sizing: border-box; }
    .article-content img { height: auto !important; max-width: 100% !important; box-sizing: border-box; }
    .article-content pre, .article-content table { overflow-x: auto; max-width: 100% !important; display: block; box-sizing: border-box; }
    .article-content { word-wrap: break-word; overflow-wrap: break-word; max-width: 100%; }
    .tradingview-widget-container { width: 100% !important; max-width: 100% !important; overflow: hidden; }
}

.m-symbol { grid-row: 1; grid-column: 1; font-weight: 800; color: #111; font-size: 0.82rem; text-align: left; }
.m-price { grid-row: 2; grid-column: 1; font-weight: 500; color: #475569; font-size: 0.78rem; text-align: left; }
.m-change-val { grid-row: 1; grid-column: 2; font-weight: 700; font-size: 0.78rem; text-align: right; }
.m-change-pct { grid-row: 2; grid-column: 2; font-weight: 600; font-size: 0.72rem; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }

.up { color: #22c55e; }
.down { color: #ef4444; }

.market-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid #e2e8f0;
    padding: 0 15px;
    flex-shrink: 0;
    background: #fff;
}

.market-time-box { text-align: right; font-size: 0.72rem; color: #94a3b8; font-weight: 600; line-height: 1.25; }
.market-time-box span { display: block; color: #475569; }

.btn-market-link {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e40af;
    border: 1.5px solid #1e40af;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.2s;
    background: #fff;
    white-space: nowrap;
}
.btn-market-link:hover { background: #1e40af; color: #fff; }

@media (max-width: 1024px) {
    .market-meta { display: none; }
}

.post-item-info .date-label {
    font-size: 0.95rem;
    color: #94a3b8;
    font-weight: 500;
}

.post-item-thumb-square {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.post-item-thumb-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.post-item-horizontal:hover .post-item-thumb-square img {
    transform: scale(1.1);
}

/* --- DARK MODE STYLES --- */
html.dark-mode body,
html.dark-mode .container,
html.dark-mode main {
  --bg-main: #0f172a;
  --bg-soft: #1e293b;
  --text-dark: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  background-color: var(--bg-soft);
  color: var(--text-dark);
}

/* --- Layouts & Grid (Globally needed for post, category, index) --- */
.news-grid { display: flex; gap: 30px; align-items: flex-start; }
.news-grid main { flex: 1; min-width: 0; background: #fff; padding: 30px 40px; border: 1px solid #e2e8f0; border-radius: 12px; }
.point-sidebar { width: 340px; flex-shrink: 0; }

@media (max-width: 1024px) {
    .news-grid { flex-direction: column; }
    .news-grid main { padding: 25px; width: 100%; }
    .point-sidebar { width: 100%; margin-top: 30px; }
}

/* Base Classes */
html.dark-mode header,
html.dark-mode .satya-header-wrapper,
html.dark-mode .satya-nav-wrapper,
html.dark-mode .satya-dropdown,
html.dark-mode .sidebar-widget,
html.dark-mode .wrap-market-data,
html.dark-mode .market-meta,
html.dark-mode .product-card,
html.dark-mode .admin-card,
html.dark-mode .dropdown-menu,
html.dark-mode .news-grid main,
html.dark-mode .point-feed-item,
html.dark-mode .glass-card,
html.dark-mode .feature-box,
html.dark-mode .about-hero {
  background-color: var(--bg-main) !important;
  color: var(--text-dark) !important;
  border-color: var(--border) !important;
}

/* Secondary Backgrounds */
html.dark-mode .satya-top-bar,
html.dark-mode .bottom-nav,
html.dark-mode .footer-newsletter input,
html.dark-mode .satya-search-bar input,
html.dark-mode .point-latest-header,
html.dark-mode .feature-icon,
html.dark-mode .marketplace-hero {
  background-color: var(--bg-soft) !important;
  border-color: var(--border) !important;
  color: var(--text-dark) !important;
}

/* Text Colors */
html.dark-mode .satya-top-bar a,
html.dark-mode .satya-socials a,
html.dark-mode .satya-main-left strong,
html.dark-mode .satya-nav ul li a,
html.dark-mode .satya-logo-text span,
html.dark-mode .hero-card h2,
html.dark-mode .news-item-content h3,
html.dark-mode .post-item-info h3,
html.dark-mode .point-feed-content h3,
html.dark-mode .point-feed-excerpt,
html.dark-mode .widget-title,
html.dark-mode .trending-content h4,
html.dark-mode .m-symbol,
html.dark-mode .nav-item,
html.dark-mode .author-info span:first-child,
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3, html.dark-mode h4, html.dark-mode h5, html.dark-mode h6,
html.dark-mode p, html.dark-mode span, html.dark-mode div, html.dark-mode strong {
  color: var(--text-dark) !important;
}

/* Toggles & Inputs */
html.dark-mode .satya-dark-toggle,
html.dark-mode .satya-btn-login {
  color: var(--text-dark) !important;
  border-color: var(--border) !important;
  background: var(--bg-soft) !important;
}

html.dark-mode .satya-dropdown a:hover,
html.dark-mode .cat-tab:hover:not(.active) {
  background-color: var(--bg-soft) !important;
  color: var(--primary) !important;
}

html.dark-mode .ad-container-side {
  background-color: var(--bg-main) !important;
  border-color: var(--border) !important;
}



html.dark-mode .satya-nav-wrapper {
  border-bottom: 2px solid var(--primary) !important;
}

/* 🚀 POWERFUL WILDCARDS FOR INLINE STYLES */
html.dark-mode [style*="background: #fff" i],
html.dark-mode [style*="background:#fff" i],
html.dark-mode [style*="background: #ffffff" i],
html.dark-mode [style*="background-color: #fff" i],
html.dark-mode [style*="background-color:#fff" i],
html.dark-mode [style*="background: #f8fafc" i] {
    background-color: var(--bg-main) !important;
    color: var(--text-dark) !important;
}

html.dark-mode [style*="background: #f8f9fa" i],
html.dark-mode [style*="background:#f8f9fa" i],
html.dark-mode [style*="background: #f1f5f9" i],
html.dark-mode [style*="background:#f1f5f9" i],
html.dark-mode [style*="background: #e5e5e5" i] {
    background-color: var(--bg-soft) !important;
    border-color: var(--border) !important;
}

html.dark-mode [style*="color: #333" i],
html.dark-mode [style*="color:#333" i],
html.dark-mode [style*="color: #555" i],
html.dark-mode [style*="color:#555" i],
html.dark-mode [style*="color: #111" i],
html.dark-mode [style*="color:#111" i],
html.dark-mode [style*="color: #222" i],
html.dark-mode [style*="color:#222" i],
html.dark-mode [style*="color: #1e293b" i],
html.dark-mode [style*="color:#1e293b" i],
html.dark-mode [style*="color: #334155" i],
html.dark-mode [style*="color: #000" i],
html.dark-mode [style*="color:#000" i],
html.dark-mode [style*="color: #000000" i],
html.dark-mode [style*="color:#000000" i],
html.dark-mode [style*="color: rgb(0, 0, 0)" i],
html.dark-mode [style*="color:rgb(0,0,0)" i] {
    color: var(--text-dark) !important;
}

/* Force WYSIWYG editor content to inherit color in dark mode */


html.dark-mode [style*="border: 1px solid #eee" i],
html.dark-mode [style*="border:1px solid #eee" i],
html.dark-mode [style*="border: 1px solid #ddd" i],
html.dark-mode [style*="border-bottom: 1px solid #eee" i],
html.dark-mode [style*="border-bottom: 1px solid #ddd" i] {
    border-color: var(--border) !important;
}

/* Fix specific widgets missing the override */
html.dark-mode .cat-counter-badge,
html.dark-mode [style*="background: #f0f0f0" i],
html.dark-mode [style*="background: #fafafa" i],
html.dark-mode [style*="background:#fafafa" i] {
    background-color: var(--border) !important;
    color: var(--text-dark) !important;
}

/* Fix sidebar container backgrounds */
html.dark-mode .point-side-list,
html.dark-mode .point-hero-main .point-caption {
    background-color: var(--bg-main) !important;
    border-color: var(--border) !important;
}

html.dark-mode .point-search input,
html.dark-mode .point-tab {
    background-color: var(--bg-soft) !important;
    color: var(--text-dark) !important;
    border-color: var(--border) !important;
}

html.dark-mode .point-side-item,
html.dark-mode .point-side-thumb,
html.dark-mode .point-feed-thumb img {
    border-color: var(--border) !important;
}

html.dark-mode .admin-img {
    background: transparent !important;
    border-color: var(--border) !important;
}

html.dark-mode .marketplace-grid .product-card {
    background-color: var(--bg-main) !important;
    border-color: var(--border) !important;
}

html.dark-mode .marketplace-grid .product-card h3 {
    color: var(--text-dark) !important;
}

/* Category Hero Section Gradient Override */
html.dark-mode .hero[style*="linear-gradient"] {
    background: var(--bg-main) !important; background-image: none !important;
    border-bottom: 1px solid var(--border) !important;
}

/* Point Theme Sidebar specific overrides */
html.dark-mode .point-side-content h4 {
    color: var(--text-dark) !important;
}

/* Aggressive overrides for specific elements not catching on */
html.dark-mode section[style*="linear-gradient"],
html.dark-mode div[style*="linear-gradient"],
html.dark-mode .hero[style*="linear-gradient"],
html.dark-mode .about-hero {
    background: var(--bg-main) !important; background-image: none !important;
    border-color: var(--border) !important;
}
html.dark-mode .glass-card,
html.dark-mode .marketplace-hero {
    background-color: var(--bg-soft) !important;
}


/* Destructive color overriding for inline styling in headings */


/* The Ultimate Destructive Dark Mode Force Rule - REFINED */




/* Specific component fixes based on about/layanan.php */
html.dark-mode .about-hero,
html.dark-mode .marketplace-hero,
html.dark-mode .hero,
html.dark-mode .glass-card,
html.dark-mode .counter-circle,
html.dark-mode .feature-box,
html.dark-mode section[style*="background: #f8fafc"],
html.dark-mode div[style*="background:linear-gradient"],
html.dark-mode div[style*="background: linear-gradient"],
html.dark-mode .article-content table,
html.dark-mode .article-content tr,
html.dark-mode .article-content td,
html.dark-mode .article-content th,
html.dark-mode .article-content tbody,
html.dark-mode .article-content thead {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: var(--border) !important;
    color: var(--text-dark) !important;
}

/* Ensure icons/buttons inside still look right */
html.dark-mode .feature-icon,
html.dark-mode .cat-tab:not(.active) {
    background-color: var(--bg-soft) !important;
    color: var(--text-dark) !important;
}
html.dark-mode .cat-tab.active,
html.dark-mode .btn-primary {
    background-color: #6366f1 !important;
    color: #fff !important;
}

/* Safe Typography Target for Editor Content */
/* Targeted styling for WYSIWYG without breaking layout */


/* Minimal safe dark mode text color for article content */



/* Perfect Safe Article Content Override */
html.dark-mode .article-content,
html.dark-mode .article-content p,
html.dark-mode .article-content span,
html.dark-mode .article-content div,
html.dark-mode .article-content h1,
html.dark-mode .article-content h2,
html.dark-mode .article-content h3,
html.dark-mode .article-content table,
html.dark-mode .article-content tr,
html.dark-mode .article-content td,
html.dark-mode .article-content th,
html.dark-mode .article-content li,
html.dark-mode .article-content ul,
html.dark-mode .article-content ol {
    color: var(--text-dark) !important;
}

@media (max-width: 768px) {
    .article-header h1 { font-size: 2rem !important; }
}

/* Fallback Light Mode Container */
.news-grid main {
    background-color: #fff;
}


/* Restore default list paddings stripped by global reset */
.article-content ul, .article-content ol { padding-left: 40px; }


/* Restore default paragraph margin stripped by global reset */
.article-content p { margin-bottom: 20px; }
