/**
 * Case Studies Pages Styles
 * Phase 6: News & Case Studies
 *
 * D-08: Card grid layout matching news list style for consistency
 * D-10: Structured sections for Problem → Solution → Result
 * D-11: Each section has heading with bilingual content
 */

/* ============================================
   Cases Grid Layout (D-08)
   Matches news grid for consistency
   ============================================ */

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Tablet: 2 columns */
@media (max-width: 1199px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   Case Card Styles
   Reuses existing case-card component
   Additional styles for consistency
   ============================================ */

.case-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.case-card-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.case-card-title a {
    color: #333;
    text-decoration: none;
}

.case-card-title a:hover {
    color: #0066cc;
}

.case-card-desc {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.case-card-link {
    display: inline-block;
    color: #0066cc;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.case-card-link:hover {
    text-decoration: underline;
}

/* ============================================
   Case Detail Article (D-10)
   ============================================ */

.case-article {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
    .case-article {
        padding: 20px;
        border-radius: 0;
    }
}

/* Article Header */
.case-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.case-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    margin: 0;
}

@media (max-width: 767px) {
    .case-title {
        font-size: 24px;
    }
}

/* Featured Image */
.case-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.case-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Problem/Solution/Result Sections (D-10, D-11)
   Each with distinct visual treatment
   ============================================ */

.case-section {
    margin-bottom: 30px;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid;
}

.section-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.section-heading {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Problem Section - Red/Warning tone */
.case-problem {
    background: #fff5f5;
    border-left-color: #e53e3e;
}

.case-problem .section-icon {
    background: #fed7d7;
    color: #c53030;
}

.case-problem .section-heading {
    color: #c53030;
}

/* Solution Section - Blue/Info tone */
.case-solution {
    background: #ebf8ff;
    border-left-color: #3182ce;
}

.case-solution .section-icon {
    background: #bee3f8;
    color: #2b6cb0;
}

.case-solution .section-heading {
    color: #2b6cb0;
}

/* Result Section - Green/Success tone */
.case-result {
    background: #f0fff4;
    border-left-color: #38a169;
}

.case-result .section-icon {
    background: #c6f6d5;
    color: #2f855a;
}

.case-result .section-heading {
    color: #2f855a;
}

/* ============================================
   Rich Text Content (D-05)
   Styles for TipTap rendered content
   Reuse patterns from news.css
   ============================================ */

.section-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.section-content h1,
.section-content h2,
.section-content h3,
.section-content h4,
.section-content h5,
.section-content h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
}

.section-content h1 { font-size: 24px; }
.section-content h2 { font-size: 20px; }
.section-content h3 { font-size: 18px; }
.section-content h4 { font-size: 16px; }
.section-content h5 { font-size: 14px; }
.section-content h6 { font-size: 14px; }

.section-content p {
    margin-bottom: 12px;
}

.section-content ul,
.section-content ol {
    margin-bottom: 12px;
    padding-left: 30px;
}

.section-content li {
    margin-bottom: 6px;
}

.section-content ul li {
    list-style-type: disc;
}

.section-content ol li {
    listestyle-type: decimal;
}

.section-content a {
    color: #0066cc;
    text-decoration: underline;
}

.section-content a:hover {
    color: #0052a3;
}

.section-content strong {
    font-weight: 600;
}

.section-content em {
    font-style: italic;
}

.section-content u {
    text-decoration: underline;
}

.section-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

/* First element - no top margin */
.section-content > h1:first-child,
.section-content > h2:first-child,
.section-content > h3:first-child,
.section-content > p:first-child {
    margin-top: 0;
}

/* ============================================
   Back Link
   ============================================ */

.case-back-link {
    margin-top: 40px;
    text-align: center;
}

/* ============================================
   Breadcrumb Navigation
   Reuse from news.css
   ============================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    margin-bottom: 20px;
    color: #ccc;
}

.empty-state-text {
    font-size: 16px;
    color: #666;
}

/* ============================================
   Pagination Wrapper
   ============================================ */

.pagination-wrapper {
    margin-top: 40px;
}