/* ============================================================
   CiCC Platform v4.0.0 — SINGLE CASE STUDY (VIP PRO)
   Result cards, testimonial blockquote, meta bar, dual-mode.
   ============================================================ */

.cs-single {
  --cs-accent: #f59e0b;  /* amber */
  --cs-accent-2: #dc2626; /* red */
  --cs-grad: linear-gradient(135deg, #f59e0b 0%, #ea580c 50%, #dc2626 100%);
}
[data-theme="dark"] .cs-single {
  --cs-accent: #fbbf24;
}

/* Page header */
.page-header.cs-header {
  position: relative; padding: calc(var(--header-height, 80px) + 48px) 0 60px;
  text-align: center; overflow: hidden; background: var(--cs-grad); color: #fff;
}
.page-header.cs-header::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(800px 400px at 70% 60%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 100%);
  z-index: 0;
}
.page-header.cs-header > * { position: relative; z-index: 1; }
.page-header.cs-header .section-tag { background: rgba(255,255,255,.18); color: #fff; }
.page-header.cs-header h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: #fff; text-shadow: 0 4px 14px rgba(0,0,0,.4);
}

/* Intro */
.cs-intro { margin: 32px 0; }
.cs-featured {
  border-radius: 20px; overflow: hidden; margin: 20px 0 28px; box-shadow: var(--shadow-card);
}
.cs-featured img { width: 100%; height: auto; display: block; }

/* Meta bar */
.cs-meta-bar {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  padding: 18px 22px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; margin-bottom: 32px; font-size: 14px; color: var(--text-secondary);
}
.cs-meta-bar span { display: inline-flex; align-items: center; gap: 6px; }
.cs-meta-bar strong { color: var(--text-primary); font-weight: 600; }

/* Blocks */
.cs-block { margin: 40px 0; }
.cs-block h2 {
  font-size: clamp(20px, 2.5vw, 26px); font-weight: 700; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px; color: var(--text-primary);
}
.cs-block h2::before {
  content: ""; width: 4px; height: 26px; background: var(--cs-grad); border-radius: 2px;
}
.cs-block p { font-size: 16px; line-height: 1.8; color: var(--text-secondary); }
.cs-block ul { padding-left: 24px; }
.cs-block li { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 6px; }

/* Results grid */
.cs-results-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px;
}
.result-card {
  text-align: center; padding: 28px 18px;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
  transition: transform .25s ease, box-shadow .25s;
}
.result-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -16px rgba(245,158,11,.4); }
.result-value { display: block; font-size: 32px; font-weight: 800; color: var(--cs-accent); line-height: 1.1; }
.result-label { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 6px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }

/* Testimonial */
.cs-testimonial {
  background: var(--bg-card); border-left: 4px solid var(--cs-accent);
  border-radius: 16px; padding: 32px; margin: 40px 0;
  box-shadow: var(--shadow-card); position: relative;
}
.cs-testimonial::before {
  content: """; font-size: 80px; font-weight: 800; line-height: 0.8;
  position: absolute; top: 8px; left: 20px; color: var(--cs-accent); opacity: .08;
  font-family: Georgia, serif;
}
.cs-testimonial blockquote {
  font-size: 18px; font-style: italic; line-height: 1.7; color: var(--text-primary);
  margin: 0; padding-left: 20px; border-left: none;
}

/* Content fallback (imported) */
.cs-content-imported h2, .cs-content-imported h3 {
  font-size: clamp(20px, 2.5vw, 26px); font-weight: 700; margin: 32px 0 16px; color: var(--text-primary);
}
.cs-content-imported p { font-size: 16px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }

/* Related eco reuse */
.cs-related-eco { margin: 48px 0; }

/* CS nav */
.cs-nav { padding: 24px 0; }
.cs-nav .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Responsive */
@media (max-width: 768px) {
  .cs-meta-bar { flex-direction: column; gap: 12px; text-align: center; }
  .cs-results-grid { grid-template-columns: 1fr; }
  .page-header.cs-header { padding: calc(var(--header-height, 80px) + 28px) 0 36px; }
  .cs-testimonial { padding: 24px 18px; }
  .cs-testimonial blockquote { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .result-card, .cs-testimonial { transition: none !important; }
  .result-card:hover { transform: none; }
}

/* === CROSS-LINK (shared with single-post) === */
.post-crosslink {
  margin: 40px 0 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(59,130,246,0.06));
  border: 1px solid rgba(124,58,237,0.16);
  padding: 26px;
  backdrop-filter: blur(10px);
}
.crosslink-inner { max-width: 1000px; margin: 0 auto; }
.crosslink-head { margin-bottom: 18px; }
.crosslink-badge {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  color: var(--primary);
  background: rgba(124,58,237,0.1);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}
.crosslink-head h3 { font-size: 1.4rem; font-weight: 800; color: var(--text-1); margin: 0; }
.crosslink-head p { color: var(--text-2); margin: 6px 0 0; font-size: 0.95rem; }
.crosslink-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.cross-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 14px;
  background: var(--bg-1); border: 1px solid var(--border-1);
  text-decoration: none; color: var(--text-1);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, border-color .25s;
}
.cross-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.35); }
.cross-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff;
}
.cross-icon svg { width: 22px; height: 22px; }
.cross-text h4 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.cross-text p { margin: 2px 0 6px; font-size: 0.82rem; color: var(--text-2); }
.cross-cta { font-size: 0.8rem; font-weight: 600; color: var(--primary); }

@media (max-width: 768px) {
  .post-crosslink { padding: 18px; }
  .crosslink-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cross-card:hover { transform: none; }
}
