/*
Theme Name: AIDigest
Theme URI: https://ductuehai.com
Description: Premium AI Tools Directory & Reviews — Mobile-First Design
Version: 2.0.0
Author: AIDigest Team
*/

/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  /* Colors */
  --primary: #6C3FEB;
  --primary-dark: #5A2DD6;
  --primary-light: rgba(108,63,235,0.08);
  --primary-lighter: rgba(108,63,235,0.04);
  --accent: #00D4AA;
  --text-dark: #1A1240;
  --text-mid: #4A4368;
  --text-light: #8B86A0;
  --bg-white: #FFFFFF;
  --bg-light: #F8F7FC;
  --bg-hero: linear-gradient(135deg, #F8F7FC 0%, #EFECF9 50%, #F0F0FF 100%);
  --bg-dark: #1A1240;
  --border: #E8E5F0;
  --border-light: #F0EEF5;
  --green-light: #E8F8F0;
  --green: #22C55E;
  --red-light: #FEF2F2;
  --red: #EF4444;

  /* Typography */
  --font-head: 'Inter', 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-gap: 48px;
  --container-padding: 16px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  /* Transitions */
  --transition: all 0.2s ease;
}

/* ===========================
   RESET & BASE (Mobile-First)
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--text-dark); }

/* ===========================
   LAYOUT
   =========================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.section { padding: var(--section-gap) 0; }

/* ===========================
   NAVBAR (Mobile-First)
   =========================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.navbar-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 20px; font-weight: 800;
  color: var(--text-dark);
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
/* Desktop nav — hidden on mobile */
.navbar-nav { display: none; }
.navbar-nav .menu,
.navbar-nav ul { list-style: none; margin: 0; padding: 0; }
.navbar-nav .sub-menu,
.navbar-nav .menu .sub-menu { display: none !important; position: absolute; top: 100%; left: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 8px; min-width: 200px; z-index: 1001; }
.navbar-nav .menu li { position: relative; }
.navbar-nav .menu li:hover > .sub-menu { display: block !important; }
.navbar-nav .menu li a { display: block; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text-mid); border-radius: var(--radius-sm); transition: var(--transition); white-space: nowrap; }
.navbar-nav .menu li a:hover, .navbar-nav .menu li.current-menu-item > a { color: var(--primary); background: var(--primary-light); opacity: 1; }
.navbar-nav .sub-menu li a { font-size: 13px; padding: 8px 12px; }
.navbar-search { display: none; }
.navbar-actions .btn-sm { font-size: 13px; padding: 8px 16px; }
.navbar-actions { display: none; } /* Hidden on mobile, show on tablet+ */

/* Hamburger — visible on mobile */
.hamburger-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 20px; cursor: pointer;
  color: var(--text-dark);
  transition: var(--transition);
}
.hamburger-btn:hover { background: rgba(108,63,235,0.15); }

/* ===========================
   MOBILE NAV OVERLAY
   =========================== */
.mobile-nav-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26,18,64,0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
}
.mobile-nav-overlay.active { display: block; }

.mobile-nav {
  position: fixed; top: 0; right: -300px;
  width: 280px; height: 100vh;
  background: white;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  z-index: 9999; padding: 24px;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.mobile-nav.active { right: 0; }
.mobile-nav-close {
  width: 36px; height: 36px;
  background: var(--primary-light);
  border: none; border-radius: var(--radius-sm);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark); margin-bottom: 24px;
}
.mobile-nav-links a {
  display: block; padding: 14px 16px;
  font-size: 16px; font-weight: 600;
  color: var(--text-dark); border-radius: var(--radius-sm);
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--primary); background: var(--primary-light);
}
.mobile-nav-cta {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  white-space: normal; word-break: break-word;
  text-align: center; line-height: 1.4;
}
.btn-primary {
  background: var(--primary); color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; opacity: 1; }
.btn-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  color: white; padding: 14px 28px; font-size: 15px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(108,63,235,0.3);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(108,63,235,0.4); color: white; opacity: 1; }
.btn-secondary {
  background: white; color: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); opacity: 1; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
}
.btn-outline:hover { border-color: var(--primary); }

/* ===========================
   HERO SECTION (Mobile-First)
   =========================== */
.hero-section {
  padding: 80px 0 40px;
  background: var(--bg-hero);
}
.hero-grid {
  display: flex; flex-direction: column; gap: 32px;
}
.hero-content { max-width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--text-mid);
  background: var(--primary-light); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.hero-title {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 16px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 15px; color: var(--text-mid);
  line-height: 1.7; margin-bottom: 24px; max-width: 520px;
}
.hero-buttons { display: flex; flex-direction: column; gap: 12px; }
.hero-search { display: none !important; } /* Hidden on mobile */
.hero-tools { display: none !important; } /* Hidden on mobile */

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header { text-align: center; margin-bottom: 32px; }
.section-title { font-size: 22px; margin-bottom: 8px; }
.section-subtitle { font-size: 14px; color: var(--text-mid); }
.section-header-flex {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}

/* ===========================
   CATEGORY GRID
   =========================== */
.category-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.cat-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 16px;
  text-align: center; transition: var(--transition); cursor: pointer;
}
.cat-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.cat-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.cat-name { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.cat-count { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ===========================
   TOOL CARDS
   =========================== */
.tools-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.tool-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
  transition: var(--transition);
  display: flex; align-items: center; gap: 16px;
}
.tool-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  border-color: var(--primary);
}
.tool-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; overflow: hidden;
}
.tool-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm);
}
.tool-info { flex: 1; min-width: 0; }
.tool-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.tool-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-mid);
}
.tool-rating { color: #F59E0B; font-weight: 600; }
.tool-tag {
  background: var(--primary-light); color: var(--primary);
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.tool-price { font-weight: 600; color: var(--text-dark); }
.tool-desc {
  font-size: 13px; color: var(--text-light);
  margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tool-link {
  font-size: 13px; font-weight: 600; color: var(--primary);
  white-space: nowrap; flex-shrink: 0;
}

/* === ARCHIVE TOOL CARDS === */
.archive-tool-card {
  display: flex; flex-direction: column; gap: 10px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
  text-decoration: none; color: inherit;
  transition: var(--transition);
}
.archive-tool-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  border-color: var(--primary);
}
.archive-card-header {
  display: flex; align-items: center; gap: 12px;
}
.archive-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--bg-light); display: flex; align-items: center;
  justify-content: center; font-size: 24px; flex-shrink: 0; overflow: hidden;
}
.archive-card-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm);
}
.archive-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-dark);
  line-height: 1.3; flex: 1; min-width: 0;
}
.archive-card-stars {
  color: #F59E0B; font-size: 13px; font-weight: 600;
}
.archive-card-stars span { color: var(--text-mid); font-weight: 500; }
.archive-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.archive-card-price {
  font-size: 13px; font-weight: 700; color: var(--text-dark);
}
.archive-card-desc {
  font-size: 13px; color: var(--text-light); line-height: 1.5;
  margin: 0; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.archive-card-link {
  font-size: 13px; font-weight: 600; color: var(--primary);
  margin-top: auto;
}

/* === SCORE BREAKDOWN === */
.score-breakdown { margin-top: 16px; }
.score-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; font-size: 12px;
}
.score-name { width: 72px; color: var(--text-mid); flex-shrink: 0; }
.score-bar {
  flex: 1; height: 6px; background: var(--bg-light);
  border-radius: var(--radius-full); overflow: hidden;
}
.score-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), #A78BFA);
}
.score-val { font-weight: 700; color: var(--text-dark); width: 22px; text-align: right; }
/* ===========================
   BLOG CARDS
   =========================== */
.blog-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.blog-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: linear-gradient(135deg, #E0E7FF 0%, #DDD6FE 100%);
}
.blog-card-body { padding: 16px; }
.blog-card-tag {
  display: inline-block; padding: 2px 10px;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-full); font-size: 11px; font-weight: 600;
  margin-bottom: 8px;
}
.blog-card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.blog-card-excerpt {
  font-size: 13px; color: var(--text-mid); margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-link { font-size: 13px; font-weight: 600; }

/* ===========================
   NEWSLETTER
   =========================== */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
  border-radius: var(--radius-lg); padding: 40px 24px;
  text-align: center; color: white;
}
.newsletter-section h2 { color: white; font-size: 22px; margin-bottom: 8px; }
.newsletter-section p { color: rgba(255,255,255,0.85); font-size: 14px; margin-bottom: 24px; }
.newsletter-form {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 480px; margin: 0 auto;
}
.newsletter-form input {
  width: 100%; padding: 14px 20px;
  border-radius: var(--radius-full); border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15); color: white;
  font-size: 15px; font-family: var(--font-body);
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.7); }
.newsletter-form input:focus { border-color: white; background: rgba(255,255,255,0.2); }
.newsletter-form button {
  padding: 14px 32px; border-radius: var(--radius-full);
  background: white; color: var(--primary);
  font-weight: 700; font-size: 15px; border: none; cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  margin-bottom: 32px;
}
.footer-col-title {
  font-family: var(--font-head); font-size: 16px; font-weight: 700;
  color: white; margin-bottom: 16px;
}
.footer-col a {
  display: block; padding: 4px 0; font-size: 14px;
  color: rgba(255,255,255,0.6); transition: var(--transition);
}
.footer-col a:hover { color: white; opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px; text-align: center; font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ===========================
   REVIEW PAGE
   =========================== */
.review-hero {
  padding: 72px 0 32px;
  background: var(--bg-hero);
}
.review-breadcrumb {
  font-size: 13px; color: var(--text-light); margin-bottom: 20px;
}
.review-breadcrumb a { color: var(--text-mid); }
.review-header {
  display: flex; flex-direction: column; gap: 24px;
}
.review-header-main { flex: 1; }
.review-tool-logo {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--bg-light); display: flex; align-items: center;
  justify-content: center; font-size: 32px; margin-bottom: 12px; overflow: hidden;
}
.review-tool-logo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md);
}
.review-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge {
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-purple { background: var(--primary-light); color: var(--primary); }
.review-title {
  font-size: 24px; font-weight: 800; margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.review-stars {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 14px; color: var(--text-mid);
}
.review-stars .stars { color: #F59E0B; font-weight: 600; }
.review-excerpt { font-size: 14px; color: var(--text-mid); margin-bottom: 20px; line-height: 1.7; }
.review-cta-btn { width: 100%; }

/* Rating sidebar card */
.rating-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
  text-align: center;
}
.rating-big { font-size: 48px; font-weight: 800; color: var(--primary); }
.rating-stars { color: #F59E0B; font-size: 18px; margin: 8px 0; }
.rating-label { font-size: 14px; font-weight: 600; color: var(--text-mid); margin-bottom: 16px; }
.rating-price { font-size: 13px; color: var(--text-light); margin-top: 12px; }

/* Review content layout */
.review-layout {
  display: flex; flex-direction: column; gap: 24px;
}
.review-body {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
}
.review-body h2 { font-size: 20px; margin-bottom: 16px; margin-top: 32px; }
.review-body h2:first-child { margin-top: 0; }
.review-body h3 { font-size: 17px; margin-bottom: 12px; margin-top: 24px; }
.review-body p { margin-bottom: 16px; color: var(--text-mid); line-height: 1.8; }

/* Pros & Cons */
.pros-cons-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  margin-bottom: 24px;
}
.pros-box, .cons-box {
  border-radius: var(--radius-md); padding: 20px;
}
.pros-box { background: var(--green-light); }
.cons-box { background: var(--red-light); }
.pros-box h3, .cons-box h3 { font-size: 16px; margin-bottom: 12px; margin-top: 0; }
.pros-box li, .cons-box li {
  padding: 6px 0; font-size: 14px; color: var(--text-mid);
  display: flex; align-items: flex-start; gap: 8px;
}
.pros-box li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.cons-box li::before { content: '✗'; color: var(--red); font-weight: 700; flex-shrink: 0; }

/* Review sidebar */
.review-sidebar {
  display: flex; flex-direction: column; gap: 16px;
}
.sidebar-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
}
.sidebar-card h3 {
  font-size: 15px; margin-bottom: 12px; margin-top: 0;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-light);
}
.key-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.key-info-row:last-child { border-bottom: none; }
.key-info-label { color: var(--text-light); }
.key-info-value { font-weight: 600; color: var(--text-dark); }

/* ===========================
   CONTENT TABLES
   =========================== */
.review-body table,
.entry-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 24px 0; border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); font-size: 13px;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.review-body thead, .entry-content thead {
  background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
}
.review-body thead th, .entry-content thead th {
  color: white; font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 12px 16px; text-align: left; border: none;
  white-space: nowrap;
}
.review-body tbody tr, .entry-content tbody tr {
  background: white; transition: var(--transition);
}
.review-body tbody tr:nth-child(even), .entry-content tbody tr:nth-child(even) {
  background: var(--bg-light);
}
.review-body tbody tr:hover, .entry-content tbody tr:hover {
  background: var(--primary-lighter);
}
.review-body td, .entry-content td {
  padding: 10px 16px; border-bottom: 1px solid var(--border-light);
  color: var(--text-mid); font-size: 13px; line-height: 1.6;
  white-space: nowrap;
}
.review-body td:first-child, .entry-content td:first-child {
  font-weight: 600; color: var(--text-dark);
}

/* ===========================
   ARCHIVE PAGE
   =========================== */
.archive-layout {
  display: flex; flex-direction: column; gap: 24px;
}
.archive-sidebar { display: none; } /* Hidden on mobile — replaced by filter pills */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.filter-pill {
  padding: 8px 16px; border-radius: var(--radius-full);
  background: white; border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-mid);
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===========================
   BLOG PAGE (List)
   =========================== */
.featured-post {
  display: flex; flex-direction: column; gap: 20px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 32px;
}
.featured-post-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: linear-gradient(135deg, #C4B5FD 0%, #7C3AED 100%);
}
.featured-post-body { padding: 20px; }
.featured-post-title { font-size: 22px; margin-bottom: 8px; }
.featured-post-meta { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.featured-post-excerpt { font-size: 14px; color: var(--text-mid); margin-bottom: 16px; line-height: 1.7; }

/* Blog sidebar — hidden on mobile */
.blog-sidebar { display: none; }

/* ===========================
   BLOG POST DETAIL
   =========================== */
.article-hero-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #C4B5FD 0%, #7C3AED 100%);
  margin-bottom: 24px;
}
.article-layout {
  display: flex; flex-direction: column; gap: 24px;
}
.article-body {
  font-size: 16px; line-height: 1.8; color: var(--text-mid);
}
.article-body h2 { font-size: 22px; margin: 32px 0 16px; color: var(--text-dark); }
.article-body h3 { font-size: 18px; margin: 24px 0 12px; color: var(--text-dark); }
.article-body p { margin-bottom: 16px; }
.article-body blockquote {
  border-left: 4px solid var(--primary); padding: 16px 20px;
  margin: 24px 0; background: var(--primary-lighter);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-dark);
}
.article-meta {
  font-size: 13px; color: var(--text-light); margin-bottom: 16px;
}
.article-share {
  display: flex; gap: 8px; margin-bottom: 24px;
}
.share-btn {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: white; border: none; cursor: pointer;
}
/* Article sidebar — hidden on mobile */
.article-sidebar { display: none; }

/* Author bio */
.author-bio {
  display: flex; gap: 16px; align-items: center;
  background: var(--bg-light); border-radius: var(--radius-md);
  padding: 20px; margin: 32px 0;
}
.author-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-light); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.author-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.author-desc { font-size: 13px; color: var(--text-mid); }

/* Related articles */
.related-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}

/* ===========================
   PAGINATION
   =========================== */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 32px 0;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; border: 1px solid var(--border);
  color: var(--text-mid); transition: var(--transition);
}
.pagination .current {
  background: var(--primary); color: white; border-color: var(--primary);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); opacity: 1; }

/* ===========================
   PAGE HERO (Generic)
   =========================== */
.page-hero {
  padding: 80px 0 32px;
  background: var(--bg-hero); text-align: center;
}
.page-hero-badge {
  display: inline-flex; padding: 4px 14px;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-full); font-size: 13px;
  font-weight: 600; margin-bottom: 12px;
}
.page-hero-title {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.page-hero-sub {
  font-size: 14px; color: var(--text-mid);
  max-width: 500px; margin: 0 auto;
}

/* ===========================
   UTILITY
   =========================== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.bg-light { background: var(--bg-light); }

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   TABLET (≥768px)
   =========================== */
@media (min-width: 768px) {
  :root {
    --section-gap: 64px;
    --container-padding: 24px;
  }
  .navbar { height: 64px; }
  .hamburger-btn { display: none; }
  .navbar-actions { display: flex; }
  .navbar-nav {
    display: flex; align-items: center; gap: 4px;
  }
  .navbar-nav .menu {
    display: flex; align-items: center; gap: 4px;
  }

  /* Hero */
  .hero-section { padding: 100px 0 60px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .hero-buttons { flex-direction: row; }
  .hero-search { display: flex !important; background: white; border-radius: var(--radius-full); padding: 6px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); max-width: 520px; gap: 0; }
  .hero-search form { flex: 1; display: flex; }
  .hero-search input { flex: 1; border: none; outline: none; font-family: var(--font-body); font-size: 15px; background: transparent; padding: 10px 16px; }
  .hero-tools { display: flex !important; flex-direction: column; gap: 16px; }
  .hero-grid {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  }
  .hero-tools {
    display: flex; flex-direction: column; gap: 16px;
  }
  .hero-search {
    display: flex; background: white; border-radius: var(--radius-full);
    padding: 6px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    max-width: 520px; gap: 0;
  }
  .hero-search form { flex: 1; display: flex; }
  .hero-search input {
    flex: 1; border: none; outline: none; font-family: var(--font-body);
    font-size: 15px; background: transparent; padding: 10px 16px;
  }

  /* Sections */
  .section-title { font-size: 28px; }
  .section-subtitle { font-size: 15px; }

  /* Category */
  .category-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }

  /* Tools */
  .tools-grid { grid-template-columns: repeat(3, 1fr); }

  /* Blog */
  .blog-grid { grid-template-columns: repeat(3, 1fr); }

  /* Newsletter */
  .newsletter-section { padding: 56px 48px; border-radius: var(--radius-lg); }
  .newsletter-section h2 { font-size: 28px; }
  .newsletter-form { flex-direction: row; }

  /* Footer */
  .footer-grid { grid-template-columns: repeat(4, 1fr); }

  /* Review */
  .review-hero { padding: 88px 0 40px; }
  .review-header {
    flex-direction: row; align-items: flex-start;
  }
  .review-header-main { flex: 1; }
  .review-title { font-size: 32px; }
  .review-cta-btn { width: auto; }
  .review-layout {
    flex-direction: row;
  }
  .review-body { flex: 1; min-width: 0; }
  .review-sidebar {
    width: 300px; flex-shrink: 0;
    position: sticky; top: 80px; align-self: flex-start;
  }
  .pros-cons-grid { grid-template-columns: 1fr 1fr; }
  .review-body table, .entry-content table {
    display: table;
  }
  .review-body td, .entry-content td { white-space: normal; }

  /* Archive */
  .archive-layout {
    flex-direction: row;
  }
  .archive-sidebar {
    display: block; width: 240px; flex-shrink: 0;
  }
  .archive-main { flex: 1; min-width: 0; }
  .archive-main .tools-grid { grid-template-columns: repeat(3, 1fr); }

  /* Blog page */
  .featured-post { flex-direction: row; }
  .featured-post-img { width: 50%; aspect-ratio: auto; }
  .featured-post-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
  .featured-post-title { font-size: 28px; }

  .blog-layout { display: flex; gap: 32px; }
  .blog-main { flex: 1; min-width: 0; }
  .blog-sidebar {
    display: block; width: 300px; flex-shrink: 0;
  }

  /* Blog post detail */
  .article-layout { flex-direction: row; }
  .article-body { flex: 1; min-width: 0; max-width: 680px; }
  .article-sidebar {
    display: block; width: 300px; flex-shrink: 0;
    position: sticky; top: 80px; align-self: flex-start;
  }
  .article-hero-img { aspect-ratio: 21/9; }

  /* Page hero */
  .page-hero { padding: 100px 0 48px; }
  .page-hero-title { font-size: 36px; }
  .page-hero-sub { font-size: 16px; }

  /* Related */
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===========================
   DESKTOP (≥1024px)
   =========================== */
@media (min-width: 1024px) {
  :root {
    --section-gap: 80px;
    --container-padding: 32px;
  }
  .navbar-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-light); border-radius: var(--radius-full);
    padding: 6px 16px;
  }
  .navbar-search input {
    border: none; outline: none; background: transparent;
    font-size: 14px; font-family: var(--font-body); width: 160px;
  }
  .search-icon-nav { font-size: 14px; }

  .hero-section { padding: 120px 0 80px; }
  .hero-title { font-size: 42px; }

  .cat-card { padding: 24px 20px; }
  .cat-icon { font-size: 32px; }
  .cat-name { font-size: 15px; }
}

/* ===========================
   WORDPRESS ADMIN BAR
   =========================== */
body.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .navbar { top: 46px; } }
