/* ==========================================================================
   eBookDeep Editorial Theme
   Deep-indigo, modern academic typography & high-contrast analytical layout
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #ecfeff;
  --savings-green: #059669;
  --savings-light: #ecfdf5;
  --dark-base: #0b0f19;
  --dark-surface: #131b2e;
  --dark-card: #1e293b;
  --text-main: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--dark-base);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* Magazine Hero */
.blog-hero {
  background: linear-gradient(135deg, #0b0f19 0%, #1e1b4b 60%, #172554 100%);
  color: #fff;
  padding: 70px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.15), transparent 70%);
  pointer-events: none;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.3);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.blog-hero h1 {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.blog-hero p {
  font-size: 1.2rem;
  color: #cbd5e1;
  max-width: 740px;
  margin: 0 auto;
}

/* Featured Spotlight Section */
.featured-section {
  margin: -36px 0 44px;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 380px 1fr;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.featured-thumb {
  background: #f1f5f9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/5;
}

.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-category-pill {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.featured-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-heading);
  margin-bottom: 14px;
}

.featured-excerpt {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 22px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Search and Topic Filters */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.search-input {
  width: 100%;
  padding: 14px 22px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  outline: none;
  transition: border-color 0.15s ease;
  margin-bottom: 16px;
}

.search-input:focus {
  border-color: var(--primary);
}

.category-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-btn.active, .category-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Article Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.article-card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-thumb img {
  transform: scale(1.04);
}

.article-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Single Article Layout (Deep Dive & pSEO)
   ========================================================================== */

.breadcrumb-nav {
  padding: 24px 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb-nav a {
  color: var(--text-muted);
}

.breadcrumb-nav a:hover {
  color: var(--primary);
}

.article-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  margin-bottom: 60px;
}

.article-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.deep-dive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.article-header h1 {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  margin: 12px 0 16px;
  letter-spacing: -0.5px;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Quick Verdict Box */
.verdict-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 28px 0 36px;
}

.verdict-header {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  font-size: 0.92rem;
}

/* Price Advantage Callout */
.price-comparison-box {
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.price-box-text h4 {
  color: #065f46;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.price-box-text p {
  color: #047857;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

.price-tag-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-tag-sale {
  font-size: 2.1rem;
  font-weight: 800;
  color: #059669;
}

.price-tag-reg {
  font-size: 1.1rem;
  color: #6b7280;
  text-decoration: line-through;
}

.price-save-badge {
  background: #059669;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Table of Contents */
.toc-box {
  background: #fdfdfd;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin-bottom: 36px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
}

.toc-list a {
  color: var(--text-main);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Typography Inside Article */
.article-body {
  font-size: 1.12rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 22px;
}

.article-body ul {
  margin: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Editorial Recommendation Box (Contextual Backlink) */
.recommendation-card {
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 36px;
  margin: 40px 0;
  text-align: center;
}

.recommendation-badge {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.recommendation-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.recommendation-text {
  font-size: 1.05rem;
  color: #1e40af;
  margin-bottom: 22px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.btn-editorial-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #4f46e5;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-editorial-cta:hover {
  background: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

/* FAQ Accordion Section */
.faq-section {
  margin: 40px 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  background: #f8fafc;
  padding: 16px 22px;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 18px 22px;
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-main);
}

/* Sticky Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.book-cover-widget img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.meta-spec-table {
  width: 100%;
  font-size: 0.9rem;
  border-collapse: collapse;
}

.meta-spec-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.meta-spec-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
}

/* Legal Pages Styling */
.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  margin: 40px auto 60px;
  max-width: 900px;
  box-shadow: var(--shadow-sm);
}

.legal-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.legal-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 28px 0 12px;
}

.legal-content p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-content ul {
  margin: 0 0 22px 24px;
}

/* Footer */
footer.site-footer {
  background: #0b0f19;
  color: #94a3b8;
  padding: 64px 0 32px;
  border-top: 1px solid #1e293b;
  margin-top: 80px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.brand-col p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 450px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.92rem;
}

.footer-col ul a {
  color: #cbd5e1;
}

.footer-col ul a:hover {
  color: var(--primary);
}

.footer-disclaimer {
  background: #131b2e;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 20px 26px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: #94a3b8;
  margin-bottom: 24px;
}

.footer-disclaimer a {
  color: #38bdf8;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .article-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .blog-hero h1 {
    font-size: 2.1rem;
  }
  .article-main {
    padding: 24px;
  }
  .legal-content {
    padding: 24px;
  }
  .price-comparison-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
