/* Case Study Styles — extends the DreamBIG design system */

/* ---------- Listing Page Header ---------- */
.cs-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.cs-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.cs-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.cs-content {
    padding: 60px 0 80px;
}

/* ---------- Filters ---------- */
.cs-filters {
    margin-bottom: 3rem;
    text-align: center;
}

.cs-filters h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.cs-filters .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.cs-filters .filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cs-filters .filter-btn:hover,
.cs-filters .filter-btn.active {
    border-color: #1F5A82;
    background: #1F5A82;
    color: white;
}

/* ---------- Case Study Cards ---------- */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.case-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid #63B73E;
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-left-color: #1F5A82;
}

.case-card-visual {
    height: 180px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.case-card-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.case-card-visual i {
    font-size: 3.5rem;
    color: white;
    opacity: 0.85;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.case-card:hover .case-card-visual i {
    transform: scale(1.1);
}

.case-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.case-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.case-card-division {
    background: #e0f2fe;
    color: #1F5A82;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.case-card-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.case-card-tagline {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.case-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.case-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.case-card-stat {
    font-size: 0.8rem;
    color: #6b7280;
}

.case-card-stat strong {
    color: #1F5A82;
    font-size: 1rem;
}

.case-card-link {
    color: #1F5A82;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.case-card-link:hover {
    color: #63B73E;
}

/* ---------- Status Badges ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-live {
    background: rgba(99, 183, 62, 0.15);
    color: #4c8a2f;
}

.status-testnet {
    background: rgba(31, 90, 130, 0.12);
    color: #1F5A82;
}

.status-rnd {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.status-dev {
    background: rgba(139, 92, 246, 0.12);
    color: #6d28d9;
}

/* Pulse animation for live statuses */
.status-live::before,
.status-testnet::before {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ---------- Homepage Featured Section ---------- */
.featured-cases {
    padding: 80px 0;
    background: #ffffff;
}

.featured-cases .section-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 1.1rem;
    max-width: 700px;
    margin: -1.5rem auto 3rem;
    line-height: 1.6;
}

.featured-cases .cs-grid {
    grid-template-columns: repeat(2, 1fr);
}

.featured-cases-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ---------- Division card related-case link ---------- */
.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    color: #1F5A82;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.service-link:hover {
    color: #63B73E;
}

/* ---------- Detail Page ---------- */
.cs-detail-hero {
    padding: 120px 0 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.cs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cs-breadcrumb a {
    color: #1F5A82;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cs-breadcrumb a:hover {
    color: #63B73E;
}

.cs-breadcrumb i {
    font-size: 0.7rem;
}

.cs-detail-header {
    padding-bottom: 3rem;
}

.cs-detail-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.cs-detail-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.cs-detail-tagline {
    font-size: 1.3rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.cs-detail-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-detail-tech .tech-tag {
    background: white;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

/* Detail layout */
.cs-detail-body {
    padding: 60px 0 80px;
}

.cs-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Metrics */
.cs-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.cs-metric {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cs-metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(31, 90, 130, 0.1);
}

.cs-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1F5A82;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.cs-metric-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

/* Detail sections */
.cs-section {
    margin-bottom: 3rem;
}

.cs-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.cs-section p {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

/* Approach items (numbered, like process steps) */
.cs-approach-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #63B73E;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.cs-approach-item:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(31, 90, 130, 0.1);
}

.cs-approach-number {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cs-approach-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.cs-approach-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Outcomes checklist */
.cs-outcomes {
    list-style: none;
    padding: 0;
}

.cs-outcomes li {
    color: #4b5563;
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.6;
    font-size: 1.05rem;
}

.cs-outcomes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #63B73E;
    font-weight: bold;
}

/* ---------- Detail Sidebar ---------- */
.cs-sidebar .sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #63B73E;
}

.cs-sidebar .sidebar-card h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.cs-fact-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.cs-fact-row:last-child {
    border-bottom: none;
}

.cs-fact-label {
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
}

.cs-fact-value {
    color: #1f2937;
    font-weight: 500;
    text-align: right;
}

.cs-stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* More research list */
.cs-more-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cs-more-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.cs-more-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1F5A82, #63B73E);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cs-more-icon i {
    color: white;
    font-size: 1.1rem;
}

.cs-more-item:hover .cs-more-icon {
    transform: scale(1.08);
}

.cs-more-info {
    flex: 1;
}

.cs-more-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.cs-more-item:hover .cs-more-title {
    color: #1F5A82;
}

.cs-more-division {
    font-size: 0.75rem;
    color: #6b7280;
}

/* CTA card */
.cs-cta-card {
    background: linear-gradient(135deg, #1F5A82, #63B73E) !important;
    border-left: none !important;
    text-align: center;
}

.cs-cta-card h3 {
    color: white !important;
}

.cs-cta-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.cs-cta-card .btn {
    background: white;
    color: #1F5A82;
}

.cs-cta-card .btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Error / not found state */
.cs-not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.cs-not-found i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.cs-not-found h2 {
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.cs-not-found p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .cs-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .cs-title {
        font-size: 2.25rem;
    }

    .cs-header {
        padding: 100px 0 40px;
    }

    .cs-detail-title {
        font-size: 2.1rem;
    }

    .cs-detail-tagline {
        font-size: 1.1rem;
    }

    .featured-cases .cs-grid {
        grid-template-columns: 1fr;
    }

    .cs-grid {
        grid-template-columns: 1fr;
    }

    .cs-approach-item {
        flex-direction: column;
        gap: 1rem;
    }

    .cs-approach-item:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 480px) {
    .cs-title {
        font-size: 1.9rem;
    }

    .cs-detail-title {
        font-size: 1.75rem;
    }

    .cs-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}
