/* ==========================================================================
   AgenticsPulse.com — Professional Design System (Non-AMP Version)
   ========================================================================== */

/* Google Fonts Import */
:root {
  /* Light Mode Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #3b82f6; /* Electric Blue */
  --accent-secondary: #06b6d4; /* Neon Cyan */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  /* Dark Mode Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Offset Scroll agar Target Anchor tidak tertutup sticky header navbar */
h1[id], h2[id], h3[id], h4[id] {
  scroll-margin-top: 90px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  background-color: rgba(248, 250, 252, 0.95); /* Off-white semi-solid */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: relative; /* Diubah dari sticky agar tidak melayang (floating) */
  z-index: 10000; /* Ditingkatkan agar tombol burger di dalamnya selalu di atas elemen lain */
  transition: var(--transition-smooth);
}

[data-theme="dark"] header {
  background-color: rgba(11, 15, 25, 0.95); /* Dark semi-solid */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-logo, a.brand-logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex; /* Use inline-flex to properly align the glow dot */
  align-items: center;
  gap: 8px;
}

.brand-logo::after, a.brand-logo::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
}

@keyframes pulse-beat {
  0% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  70% { transform: scale(1); }
  100% { transform: scale(1); }
}

.brand-logo svg {
  animation: pulse-beat 2.5s infinite ease-in-out;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.actions-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Switcher */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile Menu Button */
.menu-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: block;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 100%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

@media (min-width: 1024px) {
  .hero-layout {
    flex-direction: row;
    align-items: center;
  }
  .hero-image-wrapper {
    flex: 1.2;
  }
  .hero-content {
    flex: 0.8;
  }
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  aspect-ratio: 16/10;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.2rem;
  }
}

.hero-title a:hover {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-excerpt {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.meta-info span.author {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Sections & Grid Layouts */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 80px 0 32px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 9999px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* News Cards */
.news-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(59, 130, 246, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
  pointer-events: none;
}

.news-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1), 0 0 30px rgba(6, 182, 212, 0.15);
  border-color: transparent;
}

.news-card:hover::before {
  opacity: 1;
}

.card-image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.card-title a:hover {
  color: var(--accent-primary);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Custom Table Design (Premium & Responsive) */
.table-container {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: var(--bg-secondary);
}

th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(59, 130, 246, 0.02);
}

/* Footer Section (Premium 4-Column Grid) */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px 0;
  margin-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-logo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 320px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-links-list a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

/* Ensure brand logo in footer retains its styling */
.footer-col a.brand-logo {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  display: inline-flex;
}

/* System Status Dot */
.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Green */
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Newsletter Subscription Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.newsletter-input {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-smooth);
}

.newsletter-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.newsletter-btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
  transition: var(--transition-smooth);
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3);
}

/* Footer Bottom Bar */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: none; /* Reset original border */
  padding-top: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom-links a:hover {
  color: var(--accent-primary);
}


/* Dynamic Mobile Sidebar/Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 100000; /* Ditingkatkan secara signifikan agar berada di atas judul artikel */
  padding: 40px 30px;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.drawer-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-menu a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 99999; /* Diposisikan tepat di bawah mobile-drawer */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Article Template Specific Details (Sticky TOC, Progress Bar) */
.reading-progress-container {
  position: fixed;
  top: 0; /* Diubah dari 72px karena header navbar sudah tidak sticky melayang */
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999; /* Pastikan selalu berada di paling atas */
  background: transparent;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
}

.article-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 60px;
}

@media (min-width: 1024px) {
  .article-layout {
    flex-direction: row;
  }
  .article-main {
    flex: 1;
    max-width: 800px;
  }
  .article-sidebar {
    width: 280px;
    position: sticky;
    top: 40px; /* Diubah dari 120px karena header navbar sudah tidak sticky */
    align-self: flex-start;
  }
}

.toc-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-list a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: block;
}

.toc-list a:hover, .toc-list a.active {
  color: var(--accent-primary);
  font-weight: 500;
}

/* Code Highlights & Copy Button */
pre {
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-color);
  position: relative; /* Needed for absolute positioning of copy button */
}

code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  opacity: 0; /* Hidden by default, appears on hover */
  transition: var(--transition-smooth);
}

pre:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Premium Static Page Layout Styling (Global Rules)
   ========================================================================== */
.static-hero {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 56px 0;
  margin-bottom: 48px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.static-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0;
  line-height: 1.2;
}

.static-content-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 32px 24px;
  margin-bottom: 80px;
}

@media (min-width: 768px) {
  .static-content-card {
    padding: 56px 48px;
  }
}

.static-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 52px 0 16px 0; /* Adjusted from 40px to 52px according to audit spacing guidelines */
  letter-spacing: -0.3px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.static-body p {
  margin-bottom: 24px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.static-body ul, .static-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.static-body li {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   Mid-Article Newsletter CTA Design (Conversion & Trust Focus)
   ========================================================================== */
.mid-article-newsletter-cta {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.mid-article-newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
}

.mid-article-cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mid-article-cta-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.mid-article-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .mid-article-form {
    flex-direction: row;
  }
  .mid-article-form .newsletter-input {
    flex: 1;
  }
}

.mid-article-social-proof {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.mid-article-social-proof svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ============================================
   AFFILIATE LINK STYLES
   ============================================ */
a.affiliate-link {
  color: #f97316;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(249, 115, 22, 0.5);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a.affiliate-link::after {
  content: ' \2197';
  font-size: 0.75em;
  font-weight: 400;
  opacity: 0.8;
  vertical-align: super;
}

a.affiliate-link:hover {
  color: #ea580c;
  text-decoration-color: rgba(234, 88, 12, 0.8);
}

[data-theme="light"] a.affiliate-link {
  color: #c2410c;
  text-decoration-color: rgba(194, 65, 12, 0.5);
}

[data-theme="light"] a.affiliate-link:hover {
  color: #9a3412;
}





.internal-link { color: var(--accent-primary); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent-primary); text-underline-offset: 2px; }
.internal-link:hover { color: var(--accent-secondary); text-decoration-color: var(--accent-secondary); }


/* --- HOMEPAGE LAYOUT VARIATIONS --- */

/* 1. Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
  }
  .bento-grid .news-card:nth-child(1) {
    grid-row: span 2;
  }
  .bento-grid .news-card:nth-child(1) .card-image-wrapper {
    aspect-ratio: 16/9;
  }
}

/* 2. CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}
.cta-banner::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  transform: rotate(30deg);
  pointer-events: none;
}
.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner .btn {
  background: var(--accent-gradient);
  color: #fff;
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s;
}
.cta-banner .btn:hover {
  transform: scale(1.05);
}

/* 3. List Grid */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 768px) {
  .list-grid .news-card {
    flex-direction: row;
    align-items: center;
  }
  .list-grid .card-image-wrapper {
    width: 35%;
    aspect-ratio: 16/10;
  }
  .list-grid .card-content {
    width: 65%;
    padding: 32px;
  }
}


@media (min-width: 1024px) {
  .bento-grid .news-card:not(:first-child) .card-excerpt,
  .bento-grid .news-card:not(:first-child) .meta-info {
    display: none;
  }
  .bento-grid .news-card:not(:first-child) .card-content {
    padding: 16px;
  }
}

  .bento-grid .news-card .card-category {
    display: none;
  }


@media (min-width: 1024px) {
  .bento-grid .news-card:first-child .card-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
  }
  .bento-grid .news-card:first-child .card-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: auto;
  }
  .bento-grid .news-card:first-child .card-content {
    justify-content: space-between;
  }
}


/* Hide meta-info (author and date) on all cards and hero section for cleaner UI */
.news-card .meta-info,
.hero-content .meta-info {
  display: none !important;
}
