/* =========================================================
   blog-pages.css — Blog (10 articles + index)
   Used by: /blog/ + /blog/<slug>/
   ========================================================= */

/* ---- Blog page wrapper ---- */
.page-blog {
  background: #fafbfc;
}

/* ---- Article meta (author + reading time) ---- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- TL;DR Box (AEO-critical) ---- */
.tldr-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 6px solid #f59e0b;
  border-radius: 0 14px 14px 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.10);
}

.tldr-box h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: #78350f;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tldr-box h2::before {
  content: '⚡';
  font-size: 1.4rem;
}

.tldr-box ul {
  margin: 0;
  padding-left: 1.4rem;
  color: #1f2937;
  line-height: 1.75;
}

.tldr-box ul li { margin-bottom: 0.5rem; }
.tldr-box ul li strong { color: #78350f; }

/* ---- Table of Contents ---- */
.toc-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.toc-box h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #0f172a;
  font-weight: 700;
}

.toc-box h2::before {
  content: '📑';
  margin-right: 0.5rem;
}

.toc-box ol {
  margin: 0;
  padding-left: 1.5rem;
  counter-reset: toc-counter;
  list-style: none;
}

.toc-box ol li {
  counter-increment: toc-counter;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 0.5rem;
}

.toc-box ol li::before {
  content: counter(toc-counter) '.';
  position: absolute;
  left: -1.4rem;
  font-weight: 700;
  color: #0891b2;
}

.toc-box ol li a {
  color: #1e40af;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.65;
}

.toc-box ol li a:hover {
  color: #0c4a6e;
  text-decoration: underline;
}

/* ---- Article body sections ---- */
.article-section {
  margin: 2.5rem 0;
}

.article-section h2 {
  font-size: 1.7rem;
  margin: 0 0 1rem;
  color: #0f172a;
  font-weight: 800;
  scroll-margin-top: 2rem;
  letter-spacing: -0.01em;
}

.article-section h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: #1e293b;
  font-weight: 700;
}

.article-section p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #334155;
  margin: 0 0 1rem;
}

.article-section ul,
.article-section ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: #334155;
  line-height: 1.75;
}

.article-section ul li,
.article-section ol li { margin-bottom: 0.4rem; }

/* ---- Article comparison table ---- */
.article-table-wrapper {
  margin: 1.5rem 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
}

.article-table thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
}

.article-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
}

.article-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
  font-size: 0.95rem;
}

.article-table tr:last-child td { border-bottom: none; }
.article-table tr:nth-child(even) td { background: #f8fafc; }
.article-table .recommended-row td { background: #ecfdf5 !important; font-weight: 600; }

/* ---- Pull quote / highlight box ---- */
.highlight-box {
  background: #f0f9ff;
  border-left: 5px solid #0891b2;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #0c4a6e;
  font-style: italic;
}

.highlight-box::before {
  content: '💡 ';
  font-style: normal;
  font-size: 1.2rem;
}

/* ---- Conclusion / CTA box ---- */
.article-conclusion {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.article-conclusion h2 {
  color: #ffffff;
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.article-conclusion p {
  color: rgba(255,255,255,0.92);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ---- Recommendation grid (article section) ---- */
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.rec-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: 5px solid var(--rec-color, #0891b2);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.rec-card.is-best { --rec-color: #f59e0b; }
.rec-card.is-budget { --rec-color: #10b981; }
.rec-card.is-premium { --rec-color: #7c3aed; }

.rec-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
}

.rec-card .rec-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: var(--rec-color);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.rec-card ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.65;
}

.rec-card .rec-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--rec-color);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* =========================================================
   BLOG INDEX PAGE
   ========================================================= */

.blog-search-wrapper {
  margin: 2rem 0 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0891b2;
  border-radius: 14px;
}

.blog-search-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}

.blog-search-input:focus {
  outline: none;
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 2rem;
  padding: 0;
  list-style: none;
}

.blog-categories li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.blog-categories li a:hover,
.blog-categories li a.is-active {
  background: #0891b2;
  color: #ffffff;
  border-color: #0891b2;
}

/* Featured article (top of index) */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.featured-article-image {
  background-size: cover;
  background-position: center;
  min-height: 320px;
}

.featured-article-content {
  padding: 2rem;
}

.featured-article-content .featured-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.featured-article-content h2 {
  font-size: 1.65rem;
  margin: 0 0 0.85rem;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.25;
}

.featured-article-content h2 a {
  color: inherit;
  text-decoration: none;
}

.featured-article-content h2 a:hover { color: #0891b2; }

.featured-article-content p {
  color: #475569;
  line-height: 1.65;
  margin: 0 0 1rem;
}

/* Article cards grid */
.blog-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.blog-article-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.blog-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.blog-article-card .card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #f3f4f6;
  position: relative;
}
.blog-article-card .card-image::before {
  content: '📺';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  opacity: 0.2;
  z-index: 0;
}
.blog-article-card .card-image[style*="url"]::before {
  display: none;
}

.blog-article-card .card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-article-card .card-category {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.blog-article-card .card-category.cat-sport { background: #fef3c7; color: #78350f; }
.blog-article-card .card-category.cat-review { background: #ede9fe; color: #5b21b6; }
.blog-article-card .card-category.cat-tools { background: #dbeafe; color: #1e3a8a; }

.blog-article-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.35;
}

.blog-article-card h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-article-card h3 a:hover { color: #0891b2; }

.blog-article-card .card-excerpt {
  color: #475569;
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 0 0 1rem;
  flex: 1;
}

.blog-article-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
}

.blog-article-card .card-read-more {
  color: #0891b2;
  font-weight: 600;
  text-decoration: none;
}

/* Hide cards that don't match search */
.blog-article-card.is-hidden { display: none; }

.no-results {
  text-align: center;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  color: #64748b;
  display: none;
}

.no-results.is-visible { display: block; }

/* Mobile responsive */
@media (max-width: 760px) {
  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-article-image {
    min-height: 220px;
  }

  .blog-articles-grid {
    grid-template-columns: 1fr;
  }

  .article-section h2 { font-size: 1.4rem; }
  .article-section h3 { font-size: 1.1rem; }

  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .article-table-wrapper { overflow-x: auto; }
  .article-table { min-width: 540px; }

  .tldr-box,
  .toc-box,
  .article-conclusion {
    padding: 1.25rem 1.4rem;
  }
}

@media (max-width: 600px) {
  .featured-article-content h2 { font-size: 1.3rem; }
  .blog-article-card .card-body { padding: 1.2rem; }
}

/* =========================================================
   Buy Box (review articles — external retailer links)
   ========================================================= */

.buy-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #16a34a;
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.10);
}

.buy-box h3 {
  color: #15803d;
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.retailer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.retailer-list li {
  background: #ffffff;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #d1fae5;
  transition: transform 0.2s, box-shadow 0.2s;
}

.retailer-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.15);
  border-color: #16a34a;
}

.retailer-list a {
  color: #15803d;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
}

.retailer-list a::after {
  content: '↗';
  margin-left: auto;
  font-size: 0.9rem;
  opacity: 0.7;
}

.retailer-list .flag {
  font-size: 1.1rem;
}

.disclaimer {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1.25rem;
  font-style: italic;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  line-height: 1.55;
}

/* Mobile buy-box adjustments */
@media (max-width: 600px) {
  .buy-box { padding: 1.25rem 1.4rem; }
  .buy-box h3 { font-size: 1.1rem; }
  .retailer-list a { font-size: 0.92rem; }
}

