/* AI Tool Stack - Clean, minimal, fast */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafa; --card: #fff; --text: #1a1a2e; --muted: #6b7280;
  --accent: #6366f1; --accent-hover: #4f46e5; --border: #e5e7eb;
  --green: #10b981; --amber: #f59e0b; --red: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(99,102,241,0.1);
  --shadow-lg: 0 8px 30px rgba(99,102,241,0.15);
}
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; opacity: 0; animation: fadeInBody 0.5s ease forwards; }
@keyframes fadeInBody { to { opacity: 1; } }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 20px rgba(99,102,241,0.4); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Header ===== */
header { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; z-index: 100; animation: fadeInDown 0.4s ease; }
header .container-wide { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.logo span { color: var(--text); }
nav { display: flex; gap: 24px; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; position: relative; padding: 2px 0; }
nav a:hover { color: var(--accent); }
nav a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--gradient); transition: width 0.3s; border-radius: 1px; }
nav a:hover::after { width: 100%; }
nav .nav-cta { background: var(--gradient); color: #fff !important; padding: 6px 16px; border-radius: 6px; font-weight: 600; }
nav .nav-cta::after { display: none; }
nav .nav-cta:hover { opacity: 0.9; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 60px 0 40px; }
.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; animation: fadeInUp 0.6s ease; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; animation: fadeInUp 0.6s ease 0.1s both; }
.hero-split { text-align: left; padding: 50px 0; animation: fadeInUp 0.6s ease; }
.hero-split h1 { font-size: 2.4rem; line-height: 1.2; }
.hero-split p { margin: 0; max-width: 440px; }
.hero-gradient { background: linear-gradient(-45deg, #eef2ff, #f5f3ff, #eef2ff, #f0fdf4); background-size: 400% 400%; animation: gradientShift 15s ease infinite; border-bottom: 1px solid var(--border); }

/* ===== Social Proof ===== */
.social-proof { text-align: center; padding: 30px 0; animation: fadeInUp 0.8s ease 0.2s both; }
.social-proof p { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; font-weight: 600; }
.social-proof .logos { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.social-proof .logos span { font-size: 1.2rem; font-weight: 700; color: var(--muted); opacity: 0.4; transition: opacity 0.3s; }
.social-proof .logos span:hover { opacity: 0.7; }

/* ===== Article cards ===== */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 60px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; animation: fadeInUp 0.5s ease both; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: left; }
.card:hover::before { transform: scaleX(1); }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); margin-bottom: 8px; }
.card-tag .cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px; background: var(--bg); font-size: 0.65rem; }
.card-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; margin-right: 6px; vertical-align: middle; }
.card-badge.editors-pick { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; animation: pulse 2s ease-in-out infinite; }
.card-badge.trending { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #991b1b; }
.card-badge.new { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.card h2 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.4; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta .read-time { background: var(--bg); padding: 2px 8px; border-radius: 4px; }
.stars { color: var(--amber); font-size: 0.85rem; letter-spacing: 1px; }

/* ===== Price Badges ===== */
.price-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; padding: 2px 10px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.price-free { background: #dcfce7; color: #166534; }
.price-low { background: #dbeafe; color: #1e40af; }
.price-mid { background: #fef3c7; color: #92400e; }
.price-high { background: #fee2e2; color: #991b1b; }
.price-na { background: #f3f4f6; color: #6b7280; }

/* ===== Category page hero ===== */
.cat-hero { padding: 30px 0; animation: fadeInUp 0.6s ease; }
.cat-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.cat-hero p { font-size: 1rem; color: var(--muted); max-width: 600px; }

/* ===== Newsletter ===== */
.newsletter-section { background: linear-gradient(135deg, #eef2ff, #f0fdf4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 0; margin: 0 0 20px; }

/* ===== Section headings ===== */
.section-title { font-size: 1.5rem; font-weight: 700; margin: 40px 0 20px; padding-bottom: 8px; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* ===== Article page ===== */
article { padding: 40px 0 60px; }
.article-header { margin-bottom: 32px; }
.article-header .breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.article-header .breadcrumb a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.article-header .breadcrumb a:hover { color: var(--accent-hover); }
.article-header .breadcrumb .sep { color: var(--border); }
.article-header h1 { font-size: 2rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.article-header .meta { font-size: 0.9rem; color: var(--muted); }
.article-content h2 { font-size: 1.4rem; font-weight: 700; margin: 32px 0 12px; }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 8px; }
.article-content p { margin-bottom: 16px; font-size: 1.05rem; }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; }
.article-content li { margin-bottom: 8px; font-size: 1.05rem; }
.article-content a { color: var(--accent); }
.article-content a.affiliate { background: #eef2ff; padding: 1px 4px; border-radius: 3px; text-decoration: none; font-weight: 500; }
.article-content a.affiliate:hover { background: var(--accent); color: #fff; }

/* ===== Comparison table ===== */
.compare-table-wrapper { overflow-x: auto; margin: 24px 0; border-radius: 8px; border: 1px solid var(--border); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table th { background: #f8f8ff; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #f8f8ff; }
.compare-table .winner { color: var(--green); font-weight: 700; }
.compare-table .winner::before { content: '✓ '; }
.compare-table .tie { color: var(--amber); font-weight: 600; }
.compare-table .tie::before { content: '= '; }
.compare-table td:first-child { font-weight: 600; }

/* ===== Pros/Cons boxes ===== */
.pros-box, .cons-box { padding: 20px 24px; border-radius: 8px; margin: 16px 0; }
.pros-box { background: #ecfdf5; border-left: 4px solid var(--green); }
.cons-box { background: #fef2f2; border-left: 4px solid var(--red); }
.pros-box h3, .cons-box h3 { font-size: 1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pros-box ul, .cons-box ul { margin: 0 0 0 20px; }
.pros-box li, .cons-box li { font-size: 0.95rem; margin-bottom: 4px; }

/* ===== CTA box ===== */
.cta-box { background: linear-gradient(135deg, #eef2ff, #fafafa); border: 1px solid var(--accent); border-radius: 12px; padding: 28px; margin: 32px 0; text-align: center; box-shadow: var(--shadow-sm); }
.cta-box h3 { font-size: 1.2rem; margin-bottom: 8px; }
.cta-box p { color: var(--muted); margin-bottom: 16px; font-size: 0.95rem; }
.cta-btn { display: inline-block; background: var(--gradient); color: #fff; padding: 12px 28px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s; box-shadow: 0 4px 14px rgba(99,102,241,0.3); }
.cta-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.cta-btn-small { display: inline-block; background: var(--gradient); color: #fff; padding: 8px 20px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: all 0.2s; }
.cta-btn-small:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== Related articles ===== */
.related-articles { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--border); }
.related-articles h3 { font-size: 1.2rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card { padding: 16px; border: 1px solid var(--border); border-radius: 8px; transition: all 0.2s; }
.related-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.related-card h4 { font-size: 0.95rem; }
.related-card h4 a { color: var(--text); text-decoration: none; }
.related-card h4 a:hover { color: var(--accent); }
.related-card .tag { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 4px; }

/* ===== Verdict box ===== */
.verdict-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 28px; margin: 32px 0; }
.verdict-box h3 { font-size: 1.15rem; color: #166534; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.verdict-box p { margin-bottom: 8px; color: #166534; }
.verdict-box p:last-child { margin-bottom: 0; }
.verdict-box .rating { font-size: 2rem; font-weight: 800; color: var(--green); }

/* ===== Feature highlight boxes ===== */
.feature-box { display: flex; gap: 16px; padding: 16px 20px; border-radius: 8px; margin: 12px 0; background: #f8f8ff; border: 1px solid #e8e8ff; align-items: flex-start; }
.feature-box .icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; text-align: center; }
.feature-box h4 { font-size: 0.95rem; margin-bottom: 4px; }
.feature-box p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ===== Footer ===== */
footer { background: linear-gradient(135deg, #1a1a2e, #16213e); border-top: none; padding: 32px 0; margin-top: 40px; text-align: center; }
footer p { font-size: 0.85rem; color: #94a3b8; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== Back to top ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--gradient); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); transition: all 0.3s; opacity: 0; visibility: hidden; z-index: 99; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(99,102,241,0.4); }

/* ===== Disclosure ===== */
.disclosure { font-size: 0.8rem; color: var(--muted); background: #f9fafb; border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; margin-bottom: 24px; }

/* ===== Social Share Buttons ===== */
.share-bar { display: flex; align-items: center; gap: 8px; margin: 24px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.share-bar-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; font-weight: 500; text-decoration: none; transition: all 0.2s; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.share-btn:hover { transform: translateY(-1px); }
.share-btn.twitter:hover { background: #1da1f2; color: #fff; border-color: #1da1f2; }
.share-btn.linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-btn.facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.share-sticky { position: fixed; left: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 90; }
.share-sticky .share-btn { padding: 8px 10px; font-size: 1rem; border-radius: 8px; box-shadow: var(--shadow-md); }
@media (max-width: 1100px) { .share-sticky { display: none; } }

/* ===== Filter & Search Bar ===== */
.filter-bar { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 0; position: sticky; top: 60px; z-index: 90; animation: fadeInDown 0.4s ease; }
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 10px; }
.search-wrap { flex: 1; min-width: 200px; position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; opacity: 0.5; }
.search-input { width: 100%; padding: 10px 14px 10px 36px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; background: var(--bg); transition: border-color 0.2s; }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn, .cat-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); color: var(--muted); font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.filter-btn:hover, .cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active, .cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-cats { gap: 6px; }
.filter-cats .cat-btn { font-size: 0.75rem; padding: 4px 12px; }

/* ===== Section divider ===== */
.section-divider { text-align: center; padding: 20px 0; position: relative; }
.section-divider::before { content: ''; display: block; height: 2px; background: var(--gradient); width: 60px; margin: 0 auto; border-radius: 1px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-split h1 { font-size: 1.6rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.5rem; }
  nav { gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  nav a { font-size: 0.78rem; white-space: nowrap; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 8px 10px; }
  .hero-split .container { flex-direction: column-reverse; text-align: center; }
  .hero-split p { margin: 0 auto; }
  .hero-split .cta-btn-small { justify-content: center; }
  .cat-hero h1 { font-size: 1.5rem; }
  .social-proof .logos { gap: 16px; }
  .social-proof .logos span { font-size: 0.9rem; }
  .back-to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; font-size: 1rem; }
  .filter-bar { top: 50px; }
  .filter-bar .filter-btns { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .filter-cats { overflow-x: auto; flex-wrap: nowrap; }
  .news-layout { grid-template-columns: 1fr !important; }
  .news-sidebar { display: none; }
}

/* =====================================================================
   AI NEWS SECTION STYLES
   ===================================================================== */

/* ── News page header ── */
.page-header { padding: 40px 0 24px; animation: fadeInUp 0.6s ease; }
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { font-size: 1rem; color: var(--muted); max-width: 600px; }
.news-header { background: linear-gradient(135deg, #eef2ff, #f0fdf4); border-bottom: 1px solid var(--border); }

/* ── Sticky filter ── */
.sticky-filter { top: 56px; }

/* ── Two-column layout ── */
.news-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin: 24px auto 60px; align-items: start; }
.news-main { min-width: 0; }
.news-grid { margin: 0; }

/* ── News card tweaks ── */
.news-card { padding: 0; overflow: hidden; position: relative; }
.news-card .card-category { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); }
.news-card .card-date { font-size: 0.7rem; color: var(--muted); margin-left: auto; }
.news-card .card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.news-card h2 { font-size: 1.05rem; margin-top: 4px; }
.news-card .card-img { width: 100%; height: 160px; overflow: hidden; }
.news-card .card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img--fallback { display: flex; align-items: center; justify-content: center; }
.card-img-fallback-icon { font-size: 2.5rem; opacity: 0.35; }
.news-card .card-body { padding: 16px; }

/* ── Breaking badge ── */
.breaking-badge { display: inline-block; background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; margin-right: 8px; }
.news-card .breaking-badge { position: absolute; top: 10px; left: 10px; z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }

/* ── Article source info ── */
.article-source { font-size: 0.75rem; color: var(--muted); margin-left: auto; }

/* ── Tag filter pills ── */
#tagFilters { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.tag-filter-btn { padding: 3px 12px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); color: var(--muted); font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.tag-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.tag-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Tag badges (on cards and articles) ── */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #eef2ff; color: var(--accent); font-size: 0.7rem; font-weight: 500; }

/* ── Trending sidebar ── */
.news-sidebar { position: sticky; top: 120px; }
.trending-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.trending-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trending-item:last-child { border-bottom: none; }
.trending-rank { font-size: 1.1rem; font-weight: 800; color: var(--accent); min-width: 24px; opacity: 0.5; }
.trending-link { font-size: 0.85rem; font-weight: 600; color: var(--text); text-decoration: none; display: block; line-height: 1.4; }
.trending-link:hover { color: var(--accent); }
.trending-meta { font-size: 0.7rem; color: var(--muted); display: block; margin-top: 2px; }

/* ── No results / errors ── */
.no-results, .error-msg { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.95rem; }
.error-page { text-align: center; padding: 60px 20px; }
.error-page h1 { font-size: 1.8rem; margin-bottom: 12px; }

/* ── Loading spinner ── */
.loading-spinner { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 0.95rem; }

/* ── Article page specific ── */
.article-page { padding: 32px 0 60px; }
.article-header { margin-bottom: 28px; }
.article-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 0.85rem; color: var(--muted); }
.article-meta-top .cat-icon { font-size: 0.85rem; }
.article-page h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.article-image { margin-bottom: 24px; border-radius: 10px; overflow: hidden; max-height: 400px; }
.article-image img { width: 100%; height: auto; max-height: 400px; object-fit: cover; display: block; }
.article-image--fallback { height: 200px; display: flex; align-items: center; justify-content: center; }
.article-image-icon { font-size: 3rem; opacity: 0.4; }
.article-summary { font-size: 1.05rem; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; }
.article-tags .tag { padding: 3px 10px; font-size: 0.75rem; }
.article-body section { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-body section:last-child { border-bottom: none; }
.article-body h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }

/* ── Key points ── */
.key-points ul { padding-left: 20px; }
.key-points li { margin-bottom: 10px; font-size: 0.95rem; line-height: 1.6; color: var(--text); }

/* ── Why it matters ── */
.why-matters { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 24px; }
.why-matters h2 { color: #166534 !important; }
.why-matters p { font-size: 0.95rem; line-height: 1.7; color: #166534; }

/* ── Related tools ── */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-item { padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; transition: all 0.2s; }
.tool-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tool-item strong { font-size: 0.9rem; display: block; margin-bottom: 4px; }
.tool-item p { font-size: 0.8rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ── Sources ── */
.sources ul { padding-left: 0; list-style: none; }
.sources li { margin-bottom: 8px; }
.sources a { font-size: 0.9rem; color: var(--accent); text-decoration: none; padding: 6px 12px; display: block; border: 1px solid var(--border); border-radius: 6px; transition: all 0.2s; }
.sources a:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.sources a::before { content: "🔗 "; font-size: 0.8rem; }

/* ── Article footer ── */
.article-footer { margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--border); text-align: center; }

/* ── Margin for muted text ── */
.muted { color: var(--muted); font-size: 0.85rem; }

/* =====================================================================
   HOMEPAGE NEWS LAYOUT
   ===================================================================== */

/* ── Hero: featured stories ── */
.hero-news { padding: 24px 0 0; animation: fadeInUp 0.5s ease; }
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.hero-feature--main { grid-row: span 2; }
.hero-feature-link { display: block; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--border); transition: all 0.3s; text-decoration: none; height: 100%; }
.hero-feature-link:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hero-feature-img { height: 240px; display: flex; align-items: center; justify-content: center; position: relative; overflow:hidden; }
.hero-img-overlay { position:absolute; inset:0; background:linear-gradient(rgba(0,0,0,0.3),rgba(0,0,0,0.65)); z-index:1; }
.hero-feature--main .hero-feature-img { height: 500px; }
.hero-feature-icon { font-size: 3rem; opacity: 0.3; }
.hero-feature--main .hero-feature-icon { font-size: 4rem; }
.hero-feature-body { padding: 18px 20px; }
.hero-feature--main .hero-feature-body { padding: 22px 24px; }
.hero-feature-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); display: block; margin-bottom: 4px; }
.hero-feature-body h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 6px; }
.hero-feature--main .hero-feature-body h2 { font-size: 1.25rem; }
.hero-feature-body p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.hero-feature--main .hero-feature-body p { font-size: 0.9rem; }
.hero-feature-meta { font-size: 0.75rem; color: var(--muted); }

/* ── Top Headlines ── */
.top-headlines { padding: 24px 0; }
.headlines-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.headlines-list { min-width: 0; }
.section-title-sm { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 8px; }
.headline-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.headline-item:last-child { border-bottom: none; }
.headline-thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.headline-cat { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 4px; background: #eef2ff; color: var(--accent); flex-shrink: 0; min-width: 56px; text-align: center; }
.headline-cat.tools { background: #ecfdf5; color: #166534; }
.headline-cat.tutorials { background: #fef3c7; color: #92400e; }
.headline-link { font-size: 0.9rem; font-weight: 500; color: var(--text); text-decoration: none; flex: 1; line-height: 1.4; }
.headline-link:hover { color: var(--accent); }
.headline-time { font-size: 0.75rem; color: var(--muted); flex-shrink: 0; }
.headline-more { display: inline-block; margin-top: 12px; font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.headline-more:hover { text-decoration: underline; }

/* ── Newsletters widget (sidebar) ── */
.trending-widget, .newsletter-widget { margin-bottom: 24px; }
.newsletter-widget { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.newsletter-widget p { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }

/* ── Category sections ── */
.home-categories { padding: 8px 0 40px; }
.cat-section { margin-bottom: 36px; }
.cat-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cat-section-link { font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.cat-section-link:hover { text-decoration: underline; }
.cat-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cat-featured-card { grid-column: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--card); transition: all 0.2s; }
.cat-featured-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.cat-featured-img { height: 140px; display: flex; align-items: center; justify-content: center; }
.cat-featured-icon { font-size: 2.5rem; opacity: 0.3; }
.cat-featured-body { padding: 16px 20px; }
.cat-featured-body h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.cat-featured-body h3 a { color: var(--text); text-decoration: none; }
.cat-featured-body h3 a:hover { color: var(--accent); }
.cat-featured-body p { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.cat-featured-meta { font-size: 0.75rem; color: var(--muted); }
.cat-mini-cards { grid-column: 2; display: flex; flex-direction: column; gap: 8px; }
.cat-mini-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); text-decoration: none; transition: all 0.2s; }
.cat-mini-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.cat-mini-icon { font-size: 1.2rem; flex-shrink: 0; }
.cat-mini-card strong { font-size: 0.85rem; color: var(--text); display: block; margin-bottom: 2px; }
.cat-mini-card span { font-size: 0.78rem; color: var(--muted); }

/* ── Responsive: homepage ── */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-feature--main { grid-row: auto; }
  .hero-feature-img { height: 200px; }
  .hero-feature--main .hero-feature-img { height: 300px; }
  .headlines-layout { grid-template-columns: 1fr; }
  .cat-section-grid { grid-template-columns: 1fr; }
  .cat-featured-card { grid-column: 1; }
  .cat-mini-cards { grid-column: 1; }
  .page-header h1 { font-size: 1.5rem; }
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { display: none; }
  .article-page h1 { font-size: 1.4rem; }
  .tools-grid { grid-template-columns: 1fr; }
}
