/* ==========================================================================
   CASE STUDY SPECIFIC OVERRIDES & LAYOUTS
   ========================================================================== */

/* --- SECTION 1: CASE STUDY HERO BANNER (Left-Aligned Overlays) --- */
.cs-hero-banner {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 480px;
    background-color: #1A1A1C;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.cs-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}


/* Sophisticated gradient overlay protective barrier to enhance text legibility */
.cs-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(26,26,28,0.9) 0%, rgba(26,26,28,0.6) 45%, rgba(26,26,28,0) 100%);
    z-index: 2;
}

.cs-hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: flex-start; /* Corrects layout behavior, locking text elements cleanly left */
}

.cs-hero-content {
    width: 50%;
    min-width: 380px;
    max-width: 550px;
    text-align: left;
}

.cs-hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.4rem;
    line-height: 1.15;
    color: var(--pure-white);
    margin-bottom: 20px;
    font-weight: 400;
}

.cs-hero-content p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--pure-white);
    margin-bottom: 36px;
    opacity: 0.9;
    line-height: 1.6;
}
/* Accessibility Color Override for the Secondary Hero Button */
.cs-hero-banner .btn-secondary {
    color: var(--pure-white) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.cs-hero-banner .btn-secondary:hover {
    background-color: var(--pure-white) !important;
    color: var(--charcoal) !important;
    border-color: var(--pure-white) !important;
}

/* --- SECTION 2: GRID OVERVIEW AND SHOWCASE --- */
.case-study-overview {
    padding: 80px 4%;
    background-color: var(--pure-white);
}

.overview-grid {
    display: grid !important;
    grid-template-columns: 1fr 1px 1fr 1px 1fr !important; /* Perfect 3-column split with vertical dividers */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.overview-column {
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.column-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--charcoal);
    letter-spacing: 1px;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.checkmark-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.checkmark-list li {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #666666;
    line-height: 1.55;
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
}

/* Custom checkmark indicator with direct color override */
.checkmark-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #53DAD5; /* Forces your brand purple/blue directly */
    font-weight: bold;
}

.final-statement {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: italic;
    color: #444444;
    line-height: 1.5;
    margin-top: auto; /* Aligns paragraph text neatly to the bottom of all columns */
}

.vertical-divider {
    background-color: rgba(0, 0, 0, 0.08);
    width: 1px;
    height: 100%;
    min-height: 300px;
}

/* --- INTERACTIVE 4-IMAGE CAROUSEL LAYOUT --- */
.cs-mockup-showcase {
    max-width: 1000px;
    margin: 80px auto 0 auto;
    padding: 0 20px;
    text-align: center;
}

.carousel-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.carousel-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 30px;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 40px; /* Base structural padding for footer navigation dots */
}

/* Master Slide Track Ring - Expanded for 4 panels */
.carousel-slides {
    display: flex;
    width: 400%; /* Accounts for 4 total screens side-by-side */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: 25%; /* Centers individual panels precisely inside container bounds */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mockup-frame {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    width: 100%;
    box-sizing: border-box;
}

.course-mockup-img-large {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.slide-caption {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #555555;
    font-style: italic;
    margin-top: 16px;
    display: block;
}

/* CAROUSEL LOGIC ENGINE VIA PURE CSS RADIO CONTROLS (Updated for 25% increments) */
#slide-1:checked ~ .carousel-slides { transform: translateX(0%); }
#slide-2:checked ~ .carousel-slides { transform: translateX(-25%); }
#slide-3:checked ~ .carousel-slides { transform: translateX(-50%); }
#slide-4:checked ~ .carousel-slides { transform: translateX(-75%); }

/* ARROW NAVIGATION STYLING */
.carousel-arrows {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 100%;
    left: 0;
    pointer-events: none; /* Prevents background layer from obstructing slide focus */
    z-index: 10;
}

.arrow-set {
    display: none;
    justify-content: space-between;
    padding: 0 40px;
}

/* Toggle Display Matrix for Active Controls */
#slide-1:checked ~ .carousel-arrows .set-1 { display: flex; }
#slide-2:checked ~ .carousel-arrows .set-2 { display: flex; }
#slide-3:checked ~ .carousel-arrows .set-3 { display: flex; }
#slide-4:checked ~ .carousel-arrows .set-4 { display: flex; }

.prev-arrow, .next-arrow {
    background-color: rgba(255, 255, 255, 0.9);
    color: #5E548E; /* Brand tone override */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    pointer-events: auto; /* Re-activates vector path cursor interaction over button bounds */
    user-select: none;
}

.prev-arrow:hover, .next-arrow:hover {
    background-color: #5E548E;
    color: var(--pure-white);
    transform: scale(1.08);
}

/* CONTAINER NAV INDICATOR DOTS */
.carousel-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot-nav {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(94, 84, 142, 0.2);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#slide-1:checked ~ .carousel-dots .dot-1,
#slide-2:checked ~ .carousel-dots .dot-2,
#slide-3:checked ~ .carousel-dots .dot-3,
#slide-4:checked ~ .carousel-dots .dot-4 {
    background-color: #5E548E; /* Fills current active navigation track element */
    transform: scale(1.2);
}

/* Mobile Responsiveness Adjustments */
@media (max-width: 768px) {
    .arrow-set {
        padding: 0 15px;
    }
    .prev-arrow, .next-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .mockup-frame {
        padding: 12px;
    }
}

/* --- SECTION 3: TIMELINE PROCESS LAYOUT --- */
.process-section {
    padding: 100px 4%;
    background-color: var(--light-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.cs-section-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: var(--charcoal);
    text-align: center;
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 70px;
}

.cs-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-purple);
    border-radius: 2px;
}

/* This container handles horizontal layout alignment */
/* This completely forces the horizontal desktop track layout */
.timeline-container {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* Locks them into 4 distinct horizontal columns */
    gap: 20px !important;
    align-items: flex-start !important;
    max-width: 1200px;
    margin: 0 auto;
}

/* Horizontal track vector running behind nodes */
.timeline-line {
    position: absolute;
    top: 35px; /* Centers vector precisely behind circular ring asset frames */
    left: 8%;
    width: 84%;
    height: 1px;
    background-color: rgba(94, 84, 142, 0.15);
    z-index: 1;
}

.timeline-node {
    position: relative;
    flex: 1;
    text-align: left;
    padding: 0 20px;
    z-index: 2;
}

.node-image-wrap {
    width: 70px;
    height: 70px;
    background-color: var(--pure-white);
    border: 1px solid rgba(94, 84, 142, 0.12);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.25s ease;
    overflow: hidden; /* Clips the timeline image to perfect circles */
}

.timeline-node:hover .node-image-wrap {
    transform: scale(1.05);
    border-color: var(--primary-purple);
}

/* Keeps the challenge and solution icons in Section 2 scaled small */
.node-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Keeps your timeline images perfectly full size inside the circles */
.timeline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-node h3 {
    font-family: var(--font-heading);
	text-align: center;
    font-size: 1.4rem;
    color: var(--charcoal);
    margin-bottom: 12px;
    font-weight: 400;
}

.timeline-node p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.55;
}

/* Ensures it collapses back into a vertical stack layout beautifully on screens like mobile phones */
/* Ensures it collapses safely back into a vertical list on smaller screens */
@media (max-width: 768px) {
    .timeline-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
    }
    .timeline-line {
        display: none !important;
    }
}

/* ==========================================================================
   RESPONSIVE LAYOUT BREAKPOINTS
   ========================================================================== */

/* Tablet Optimization */
@media (max-width: 1100px) {
    .overview-grid {
        flex-direction: column;
        gap: 50px;
    }
    
    .vertical-divider {
        display: none;
    }
    
    .cs-hero-content {
        width: 70%;
        max-width: 100%;
    }
}

/* Mobile Layout Responsive Adjustments */
@media (max-width: 768px) {
    .case-study-overview, .process-section {
        padding: 70px 4%;
    }
    
    .timeline-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .timeline-line {
        display: none;
    }
    
    .cs-hero-content h1 {
        font-size: 2.4rem;
    }
    
    .cs-hero-container {
        padding: 0 24px;
    }
    
    .cs-hero-content {
        width: 100%;
        min-width: 100%;
    }
}