/* Case Study Page Styles */

/* Hero Section - Contained Style */
.case-study-hero {
    padding: 60px 30px 40px;
    /* Adjusted padding */
    background: linear-gradient(135deg, #2e1065 0%, #4338ca 100%);
    /* CAVIA Gradient */
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 1280px;
    margin: 20px auto 60px;
    border-radius: 24px;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.25);
    /* CAVIA Shadow */
}

/* Spotlight Effects */
.spotlight-1 {
    position: absolute;
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.4) 0%, rgba(167, 139, 250, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.spotlight-2 {
    position: absolute;
    width: 250px;
    height: 250px;
    bottom: -50px;
    left: -50px;
    background: radial-gradient(circle, rgba(216, 180, 254, 0.3) 0%, rgba(216, 180, 254, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.case-study-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, transparent 20%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.case-study-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.case-study-subtitle {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Content Layout */
.case-study-content {
    padding: 40px 0 80px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    /* Slightly wider sidebar */
    gap: 80px;
    /* More space between content and sidebar */
}

/* Article Styling */
.main-content {
    font-family: 'Inter', sans-serif;
}

.main-content h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 50px;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.main-content h2:first-child {
    margin-top: 0;
}

.main-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 16px;
    font-weight: 600;
}

.main-content p {
    margin-bottom: 24px;
    line-height: 1.8;
    color: #334155;
    /* Slate-700 for better readability */
    font-size: 1.125rem;
    /* 18px - Article size */
}

.main-content ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.main-content li {
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 1.125rem;
    color: #334155;
    position: relative;
    padding-left: 5px;
}

/* Sidebar Styling */
.sidebar-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 30px;
    position: sticky;
    top: 120px;
    /* Account for sticky header */
}

.sidebar-box h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.key-stat {
    margin-bottom: 20px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Image Styling */
/* Image Styling */
.project-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    /* Ensure the whole illustration is visible */
    object-position: center;
    border-radius: 16px;
    margin: 40px auto 0;
    /* Space from text */
    display: block;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Stronger shadow for depth */
    position: relative;
    z-index: 2;
    /* Removed background and border to avoid "blank space" look if image is transparent or smaller */
}

/* Responsive */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar-box {
        position: static;
    }

    .case-study-hero {
        margin: 20px 15px 40px;
        /* Small margins on mobile */
        border-radius: 16px;
    }
}