/* ===== DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --primary: #0D9488;
  --primary-light: #14B8A6;
  --primary-dark: #0F766E;
  --accent: #F97066;
  --accent-light: #FCA5A1;
  --bg: #FAFAF5;
  --bg-alt: #F0F0EB;
  --surface: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 30px rgba(13,148,136,0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== READING PROGRESS BAR ===== */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1001; transition: width 0.1s linear;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(250,250,245,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem;
  color: var(--primary-dark); text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none; transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--primary); transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }
.nav-subscribe-btn {
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  background: var(--primary); color: #fff; border: none; padding: 0.6rem 1.4rem;
  border-radius: 100px; cursor: pointer; transition: var(--transition);
}
.nav-subscribe-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 8rem 2rem 4rem; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #E0F7F5 0%, #FAFAF5 40%, #FFF1F0 70%, #FAFAF5 100%);
}
.hero-bg::before {
  content: ''; position: absolute; top: -40%; right: -20%; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  border-radius: 50%; animation: float 8s ease-in-out infinite;
}
.hero-bg::after {
  content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,112,102,0.06) 0%, transparent 70%);
  border-radius: 50%; animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}
.hero-content { position: relative; z-index: 1; max-width: 760px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  color: var(--primary); background: rgba(13,148,136,0.08);
  padding: 0.4rem 1rem; border-radius: 100px; margin-bottom: 1.5rem;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.hero-badge .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 {
  font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900; line-height: 1.1; color: var(--text);
  margin-bottom: 1.5rem; letter-spacing: -0.02em;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.2rem; color: var(--text-muted); max-width: 560px;
  margin: 0 auto 2.5rem; line-height: 1.8;
}
.hero-form { display: flex; gap: 0.75rem; max-width: 460px; margin: 0 auto 2rem; }
.hero-form input {
  flex: 1; padding: 0.9rem 1.2rem; border: 2px solid var(--border);
  border-radius: 100px; font-family: var(--font-ui); font-size: 0.95rem;
  background: var(--surface); transition: var(--transition); outline: none;
}
.hero-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,148,136,0.1); }
.hero-form button {
  padding: 0.9rem 2rem; background: var(--primary); color: #fff; border: none;
  border-radius: 100px; font-family: var(--font-ui); font-weight: 700;
  font-size: 0.95rem; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.hero-form button:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hero-form button:disabled { opacity: 0.7; cursor: wait; transform: none; }
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-muted);
}
.hero-stats strong { display: block; font-size: 1.3rem; color: var(--text); font-weight: 700; }

/* ===== SECTION COMMON ===== */
.section { padding: 6rem 2rem; }
.section-header { text-align: center; max-width: 620px; margin: 0 auto 3.5rem; }
.section-label {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 1rem; letter-spacing: -0.01em;
}
.section-desc { color: var(--text-muted); font-size: 1.05rem; }

/* ===== TOPICS ===== */
.topics { background: var(--bg-alt); }
.topics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; max-width: 1100px; margin: 0 auto;
}
.topic-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 2.2rem;
  border: 1px solid var(--border); transition: var(--transition); cursor: pointer;
  position: relative; overflow: hidden;
}
.topic-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--card-accent, var(--primary)); opacity: 0; transition: var(--transition);
}
.topic-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.topic-card:hover::before { opacity: 1; }
.topic-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem; font-size: 1.5rem;
}
.topic-card h3 {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700;
  margin-bottom: 0.6rem;
}
.topic-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.topic-tag {
  display: inline-block; font-family: var(--font-ui); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; margin-top: 1rem;
  color: var(--card-accent, var(--primary)); opacity: 0.8;
}
.card-vaccines { --card-accent: #0D9488; }
.card-vaccines .topic-icon { background: #E0F7F5; color: #0D9488; }
.card-mental { --card-accent: #7C3AED; }
.card-mental .topic-icon { background: #EDE9FE; color: #7C3AED; }
.card-heart { --card-accent: #E11D48; }
.card-heart .topic-icon { background: #FFE4E6; color: #E11D48; }
.card-addiction { --card-accent: #D97706; }
.card-addiction .topic-icon { background: #FEF3C7; color: #D97706; }

/* ===== CURRENT UPDATES ===== */
.updates { background: var(--bg); }
.updates-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.update-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.5rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  min-height: 260px;
}
.update-label {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary);
  margin-bottom: 0.7rem;
}
.update-card h3 {
  font-family: var(--font-heading); font-size: 1.05rem; line-height: 1.35;
  margin-bottom: 0.65rem;
}
.update-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.update-footer {
  margin-top: auto; padding-top: 1.25rem; display: flex; gap: 1rem;
  align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border);
}
.update-footer span {
  font-family: var(--font-ui); font-size: 0.72rem; color: var(--text-light);
}
.update-link {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
  color: var(--primary); background: transparent; border: none;
  text-decoration: none; cursor: pointer; padding: 0;
  text-align: right;
}
.update-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== FEATURED ARTICLE ===== */
.featured { background: var(--bg); }
.featured-card {
  max-width: 800px; margin: 0 auto; background: var(--surface);
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.featured-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 2.5rem 3rem 2rem;
}
.featured-meta {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin-bottom: 0.75rem;
}
.featured-header h2 {
  font-family: var(--font-heading); font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800; line-height: 1.3;
}
.featured-body { padding: 2.5rem 3rem; }
.featured-tldr {
  background: rgba(13,148,136,0.05); border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 2rem; font-family: var(--font-ui); font-size: 0.95rem;
  color: var(--primary-dark); font-weight: 500;
}
.featured-body h3 {
  font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700;
  margin: 2rem 0 0.75rem; color: var(--text);
}
.featured-body p { margin-bottom: 1rem; color: var(--text); font-size: 1.05rem; }
.featured-body ul {
  margin: 0.5rem 0 1.5rem 1.5rem; color: var(--text);
}
.featured-body ul li { margin-bottom: 0.5rem; font-size: 1.02rem; }
.featured-body ul li::marker { color: var(--primary); }
.featured-source {
  font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-light);
  border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem;
}
.featured-source a { color: var(--primary); text-decoration: none; }
.featured-source a:hover { text-decoration: underline; }

/* ===== ARCHIVE ===== */
.archive { background: var(--bg-alt); }
.filter-bar {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  padding: 0.5rem 1.2rem; border-radius: 100px; border: 2px solid var(--border);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.archive-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem; max-width: 1100px; margin: 0 auto;
}
.archive-card {
  background: var(--surface); border-radius: var(--radius-md); padding: 1.8rem;
  border: 1px solid var(--border); transition: var(--transition);
}
.archive-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.archive-card .card-topic {
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6rem;
}
.archive-card .card-topic.vaccines { color: #0D9488; }
.archive-card .card-topic.mental { color: #7C3AED; }
.archive-card .card-topic.heart { color: #E11D48; }
.archive-card .card-topic.addiction { color: #D97706; }
.archive-card h3 {
  font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700;
  line-height: 1.4; margin-bottom: 0.6rem;
}
.archive-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.archive-card .card-date {
  font-family: var(--font-ui); font-size: 0.75rem; color: var(--text-light);
}
.archive-card.hidden { display: none; }

/* ===== READER TOOLS ===== */
.reader-tools { background: var(--bg); }
.saved-articles {
  max-width: 900px; margin: 0 auto; display: flex; gap: 0.75rem;
  flex-wrap: wrap; justify-content: center;
}
.saved-empty {
  width: 100%; background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius-md); padding: 1.6rem;
  text-align: center; color: var(--text-muted); font-family: var(--font-ui);
}
.saved-empty strong {
  display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 0.25rem;
}
.saved-empty span { font-size: 0.85rem; }
.saved-pill {
  max-width: 320px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 0.65rem 1rem; color: var(--text);
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.saved-pill span {
  color: var(--primary); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em; margin-right: 0.4rem;
}
.saved-pill:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ===== ABOUT ===== */
.about { background: var(--bg); }
.about-content {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.about-text p { margin-bottom: 1.2rem; font-size: 1.05rem; color: var(--text-muted); }
.about-text blockquote {
  border-left: 4px solid var(--accent); padding-left: 1.5rem;
  font-style: italic; color: var(--text); font-size: 1.1rem; margin: 1.5rem 0;
}
.source-badges {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem;
}
.source-badge {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600;
  padding: 0.4rem 0.9rem; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}
.source-badge svg { width: 14px; height: 14px; color: var(--primary); }
.about-visual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.about-stat {
  background: var(--surface); border-radius: var(--radius-md); padding: 1.5rem;
  text-align: center; border: 1px solid var(--border);
}
.about-stat .stat-num {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.about-stat .stat-label {
  font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem;
}

/* ===== FOOTER CTA ===== */
.footer-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  padding: 5rem 2rem; text-align: center; color: #fff;
}
.footer-cta h2 {
  font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800; margin-bottom: 1rem;
}
.footer-cta p { font-size: 1.1rem; opacity: 0.9; max-width: 500px; margin: 0 auto 2rem; }
.footer-cta .hero-form input { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); color: #fff; }
.footer-cta .hero-form input::placeholder { color: rgba(255,255,255,0.6); }
.footer-cta .hero-form input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.15); }
.footer-cta .hero-form button { background: #fff; color: var(--primary-dark); }
.footer-cta .hero-form button:hover { background: var(--bg); }

/* ===== FOOTER ===== */
.footer {
  background: var(--text); color: rgba(255,255,255,0.6); padding: 3rem 2rem;
  text-align: center; font-family: var(--font-ui); font-size: 0.85rem;
}
.footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 2000;
  background: var(--surface); color: var(--text); padding: 1rem 1.5rem;
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.75rem;
  border-left: 4px solid var(--primary);
  transform: translateY(calc(100% + 4rem)); opacity: 0; visibility: hidden;
  pointer-events: none; transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease, visibility 0.4s;
}
.toast.show { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.toast .toast-icon { font-size: 1.3rem; }

/* ===== MOBILE NAV ===== */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(250,250,245,0.97); backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--text); text-decoration: none; transition: var(--transition);
}
.mobile-menu a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links, .nav-subscribe-btn { display: none; }
  .hamburger { display: block; }
  .hero h1 { font-size: 2.2rem; }
  .hero-form { flex-direction: column; }
  .hero-form button { width: 100%; }
  .hero-stats { gap: 1.5rem; }
  .topics-grid { grid-template-columns: 1fr; }
  .updates-grid { grid-template-columns: 1fr; }
  .featured-header, .featured-body { padding: 1.5rem; }
  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .archive-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-cta .hero-form { flex-direction: column; }
  .article-overlay-panel { width: 95vw !important; max-height: 95vh !important; border-radius: var(--radius-md) !important; }
  .nav-actions { display: none; }
}

/* ===== NAV ACTIONS ===== */
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
  background: none; border: 2px solid var(--border); border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); color: var(--text-muted);
}
.dark-mode-toggle:hover { border-color: var(--primary); color: var(--primary); }
.dark-mode-toggle .icon-moon { display: none; }
body.dark-mode .dark-mode-toggle .icon-sun { display: none; }
body.dark-mode .dark-mode-toggle .icon-moon { display: block; }

/* ===== DARK MODE ===== */
body.dark-mode {
  --bg: #0F172A; --bg-alt: #1E293B; --surface: #1E293B;
  --text: #E2E8F0; --text-muted: #94A3B8; --text-light: #64748B;
  --border: #334155; --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}
body.dark-mode .navbar { background: rgba(15,23,42,0.9); }
body.dark-mode .mobile-menu { background: rgba(15,23,42,0.97); }
body.dark-mode .hero-bg {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 40%, #1a1a2e 70%, #0F172A 100%);
}
body.dark-mode .hero-badge { background: rgba(13,148,136,0.15); }
body.dark-mode .featured-tldr { background: rgba(13,148,136,0.1); color: var(--primary-light); }
body.dark-mode .card-vaccines .topic-icon { background: rgba(13,148,136,0.15); }
body.dark-mode .card-mental .topic-icon { background: rgba(124,58,237,0.15); }
body.dark-mode .card-heart .topic-icon { background: rgba(225,29,72,0.15); }
body.dark-mode .card-addiction .topic-icon { background: rgba(217,119,6,0.15); }
body.dark-mode .hamburger span { background: var(--text); }

/* ===== HERO CANVAS ===== */
#heroCanvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* ===== HAMBURGER ACTIVE ===== */
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== ARCHIVE CARD ENHANCEMENTS ===== */
.archive-card { cursor: pointer; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-read-time { font-family: var(--font-ui); font-size: 0.72rem; color: var(--text-light); font-weight: 500; }

/* ===== READ MORE FADE ===== */
.read-more-fade {
  position: relative; padding-top: 2rem; margin-top: -1rem; text-align: center;
  background: linear-gradient(to bottom, transparent, var(--surface));
}
.read-more-btn {
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  color: var(--primary); background: none; border: 2px solid var(--primary);
  padding: 0.6rem 1.5rem; border-radius: 100px; cursor: pointer; transition: var(--transition);
}
.read-more-btn:hover { background: var(--primary); color: #fff; }
.featured-card.clickable-article { cursor: pointer; }

/* ===== ARTICLE OVERLAY ===== */
.article-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
}
.article-overlay.open { pointer-events: auto; opacity: 1; }
.article-overlay-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
}
.article-overlay-panel {
  position: relative; width: min(760px, 90vw); max-height: 90vh;
  background: var(--bg); overflow-y: auto; border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  transform: translateY(40px) scale(0.97); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
}
.article-overlay.open .article-overlay-panel { transform: translateY(0) scale(1); opacity: 1; }
.article-overlay-header {
  position: sticky; top: 0; z-index: 10; padding: 1rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.article-close-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); color: var(--text-muted);
}
.article-close-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.article-share-bar { display: flex; gap: 0.5rem; }
.share-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); color: var(--text-muted);
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); }
.share-btn.bookmarked { background: var(--primary); border-color: var(--primary); color: #fff; }
.share-btn.bookmarked svg { fill: #fff; }

/* Article full content */
.article-full-header {
  padding: 3rem 2.5rem 2rem; color: #fff;
}
.topic-bg-heart { background: linear-gradient(135deg, #9F1239, #E11D48); }
.topic-bg-mental { background: linear-gradient(135deg, #5B21B6, #7C3AED); }
.topic-bg-vaccines { background: linear-gradient(135deg, #0F766E, #0D9488); }
.topic-bg-addiction { background: linear-gradient(135deg, #92400E, #D97706); }
.article-full-meta {
  font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; margin-bottom: 1rem;
}
.article-full-header h1 {
  font-family: var(--font-heading); font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800; line-height: 1.3;
}
.article-full-body { padding: 2.5rem; }
.article-full-body h3 {
  font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700;
  margin: 2rem 0 0.75rem; color: var(--text);
}
.article-full-body p { margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.8; }
.article-full-body ul { margin: 0.5rem 0 1.5rem 1.5rem; }
.article-full-body ul li { margin-bottom: 0.6rem; font-size: 1.02rem; line-height: 1.7; }
.article-full-body ul li::marker { color: var(--primary); }
.article-full-body .featured-source { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem; }
.article-full-body .featured-source span { color: var(--text-muted); }

/* ===== ADMIN PANEL ===== */
.admin-panel {
  position: fixed; inset: 0; z-index: 3000;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
}
.admin-panel.open { display: flex; }
.admin-panel-inner {
  background: var(--surface); border-radius: var(--radius-lg);
  width: min(600px, 90vw); max-height: 80vh; overflow: hidden;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
}
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem; border-bottom: 1px solid var(--border);
}
.admin-header h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; }
.admin-close {
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--text-muted); transition: var(--transition);
}
.admin-close:hover { color: var(--accent); }
.admin-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.admin-empty { color: var(--text-muted); font-family: var(--font-ui); text-align: center; padding: 2rem 0; }
.admin-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.85rem; }
.admin-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--text-muted); }
.admin-table td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.admin-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
}
.admin-export-btn {
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600;
  background: var(--primary); color: #fff; border: none; padding: 0.5rem 1rem;
  border-radius: 100px; cursor: pointer; transition: var(--transition);
}
.admin-export-btn:hover { background: var(--primary-dark); }
.admin-count { font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed; bottom: 2rem; left: 2rem; z-index: 1500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); transition: var(--transition); pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== CONFETTI ===== */
#confettiCanvas { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }

/* ===== SHAKE ANIMATION ===== */
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 50%{transform:translateX(6px)} 75%{transform:translateX(-4px)} }
.shake { animation: shake 0.4s ease; }

/* ===== TYPING CURSOR ===== */
.typing-cursor {
  display: inline-block; width: 3px; height: 1em; background: var(--primary);
  margin-left: 4px; animation: blink 0.8s infinite; vertical-align: text-bottom;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ===== BUTTON RIPPLE ===== */
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple .ripple {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4);
  transform: scale(0); animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ===== CARD TILT ON HOVER ===== */
.tilt-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }

/* ===== HEALTH TIP TICKER ===== */
.health-ticker {
  background: var(--primary); color: #fff; padding: 0.6rem 0;
  overflow: hidden; font-family: var(--font-ui); font-size: 0.82rem;
  font-weight: 500; letter-spacing: 0.02em;
}
.health-ticker-inner {
  display: flex; gap: 4rem; white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.health-ticker-inner span { display: flex; align-items: center; gap: 0.5rem; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ===== INTERACTIVE QUOTE SECTION ===== */
.testimonial-section { background: var(--bg-alt); overflow: hidden; }
.testimonial-carousel { max-width: 700px; margin: 0 auto; position: relative; min-height: 180px; }
.testimonial-card {
  position: absolute; inset: 0; opacity: 0; transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease; text-align: center;
  padding: 1rem;
}
.testimonial-card.active { opacity: 1; transform: translateX(0); }
.testimonial-card blockquote {
  font-size: 1.15rem; font-style: italic; color: var(--text);
  line-height: 1.8; margin-bottom: 1rem;
}
.testimonial-card cite {
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); font-style: normal;
}
.testimonial-dots {
  display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem;
}
.testimonial-dot {
  width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border);
  background: transparent; cursor: pointer; transition: var(--transition);
}
.testimonial-dot.active { background: var(--primary); border-color: var(--primary); }

/* ===== ENHANCED ARCHIVE CARD HOVER ===== */
.archive-card { position: relative; overflow: hidden; }
.archive-card::after {
  content: 'Read →'; position: absolute; bottom: 1.2rem; right: 1.5rem;
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600;
  color: var(--primary); opacity: 0; transform: translateX(-8px);
  transition: var(--transition);
}
.archive-card:hover::after { opacity: 1; transform: translateX(0); }

/* ===== PARALLAX HELPER ===== */
.parallax-section { position: relative; }
.parallax-float { transition: transform 0.1s linear; }

/* ===== GLOW ON FOCUS ===== */
.hero-form input:focus { box-shadow: 0 0 0 4px rgba(13,148,136,0.12), 0 0 20px rgba(13,148,136,0.08); }

/* ===== ANIMATED UNDERLINE LINKS ===== */
.featured-source a {
  position: relative; text-decoration: none;
}
.featured-source a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1.5px;
  background: var(--primary); transition: width 0.3s ease;
}
.featured-source a:hover::after { width: 100%; }

/* ===== SMOOTH SCROLLBAR ===== */
.article-overlay-panel::-webkit-scrollbar { width: 6px; }
.article-overlay-panel::-webkit-scrollbar-track { background: transparent; }
.article-overlay-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.article-overlay-panel::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
