/* --- Case Studies Hero (White Theme) --- */
.cases-hero-section {
    padding: 160px 0 100px;
    background-color: #ffffff; /* 70% White */
    position: relative;
    overflow: hidden;
}

/* Subtle Grid Background (Very faint) */
.subtle-grid-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(#eee 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 10;
}

/* Breadcrumb */
.cases-breadcrumb {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 40px;
}
.cases-breadcrumb a { color: #999; text-decoration: none; transition: 0.3s; }
.cases-breadcrumb a:hover { color: var(--accent-purple); }
.cases-breadcrumb span { color: #ddd; margin: 0 10px; }
.cases-breadcrumb .active { color: #000; font-weight: bold; }

/* Main Typography */
.cases-title {
    font-family: 'Audiowide', cursive;
    font-size: 4.5rem;
    color: #111; /* 25% Black */
    line-height: 1.1;
    margin-bottom: 30px;
}

.cases-lead {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    line-height: 1.8;
    margin-bottom: 60px;
}

/* Impact Bar */
.hero-impact-bar {
    display: flex;
    gap: 80px;
    border-top: 1px solid #eee;
    padding-top: 50px;
}

.impact-item {
    display: flex;
    flex-direction: column;
}

.impact-num {
    font-family: 'Audiowide', cursive;
    font-size: 2.5rem;
    color: var(--accent-purple); /* 5% Purple */
    margin-bottom: 5px;
}

.impact-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #999;
    letter-spacing: 1px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .cases-title { font-size: 3.5rem; }
    .hero-impact-bar { gap: 40px; }
}

@media (max-width: 768px) {
    .cases-hero-section { padding: 120px 0 60px; }
    .cases-title { font-size: 2.5rem; }
    .cases-lead { font-size: 0.95rem; }
    
    .hero-impact-bar { 
        flex-direction: column; 
        gap: 30px; 
        padding-top: 30px;
    }
    
    .impact-num { font-size: 2rem; }
}
/* --- Case Preview Grid --- */
.case-grid-section { padding: 80px 0; background: #fff; }
.grid-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

.case-card {
    background: #f8f8f8;
    padding: 40px;
    border-left: 4px solid #eee;
    transition: 0.4s;
}

.case-card:hover {
    border-left-color: var(--accent-purple);
    background: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    transform: translateY(-5px);
}

.case-tag { font-family: 'Space Mono', monospace; font-size: 0.65rem; color: var(--accent-purple); margin-bottom: 15px; letter-spacing: 2px; }
.case-card h3 { font-family: 'Audiowide', cursive; color: #111; margin-bottom: 15px; font-size: 1.4rem; }
.case-card p { font-family: 'Space Mono', monospace; color: #666; font-size: 0.9rem; margin-bottom: 25px; line-height: 1.6; }

.case-mini-stats { display: flex; gap: 20px; margin-bottom: 30px; }
.case-mini-stats span { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: #999; }
.case-mini-stats strong { color: #111; font-size: 1rem; }

.case-view-btn {
    font-family: 'Audiowide', cursive;
    font-size: 0.8rem;
    color: #111;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.case-view-btn:hover { color: var(--accent-purple); gap: 20px; }

/* --- THE DEEP DIVE SECTION --- */
.case-detail-deep {
    padding: 150px 0;
    background: #000;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* THE AMAZING EFFECT: A moving "Purple Nebula" */
.detail-bg-animation {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(160, 32, 240, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(160, 32, 240, 0.1) 0%, transparent 50%);
    animation: nebulaMove 10s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes nebulaMove {
    0% { transform: scale(1) translate(0,0); }
    100% { transform: scale(1.2) translate(5%, 5%); }
}

.detail-wrapper {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 100px;
}

.detail-text-content { flex: 2; }
.detail-label { font-family: 'Space Mono', monospace; color: var(--accent-purple); font-size: 0.8rem; letter-spacing: 4px; }
.detail-title { font-family: 'Audiowide', cursive; font-size: 3.5rem; margin: 20px 0 40px; }

.detail-story h4 { font-family: 'Audiowide', cursive; color: var(--accent-purple); margin-top: 30px; font-size: 0.9rem; letter-spacing: 1px; }
.detail-story p { font-family: 'Space Mono', monospace; color: #aaa; line-height: 1.8; margin-top: 10px; }

/* Visual Metric Circle */
.detail-visual-metric { flex: 1; display: flex; justify-content: center; }
.metric-circle {
    width: 250px; height: 250px;
    border: 1px solid rgba(160, 32, 240, 0.3);
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: 0 0 50px rgba(160, 32, 240, 0.2);
    animation: pulseCircle 3s ease-in-out infinite;
}

@keyframes pulseCircle {
    0%, 100% { transform: scale(1); border-color: rgba(160, 32, 240, 0.3); }
    50% { transform: scale(1.05); border-color: var(--accent-purple); }
}

.metric-val { font-family: 'Audiowide', cursive; font-size: 3rem; color: #fff; }
.metric-txt { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--accent-purple); letter-spacing: 2px; }

/* RESPONSIVE */
@media (max-width: 992px) {
    .grid-layout { grid-template-columns: 1fr; }
    .detail-wrapper { flex-direction: column; gap: 50px; }
    .detail-title { font-size: 2.5rem; }
}
/* VA Theme: Flip the layout (Metric on left) */
.va-theme .detail-wrapper {
    flex-direction: row-reverse;
}

.va-theme .detail-bg-animation {
    background: radial-gradient(circle at 70% 20%, rgba(160, 32, 240, 0.12) 0%, transparent 60%);
}

/* Ecom Theme: Electric Blue/Purple Mix */
.ecom-theme .detail-bg-animation {
    background: radial-gradient(circle at 50% 50%, rgba(160, 32, 240, 0.08) 0%, transparent 70%),
                radial-gradient(circle at 10% 80%, rgba(0, 255, 136, 0.03) 0%, transparent 40%);
}

/* Smooth Scroll for the buttons */
html {
    scroll-behavior: smooth;
}

/* Hover effect for the view buttons in the grid */
.case-view-btn i {
    transition: transform 0.3s ease;
}

.case-view-btn:hover i {
    transform: translateX(8px);
}
/* --- Global Detail Section Mobile Fix --- */
@media (max-width: 992px) {
    .case-detail-deep {
        padding: 80px 0; /* Reduced padding for mobile */
    }

    .detail-wrapper {
        flex-direction: column-reverse !important; /* Stack: Metric on Top, Text on Bottom */
        gap: 40px;
        text-align: center;
    }

    /* Fix for the flipped VA theme on mobile */
    .va-theme .detail-wrapper {
        flex-direction: column-reverse !important; 
    }

    .detail-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .detail-story {
        text-align: left; /* Keep story text readable */
        padding: 0 10px;
    }

    .detail-visual-metric {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    /* Scale the circle for small screens */
    .metric-circle {
        width: 180px;
        height: 180px;
    }

    .metric-val {
        font-size: 2.2rem;
    }

    .metric-txt {
        font-size: 0.6rem;
    }
}

/* Extra small screen optimization (iPhone SE etc) */
@media (max-width: 480px) {
    .detail-title {
        font-size: 1.8rem;
    }
    
    .detail-story h4 {
        font-size: 0.8rem;
    }
    
    .detail-story p {
        font-size: 0.85rem;
    }
}

/* --- CRM Theme Specific Glow --- */
.crm-theme .detail-bg-animation {
    background: radial-gradient(circle at 10% 10%, rgba(160, 32, 240, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}