/* ===== CASE STUDY PAGE + INDEX ===== */
.case-study-page {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2d3748;
    background: #ffffff;
    line-height: 1.6;
}

/* Header */
.cs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem; border-bottom: 1px solid rgba(160,174,192,0.2);
    position: sticky; top: 0; background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px); z-index: 10;
}
.cs-logo img { height: 28px; display: block; }
.cs-nav { display: flex; align-items: center; gap: 1.5rem; }
.cs-nav a { color: #4a5568; text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.cs-nav a:hover { color: #1a202c; }
.cs-cta-sm { background: #2563eb; color: #fff !important; padding: 0.5rem 1rem; border-radius: 8px; }
.cs-cta-sm:hover { background: #1d4ed8; }

/* Article */
.cs-main { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.cs-back { color: #718096; text-decoration: none; font-size: 0.9rem; }
.cs-back:hover { color: #2563eb; }
.cs-category {
    display: inline-block; margin: 1rem 0 0.5rem; font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; color: #2563eb;
    background: rgba(25,118,210,0.1); padding: 0.2rem 0.6rem; border-radius: 999px;
}
.cs-title { font-size: 2.3rem; line-height: 1.2; font-weight: 700; color: #1a202c; margin: 0.4rem 0 0.6rem; }
.cs-subtitle { font-size: 1.2rem; color: #4a5568; margin: 0 0 1.75rem; }

.cs-media { margin: 1.75rem 0; }
.cs-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.cs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-hero-img { width: 100%; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); display: block; }

/* Body prose (renders the hand-finished bodyHtml) */
.cs-body { font-size: 1.05rem; color: #2d3748; }
.cs-body h2 { font-size: 1.6rem; font-weight: 700; color: #1a202c; margin: 2.25rem 0 0.75rem; }
.cs-body h3 { font-size: 1.25rem; font-weight: 600; color: #1a202c; margin: 1.75rem 0 0.5rem; }
.cs-body p { margin: 0 0 1.1rem; }
.cs-body ul, .cs-body ol { margin: 0 0 1.1rem 1.25rem; padding: 0; }
.cs-body li { margin-bottom: 0.4rem; }
.cs-body a { color: #2563eb; }
.cs-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.25rem 0; box-shadow: 0 4px 18px rgba(0,0,0,0.08); }
.cs-body figure { margin: 1.5rem 0; }
.cs-body figcaption { font-size: 0.85rem; color: #718096; text-align: center; margin-top: 0.4rem; }
.cs-body blockquote { border-left: 3px solid #2563eb; margin: 1.25rem 0; padding: 0.25rem 0 0.25rem 1rem; color: #4a5568; }
.cs-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.cs-body th, .cs-body td { border: 1px solid rgba(160,174,192,0.3); padding: 0.5rem 0.75rem; text-align: left; }

/* PDF download */
.cs-pdf { margin: 2rem 0; }
.cs-pdf-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: #fff; border: 1.5px solid #2563eb; color: #2563eb;
    padding: 0.7rem 1.25rem; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.cs-pdf-btn::before { content: "⬇"; }
.cs-pdf-btn:hover { background: #2563eb; color: #fff; }

.cs-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.cs-tag { font-size: 0.8rem; color: #4a5568; background: #f1f5f9; padding: 0.2rem 0.6rem; border-radius: 6px; }

/* CTA */
.cs-cta {
    margin-top: 3rem; padding: 2.25rem; text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid rgba(160,174,192,0.25); border-radius: 16px;
}
.cs-cta h2 { font-size: 1.5rem; color: #1a202c; margin: 0 0 0.5rem; }
.cs-cta p { color: #4a5568; margin: 0 0 1.25rem; }
.cs-cta-btn { display: inline-block; background: #2563eb; color: #fff; padding: 0.8rem 1.75rem; border-radius: 10px; font-weight: 600; text-decoration: none; }
.cs-cta-btn:hover { background: #1d4ed8; }

/* Footer */
.cs-footer { display: flex; gap: 1.5rem; justify-content: center; padding: 2rem; border-top: 1px solid rgba(160,174,192,0.2); color: #718096; font-size: 0.9rem; }
.cs-footer a { color: #718096; text-decoration: none; }
.cs-footer a:hover { color: #2563eb; }

/* Index page */
.cs-index-main { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.cs-index-head { text-align: center; margin-bottom: 2.5rem; }
.cs-index-head h1 { font-size: 2.4rem; color: #1a202c; margin: 0 0 0.5rem; }
.cs-index-head p { font-size: 1.15rem; color: #4a5568; margin: 0; }
.cs-index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.cs-index-card { display: block; text-decoration: none; color: inherit; border: 1px solid rgba(160,174,192,0.2); border-radius: 14px; overflow: hidden; background: #fff; transition: all 0.25s ease; }
.cs-index-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,0.1); border-color: rgba(25,118,210,0.35); }
.cs-index-thumb { aspect-ratio: 16 / 9; background: #f1f5f9; overflow: hidden; }
.cs-index-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-index-body { padding: 1.1rem 1.25rem 1.4rem; }
.cs-index-body h2 { font-size: 1.15rem; color: #1a202c; margin: 0.4rem 0 0.3rem; }
.cs-index-body p { font-size: 0.92rem; color: #4a5568; margin: 0; }
.cs-empty { text-align: center; color: #718096; padding: 3rem; }

/* Responsive */
@media (max-width: 900px) { .cs-index-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .cs-title { font-size: 1.8rem; }
    .cs-header { padding: 0.75rem 1rem; }
    .cs-nav { gap: 0.9rem; font-size: 0.85rem; }
}
@media (max-width: 560px) { .cs-index-grid { grid-template-columns: 1fr; } }
