/*
Theme Name: Know Your Health
Theme URI: https://knowyourhealth.site/
Author: Know Your Health Team
Author URI: https://knowyourhealth.site/
Description: Evidence-Based Health, Longevity & Wellness Magazine Theme.
Version: 2.1.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dailyfeed
*/

/* ==================== DESIGN SYSTEM & CSS VARIABLES ==================== */
:root {
  /* Colors - Light Theme */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(226, 232, 240, 0.8);
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --accent-teal: #0d9488;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  --accent-gradient-hover: linear-gradient(135deg, #0369a1 0%, #0f766e 100%);
  --accent-gradient-glow: rgba(2, 132, 199, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 20px 30px -10px rgba(37, 99, 235, 0.12), 0 10px 15px -3px rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1280px;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-glass: rgba(17, 24, 39, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-subtle: #1f2937;
  --border-hover: #374151;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary-color: #38bdf8;
  --primary-hover: #7dd3fc;
  --accent-teal: #2dd4bf;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #2dd4bf 100%);
  --accent-gradient-hover: linear-gradient(135deg, #7dd3fc 0%, #5eead4 100%);
  --accent-gradient-glow: rgba(56, 189, 248, 0.35);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 20px 35px -10px rgba(59, 130, 246, 0.25), 0 0 15px rgba(59, 130, 246, 0.15);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  background-color: var(--bg-body);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ==================== ACCESSIBILITY ==================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ==================== READING PROGRESS BAR ==================== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 99999;
  box-shadow: 0 0 8px var(--accent-gradient-glow);
  transition: width 0.1s ease-out;
}

/* ==================== GLASSMORPHISM HEADER ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: 10px;
  color: #ffffff;
  box-shadow: 0 4px 12px var(--accent-gradient-glow);
}

.logo-dot {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Primary Nav Menu */
.primary-nav {
  display: flex;
  align-items: center;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu li a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.main-menu li a:hover,
.main-menu li.current-menu-item a {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .main-menu li a:hover,
[data-theme="dark"] .main-menu li.current-menu-item a {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search-wrap {
  position: relative;
}

.header-search-form {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: all 0.2s ease;
}

.header-search-form:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-search-form input[type="search"] {
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  width: 170px;
}

.header-search-form input[type="search"]::placeholder {
  color: var(--text-muted);
}

.header-search-form button {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.header-search-form button:hover {
  color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: rotate(20deg);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

/* ==================== TRENDING TICKER ==================== */
.trending-ticker-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  font-size: 13px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ticker-label .pulse-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.ticker-content {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-content a {
  color: var(--text-primary);
  font-weight: 600;
}

.ticker-content a:hover {
  color: var(--primary-color);
}

/* ==================== BENTO MAGAZINE HERO ==================== */
.hero-bento-section {
  padding: 35px 0 25px;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
}

/* Left: Spotlight Story */
.bento-spotlight {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-spotlight:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.bento-spotlight-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.88;
}

.bento-spotlight:hover .bento-spotlight-img {
  transform: scale(1.04);
}

.bento-spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.95) 100%);
  pointer-events: none;
}

.bento-spotlight-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  color: #ffffff;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge-spotlight {
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px var(--accent-gradient-glow);
}

.badge-reading-time {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bento-spotlight-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 14px;
  color: #ffffff;
}

.bento-spotlight-title a {
  color: #ffffff;
}

.bento-spotlight-title a:hover {
  color: #93c5fd;
}

.bento-spotlight-excerpt {
  font-size: 15px;
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 90%;
}

.spotlight-author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.spotlight-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-author-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

.spotlight-post-date {
  font-size: 12px;
  color: #cbd5e1;
  margin: 2px 0 0;
}

/* Right: Trending List */
.bento-trending {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.trending-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.trending-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}

.trending-box-title svg {
  color: #f59e0b;
}

.trending-items-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
  justify-content: space-between;
}

.trending-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: transform 0.2s ease;
}

.trending-item:hover {
  transform: translateX(4px);
}

.trending-number {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.4;
  transition: all 0.2s ease;
  min-width: 38px;
}

.trending-item:hover .trending-number {
  color: var(--primary-color);
  opacity: 1;
}

.trending-item-content {
  flex: 1;
}

.trending-item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== INTERACTIVE FILTER TABS ==================== */
.content-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 45px 0 25px;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-heading-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-heading {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}

.tabs-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.tab-filter-btn {
  background: transparent;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-filter-btn:hover {
  color: var(--text-primary);
}

.tab-filter-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-gradient-glow);
}

.filter-count-badge {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

[data-theme="dark"] .filter-count-badge {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ==================== MODERN STORY CARDS GRID ==================== */
.posts-grid-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 45px;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-card-hover);
}

.post-card-thumb {
  position: relative;
  width: 100%;
  padding-top: 66%;
  overflow: hidden;
  background-color: var(--bg-surface-elevated);
}

.post-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.06);
}

.card-top-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.badge-stack-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-tag-highlight {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

.badge-trending-tag {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
}

.badge-mustread-tag {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.badge-featured-tag {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.badge-tag-glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.badge-time-glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 10px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  margin-top: auto;
}

.card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-author-info {
  display: flex;
  flex-direction: column;
}

.card-author-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Explore More CTA */
.explore-more-wrap {
  text-align: center;
  margin: 30px 0 60px;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px var(--accent-gradient-glow);
  transition: all 0.25s ease;
}

.btn-gradient:hover {
  background: var(--accent-gradient-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-gradient-glow);
}

/* ==================== SINGLE POST / READING VIEW ==================== */
.single-post-wrapper {
  padding: 40px 0 60px;
}

.single-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 45px;
}

.single-header {
  margin-bottom: 25px;
}

.single-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.single-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
  color: var(--text-primary);
}

/* Reading Experience Toolbar */
.reading-toolkit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.author-byline-toolkit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolkit-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--primary-color);
  overflow: hidden;
}

.toolkit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.font-size-adjuster {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
}

.font-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

.font-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.font-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
}

.share-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-pill-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-pill-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
}

.single-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 35px;
  box-shadow: var(--shadow-md);
}

.single-content {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-primary);
  transition: font-size 0.2s ease;
}

.single-content p {
  margin-bottom: 1.8em;
}

.single-content p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 3.5em;
  font-weight: 800;
  float: left;
  line-height: 0.85;
  margin-right: 12px;
  margin-top: 4px;
  color: var(--primary-color);
}

.single-content blockquote {
  border-left: 4px solid var(--primary-color);
  margin: 30px 0;
  padding: 18px 24px;
  background: var(--bg-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.1em;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* ==================== MULTI-PAGE STORY PAGINATION ==================== */
.story-pagination-box {
  margin: 45px 0 35px;
  padding: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.story-pagination-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.story-pagination-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-pagination-title svg {
  color: var(--primary-color);
}

.story-pagination-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

/* Progress bar inside story pagination */
.story-progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 22px;
}

.story-progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.story-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.story-page-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.story-page-item {
  margin: 0;
}

.story-page-link {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 0 12px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.story-page-link:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-gradient-glow);
}

.story-page-link.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-gradient-glow);
  cursor: default;
}

.story-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.story-nav-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-gradient-glow);
}

.story-cta-wrap {
  text-align: center;
  margin-top: 14px;
}

.story-continue-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  padding: 15px 30px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 6px 20px var(--accent-gradient-glow);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.story-continue-cta:hover {
  background: var(--accent-gradient-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-gradient-glow);
}

.story-completed-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  color: #10b981;
  font-weight: 700;
  margin-top: 14px;
}

/* ==================== RELATED POSTS ("YOU MAY ALSO LIKE") ==================== */
.related-posts-section {
  margin-top: 55px;
  padding-top: 35px;
  border-top: 1px solid var(--border-subtle);
}

.related-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.related-posts-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.related-posts-title svg {
  color: #f59e0b;
}

.related-explore-link {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.related-explore-link:hover {
  color: var(--primary-hover);
  transform: translateX(3px);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-posts-grid .post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.related-posts-grid .post-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-card-hover);
}

.related-posts-grid .post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-posts-grid .post-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-posts-grid .post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.related-posts-grid .post-card-title a:hover {
  color: var(--primary-color);
}

/* ==================== ARCHIVE / CATEGORY / SEARCH PAGINATION ==================== */
.pagination-wrap {
  margin: 50px 0 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.navigation.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.navigation.pagination .nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

.navigation.pagination .page-numbers {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.navigation.pagination a.page-numbers:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-gradient-glow);
}

.navigation.pagination .page-numbers.current {
  background: var(--accent-gradient);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-gradient-glow);
  cursor: default;
  transform: none;
}

.navigation.pagination .page-numbers.dots {
  color: var(--text-muted);
  min-width: 32px;
  border: none;
  background: transparent;
  cursor: default;
}

.navigation.pagination .page-numbers.prev,
.navigation.pagination .page-numbers.next {
  padding: 0 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.navigation.pagination a.page-numbers.prev:hover,
.navigation.pagination a.page-numbers.next:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-gradient-glow);
  transform: translateY(-2px);
}

[data-theme="dark"] .navigation.pagination .nav-links {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .navigation.pagination a.page-numbers:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ==================== STICKY NEXT PART FLOATING BAR ==================== */
.sticky-next-bar {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 10px 8px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-next-bar.visible {
  bottom: 24px;
}

.sticky-bar-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sticky-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
}

/* ==================== SIDEBAR ==================== */
.post-sidebar .widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  color: var(--text-primary);
}

.sidebar-post-item {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-post-thumb {
  width: 80px;
  height: 65px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-surface-elevated);
}

.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 45px 0 35px;
  text-align: center;
}

.footer-nav {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-nav li a {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.footer-nav li a:hover {
  color: var(--primary-color);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid-bento {
    grid-template-columns: repeat(3, 1fr);
  }
  .single-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  .mobile-toggle {
    display: flex;
  }
  .primary-nav {
    display: none;
  }
  .header-search-wrap {
    display: none;
  }
  .posts-grid-bento {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .bento-spotlight {
    min-height: 360px;
  }
  .bento-spotlight-content {
    padding: 22px 18px;
  }
  .bento-spotlight-title {
    font-size: 22px;
    line-height: 1.35;
  }
  .bento-spotlight-excerpt {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .bento-trending {
    padding: 22px 18px;
  }
  .trending-item {
    gap: 14px;
  }
  .trending-number {
    font-size: 26px;
    min-width: 32px;
  }
  .trending-item-title {
    font-size: 14px;
  }
  .single-title {
    font-size: 24px;
    line-height: 1.35;
  }
  .single-content {
    font-size: 16px;
  }
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .filter-heading {
    font-size: 18px;
  }
  .content-filter-header {
    margin: 30px 0 18px;
    gap: 12px;
  }
  .tabs-filter-group {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 3px;
  }
  .tab-filter-btn {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 12px;
  }
  .posts-grid-bento {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .post-card-body {
    padding: 16px;
  }
  .reading-toolkit {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
  }
  .reading-toolkit > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  .font-label {
    display: none;
  }
  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .story-pagination-box {
    padding: 18px 16px;
  }
  .story-pagination-controls {
    flex-direction: column;
    gap: 12px;
  }
  .story-nav-btn {
    width: 100%;
    justify-content: center;
  }
  .story-continue-cta {
    font-size: 14px;
    padding: 12px 18px;
    max-width: 100%;
  }
  .sticky-next-bar {
    width: calc(100vw - 28px);
    max-width: 440px;
    justify-content: space-between;
    padding: 8px 12px 8px 16px;
    gap: 10px;
  }
  .sticky-bar-text {
    font-size: 12px;
  }
  .sticky-bar-btn {
    padding: 6px 14px;
    font-size: 12px;
    white-space: nowrap;
  }
  .footer-nav {
    gap: 10px 16px;
  }
  .navigation.pagination .nav-links {
    padding: 6px 8px;
    gap: 6px;
    border-radius: var(--radius-md);
  }
  .navigation.pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }
  .navigation.pagination .page-numbers.prev,
  .navigation.pagination .page-numbers.next {
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .site-logo {
    font-size: 20px;
  }
  .logo-badge {
    width: 32px;
    height: 32px;
  }
  .theme-toggle, .mobile-toggle {
    width: 36px;
    height: 36px;
  }
}

/* Mobile Drawer Styles */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-surface);
  z-index: 99999;
  box-shadow: var(--shadow-lg);
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  left: 0;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99998;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list li a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* ==================== STATIC / LEGAL PAGES ==================== */
.page-container {
  max-width: 900px;
  margin: 50px auto 80px;
  padding: 0 24px;
}

.page-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 45px 50px;
  box-shadow: var(--shadow-sm);
}

.page-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 24px;
  color: var(--text-primary);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.page-content h2, .page-content h3 {
  margin-top: 32px;
  margin-bottom: 14px;
  color: var(--text-primary);
  font-weight: 800;
}

.page-content p {
  margin-bottom: 1.5em;
}

.page-content ul, .page-content ol {
  margin-bottom: 1.5em;
  padding-left: 24px;
}

.page-content li {
  margin-bottom: 0.5em;
}

#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  color: #ffffff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
  box-shadow: 0 4px 15px var(--accent-gradient-glow);
  cursor: pointer;
  transition: all 0.25s ease;
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-gradient-glow);
}

@media (max-width: 768px) {
  .page-article {
    padding: 26px 20px;
  }
  .page-title {
    font-size: 24px;
  }
}

/* ==================== MEDICAL & HEALTH EDITORIAL COMPONENTS ==================== */
.key-takeaways {
  background: #f0fdfa;
  border-left: 4px solid var(--accent-teal, #0d9488);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}
[data-theme="dark"] .key-takeaways {
  background: rgba(13, 148, 136, 0.12);
  border-left-color: #2dd4bf;
}
.key-takeaways h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #0f766e;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .key-takeaways h3 {
  color: #2dd4bf;
}
.key-takeaways ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}
.key-takeaways li {
  margin-bottom: 8px;
}
.key-takeaways li:last-child {
  margin-bottom: 0;
}

.medical-disclaimer {
  margin-top: 36px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}
.medical-disclaimer p {
  margin: 0;
}

.badge-med-reviewed {
  transition: all 0.2s ease;
}
[data-theme="dark"] .badge-med-reviewed {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
}

.single-content h2 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-size: 1.6rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 8px;
}
.single-content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: 1.25rem;
  color: var(--text-primary);
}
.single-content p {
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.2em;
  color: var(--text-secondary);
}
.single-content ul, .single-content ol {
  line-height: 1.75;
  font-size: 1.02rem;
  margin-bottom: 1.4em;
  color: var(--text-secondary);
}
.single-content li {
  margin-bottom: 0.4em;
}

