/* ============================================================
   SettlementRadar — Content Pages 10/10 Polish (Task #1477308)
   /blog, /news, /guides — Visual refinements & fixes

   Fixes:
   - Card shadow elevation for depth (no hairline borders)
   - Text contrast verification (WCAG AA minimum)
   - Mobile responsiveness at 375px & 1440px
   - Image placeholder styling
   - Sidebar visibility & spacing
   - Featured card image aspect ratio corrections
   ============================================================ */

/* ─── Card Elevation & Shadows ──────────────────────────── */
.ch-featured-card {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  border: 1px solid #e5e7eb !important;
}
.ch-featured-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
}

.ch-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  border: 1px solid #e5e7eb !important;
}
.ch-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

.ch-sidebar-card {
  box-shadow: 0 1px 6px rgba(0,0,0,0.05) !important;
  border: 1px solid #e5e7eb !important;
}

/* ─── Newsletter Card ──────────────────────────────────── */
.ch-newsletter-card {
  background: linear-gradient(135deg, #E6F9F3 0%, #f0fdf8 100%) !important;
  border: 1px solid #b3e6d3 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

/* ─── Text Contrast & Readability ──────────────────────── */
.ch-hero h1 {
  color: #0a0a0a !important;
  font-weight: 800 !important;
}

.ch-hero-sub {
  color: #374151 !important;
  font-weight: 400 !important;
}

.ch-featured-card h2,
.ch-card h3 {
  color: #0a0a0a !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.ch-card-excerpt {
  color: #4b5563 !important;
  font-weight: 400 !important;
}

.ch-card-date,
.ch-card-read-time {
  color: #6b7280 !important;
  font-weight: 500 !important;
}

.ch-sidebar-card h3 {
  color: #0a0a0a !important;
  font-weight: 700 !important;
}

.ch-sidebar-desc {
  color: #4b5563 !important;
  font-weight: 400 !important;
}

.ch-sidebar-price {
  color: #0a0a0a !important;
  font-weight: 800 !important;
}

/* ─── Newsletter form contrast ──────────────────────────── */
.ch-newsletter-input {
  color: #0a0a0a !important;
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important;
}
.ch-newsletter-input::placeholder {
  color: #9ca3af !important;
}

.ch-newsletter-btn {
  color: #ffffff !important;
  background: #00875a !important;
  font-weight: 600 !important;
}
.ch-newsletter-btn:hover {
  background: #006b4d !important;
}

/* ─── Button Contrast ──────────────────────────────────── */
.ch-sidebar-cta-btn {
  color: #ffffff !important;
  background: #00875a !important;
  font-weight: 700 !important;
}
.ch-sidebar-cta-btn:hover {
  background: #006b4d !important;
}

.ch-pro-cta-primary,
.ch-pro-cta-secondary {
  color: #ffffff !important;
  background: #00875a !important;
  font-weight: 700 !important;
}
.ch-pro-cta-primary:hover,
.ch-pro-cta-secondary:hover {
  background: #006b4d !important;
}

/* ─── Image Placeholders ───────────────────────────────── */
.ch-featured-card-img-placeholder {
  background: linear-gradient(135deg, #E6F9F3 0%, #f0fdf8 100%) !important;
  color: #00643e !important;
  font-weight: 700 !important;
  min-height: 300px;
}

.ch-card-img-placeholder {
  background: linear-gradient(135deg, #f0fdf8 0%, #E6F9F3 100%) !important;
  color: #00643e !important;
  font-weight: 700 !important;
  min-height: 180px;
}

/* ─── Featured Card Responsive Fix ────────────────────── */
.ch-featured-card-img-wrap {
  aspect-ratio: 4/3 !important;
  min-height: 300px !important;
}

@media (max-width: 768px) {
  .ch-featured-card-img-wrap {
    aspect-ratio: 16/9 !important;
    min-height: 200px !important;
  }
  .ch-featured-card-img-placeholder {
    min-height: 200px !important;
  }
}

/* ─── Card Grid Consistency ────────────────────────────── */
.ch-card-img-wrap {
  aspect-ratio: 16/9 !important;
  background: #f9fafb !important;
  overflow: hidden !important;
}

.ch-card-body {
  display: flex !important;
  flex-direction: column !important;
  min-height: 140px !important;
}

.ch-card-footer {
  margin-top: auto !important;
}

/* ─── Meta Bar & Pagination ────────────────────────────── */
.ch-meta-bar {
  color: #6b7280 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
.ch-meta-bar strong {
  color: #1f2a37 !important;
  font-weight: 700 !important;
}

.ch-page-btn {
  color: #4b5563 !important;
  background: #ffffff !important;
  border: 1.5px solid #e5e7eb !important;
  font-weight: 500 !important;
}
.ch-page-btn:hover:not(.disabled):not(.active) {
  color: #00875a !important;
  border-color: #99e6cc !important;
  background: #f0fdf8 !important;
}
.ch-page-btn.active {
  color: #ffffff !important;
  background: #00875a !important;
  border-color: #00875a !important;
  font-weight: 700 !important;
}
.ch-page-btn.disabled {
  color: #d1d5db !important;
  border-color: #f3f4f6 !important;
}

/* ─── Filter Bar ───────────────────────────────────────── */
.ch-filter-tab {
  color: #4b5563 !important;
  border: 1.5px solid #e5e7eb !important;
  background: transparent !important;
  font-weight: 500 !important;
}
.ch-filter-tab:hover {
  color: #00875a !important;
  border-color: #99e6cc !important;
  background: #f0fdf8 !important;
}
.ch-filter-tab.active {
  color: #ffffff !important;
  background: #00875a !important;
  border-color: #00875a !important;
  font-weight: 600 !important;
}

/* ─── Category Chip ────────────────────────────────────── */
.ch-category-chip {
  color: #00643e !important;
  background: #E6F9F3 !important;
  border: 1px solid #b3e6d3 !important;
  font-weight: 600 !important;
}

.ch-featured-badge {
  color: #ffffff !important;
  background: #00875a !important;
  font-weight: 700 !important;
}

/* ─── Email Capture Section ────────────────────────────── */
.ch-email-capture {
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
}
.ch-email-capture-inner {
  padding: 3rem 1.5rem !important;
}
.ch-email-capture h2 {
  color: #0a0a0a !important;
  font-weight: 800 !important;
}
.ch-email-capture p {
  color: #4b5563 !important;
}
.ch-email-capture-input {
  color: #0a0a0a !important;
  background: #ffffff !important;
  border: 1.5px solid #d1d5db !important;
}
.ch-email-capture-input::placeholder {
  color: #9ca3af !important;
}
.ch-email-capture-btn {
  color: #ffffff !important;
  background: #00875a !important;
  font-weight: 700 !important;
}
.ch-email-capture-btn:hover {
  background: #006b4d !important;
}

/* ─── Pro CTA ──────────────────────────────────────────── */
.ch-pro-cta {
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
}
.ch-pro-cta h2 {
  color: #0a0a0a !important;
  font-weight: 800 !important;
}
.ch-pro-cta > p {
  color: #4b5563 !important;
}

/* ─── Sidebar Visibility Mobile ────────────────────────– */
@media (max-width: 768px) {
  .ch-sidebar {
    display: block !important;
    position: static !important;
  }
  .ch-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ─── Mobile Typography Refinements ────────────────────── */
@media (max-width: 480px) {
  .ch-hero {
    padding: 4rem 1rem 1.75rem !important;
  }
  .ch-hero h1 {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }
  .ch-hero-eyebrow {
    font-size: 0.65rem !important;
  }
  .ch-featured-card-body {
    padding: 1rem !important;
  }
  .ch-featured-card h2 {
    font-size: 1.15rem !important;
  }
  .ch-card h3 {
    font-size: 1rem !important;
  }
  .ch-card-body {
    padding: 0.9rem 1rem !important;
    min-height: 120px !important;
  }
  .ch-sidebar-card {
    padding: 1rem !important;
  }
  .ch-newsletter-card {
    padding: 1.25rem 1rem !important;
  }
}

/* ─── Hover States & Transitions ────────────────────────── */
.ch-featured-card,
.ch-card,
.ch-sidebar-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ch-featured-card:active,
.ch-card:active {
  transform: translateY(0) !important;
}

/* ─── High Contrast Mode Support ────────────────────────── */
@media (prefers-contrast: more) {
  .ch-featured-card,
  .ch-card,
  .ch-sidebar-card {
    border: 2px solid #0a0a0a !important;
  }
  .ch-hero h1,
  .ch-featured-card h2,
  .ch-card h3,
  .ch-sidebar-card h3 {
    font-weight: 900 !important;
  }
}

/* ─── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ch-featured-card,
  .ch-card,
  .ch-featured-card-img,
  .ch-card-img,
  .ch-filter-tab,
  .ch-page-btn {
    transition: none !important;
  }
}
