/* ReviewDecode blog index — SimplyCodes layout, light theme */

.blog-page {
  --blog-text: var(--text, #0f172a);
  --blog-muted: var(--muted, #5b677a);
  --blog-line: var(--line, rgba(15, 23, 42, 0.08));
  --blog-surface: var(--surfaceSolid, #fff);
  --blog-brand: var(--brand, #1a73e8);
  --blog-brand-soft: rgba(26, 115, 232, 0.1);
  --blog-brand-border: rgba(26, 115, 232, 0.35);
  padding-bottom: 0;
  color: var(--blog-text);
}

.blog-page a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Tagline hero ───────────────────────────── */
.blog-tagline-hero {
  padding: 32px 0 16px;
}

.blog-tagline-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--blog-muted);
  margin: 0 0 16px;
}

.blog-tagline-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--blog-text);
  margin: 0 0 12px;
  max-width: 560px;
}

.blog-tagline-desc {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--blog-muted);
  max-width: 520px;
  margin: 0;
}

/* ── Coming soon (empty state) ──────────────── */
.blog-coming-soon {
  padding: 24px 0 64px;
}

.blog-coming-soon__card {
  padding: 48px 40px;
  border-radius: 20px;
  border: 1px solid var(--blog-line);
  background: var(--blog-surface);
  box-shadow: var(--shadowSm, 0 8px 24px rgba(15, 23, 42, 0.06));
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.blog-coming-soon__eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blog-brand);
  margin: 0 0 12px;
}

.blog-coming-soon__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--blog-text);
}

.blog-coming-soon__desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--blog-muted);
  margin: 0 0 24px;
}

.blog-coming-soon__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--blog-brand);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 0.15s ease;
}

.blog-coming-soon__cta:hover {
  background: var(--brandDark, #1557b0);
  color: #fff !important;
}

/* ── Featured hero + filter ─────────────────── */
.blog-featured {
  padding: 24px 0 32px;
}

.blog-featured--hero-hidden .hero-card {
  display: none;
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--blog-line);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blog-muted);
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  font-family: inherit;
}

.filter-btn:hover {
  color: var(--blog-text);
  border-color: rgba(15, 23, 42, 0.22);
}

.filter-btn.is-active {
  color: var(--blog-brand);
  border-color: var(--blog-brand);
  font-weight: 600;
}

/* ── Sections ───────────────────────────────── */
.blog-section {
  padding: 48px 0;
  border-top: 1px solid var(--blog-line);
}

.blog-section.section-empty {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--blog-line);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-muted);
  text-transform: uppercase;
  letter-spacing: 0.125em;
}

.section-label svg {
  flex-shrink: 0;
  color: var(--blog-brand);
}

/* ── Grids ──────────────────────────────────── */
.post-grid {
  display: grid;
  column-gap: 32px;
  row-gap: 48px;
}

.post-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.25);
  flex-shrink: 0;
  display: inline-block;
}

/* ── Post cards ─────────────────────────────── */
.post-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8eef8;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--blog-line);
  position: relative;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
}

.post-card:hover .post-card-image img {
  opacity: 0.88;
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8eef8 0%, #dce6f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26, 115, 232, 0.25);
}

.post-card-body {
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.post-card-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--blog-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-card-category svg {
  flex-shrink: 0;
  color: var(--blog-brand);
}

.post-card[data-category="shopping-guides"] .post-card-category svg {
  color: #e1a417;
}

.post-card[data-category="methodology"] .post-card-category svg {
  color: #7c5cff;
}

.post-card[data-category="data-studies"] .post-card-category svg {
  color: #1a73e8;
}

.post-card[data-category="product-updates"] .post-card-category svg {
  color: #10b981;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--blog-text);
  margin: 0;
  transition: color 0.15s;
}

.post-card-title::after {
  content: "\2192";
  display: inline-block;
  max-width: 0;
  padding-left: 0;
  overflow: hidden;
  vertical-align: bottom;
  transition: max-width 300ms cubic-bezier(0.2, 0, 0, 1), padding-left 300ms cubic-bezier(0.2, 0, 0, 1);
}

.post-card:hover .post-card-title {
  color: var(--blog-brand);
}

.post-card:hover .post-card-title::after {
  max-width: 1.5em;
  padding-left: 8px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--blog-muted);
  margin-top: auto;
  padding-top: 8px;
}

/* Pick badge */
.post-card--pick {
  position: relative;
}

.pick-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blog-brand-soft);
  border: 1px solid var(--blog-brand-border);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pick-badge svg {
  color: var(--blog-brand);
}

.pick-badge-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Hero card ──────────────────────────────── */
.hero-card {
  display: grid;
  grid-template-columns: 55fr 45fr;
  border-radius: 16px;
  overflow: hidden;
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  box-shadow: var(--shadowSm, 0 8px 24px rgba(15, 23, 42, 0.06));
  text-decoration: none;
  color: inherit;
}

.hero-card-image {
  overflow: hidden;
  background: #e8eef8;
  border-right: 1px solid var(--blog-line);
  aspect-ratio: 16 / 9;
}

.hero-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
}

.hero-card:hover .hero-card-image img {
  opacity: 0.9;
}

.hero-card-body {
  padding: 40px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.hero-card-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--blog-text);
  margin: 0;
  transition: color 0.15s;
}

.hero-card:hover .hero-card-title {
  color: var(--blog-brand);
}

.hero-card-deck {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--blog-muted);
  margin: 0;
  flex: 1;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.hero-card-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8eef8;
  border: 1px solid var(--blog-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.hero-author-avatar img,
.hero-author-avatar .hero-author-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--blog-text);
  display: block;
}

.hero-card-date.post-card-meta {
  padding-top: 2px;
  margin-top: 0;
}

.hero-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blog-brand);
  white-space: nowrap;
}

.hero-card:hover .hero-card-cta svg {
  transform: translateX(3px);
}

.hero-card-cta svg {
  transition: transform 0.15s;
}

/* Filter / load-more states */
.post-card.card-hidden,
.hero-card.card-hidden,
.post-card.card-load-hidden {
  display: none;
}

.blog-show-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--blog-muted);
  padding: 8px 24px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-show-more:hover {
  color: var(--blog-text);
  border-color: rgba(15, 23, 42, 0.28);
}

/* ── Newsletter ─────────────────────────────── */
.blog-newsletter {
  padding: 64px 0;
  border-top: 1px solid var(--blog-line);
  background: rgba(255, 255, 255, 0.5);
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.newsletter-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 440px;
}

.newsletter-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.125em;
  color: var(--blog-muted);
  margin: 0;
}

.newsletter-heading {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--blog-text);
  margin: 0;
}

.newsletter-subtext {
  font-size: 13px;
  color: var(--blog-muted);
  line-height: 1.5;
  margin: 4px 0 0;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.newsletter-input {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--blog-surface);
  color: var(--blog-text);
  font-size: 14px;
  font-family: inherit;
  width: 240px;
  min-width: 0;
  flex: 1;
  outline: none;
  transition: border-color 0.15s;
}

.newsletter-input::placeholder {
  color: var(--blog-muted);
}

.newsletter-input:focus {
  border-color: var(--blog-brand);
}

.newsletter-submit {
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--blog-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-submit:hover {
  background: var(--brandDark, #1557b0);
}

.newsletter__message {
  width: 100%;
  font-size: 13px;
  margin: 0;
}

/* ── Go deeper ──────────────────────────────── */
.blog-go-deeper {
  padding: 64px 0 80px;
  border-top: 1px solid var(--blog-line);
}

.go-deeper-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-brand);
  text-transform: uppercase;
  letter-spacing: 0.125em;
  margin: 0 0 16px;
}

.go-deeper-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--blog-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  max-width: 600px;
}

.go-deeper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.go-deeper-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--blog-line);
  border-radius: 16px;
  background: var(--blog-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.go-deeper-card:hover {
  border-color: rgba(26, 115, 232, 0.25);
  box-shadow: var(--shadowSm, 0 8px 24px rgba(15, 23, 42, 0.06));
}

.go-deeper-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--blog-brand);
  text-transform: uppercase;
  letter-spacing: 0.125em;
  margin: 0;
}

.go-deeper-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blog-text);
  line-height: 1.3;
  margin: 0;
  transition: color 0.15s;
}

.go-deeper-card:hover .go-deeper-card-title {
  color: var(--blog-brand);
}

.go-deeper-card-desc {
  font-size: 13px;
  color: var(--blog-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.go-deeper-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blog-brand);
  margin-top: 4px;
}

.go-deeper-card:hover .go-deeper-card-link svg {
  transform: translateX(2px);
}

.go-deeper-card-link svg {
  transition: transform 0.15s;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .post-grid--3 {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-card-image {
    border-right: none;
    border-bottom: 1px solid var(--blog-line);
  }
}

@media (max-width: 768px) {
  .post-grid--3 {
    grid-template-columns: 1fr;
  }

  .blog-featured {
    padding: 24px 0;
  }

  .blog-section {
    padding: 32px 0;
  }

  .hero-card-body {
    padding: 24px 16px 20px;
  }

  .hero-card-deck {
    display: none;
  }

  .newsletter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .newsletter-form {
    width: 100%;
  }

  .newsletter-input {
    width: 100%;
  }

  .go-deeper-grid {
    grid-template-columns: 1fr;
  }

  .blog-coming-soon__card {
    padding: 32px 24px;
  }
}
