.case-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    /* sizing inherited from global .hero */
    background: var(--primary-dark);
    color: var(--white);
}

.case-hero {
    position: relative;
}

/* Contact-like hero sizing and content width */
.case-hero {
    min-height: 100vh;
    padding: 160px 10% 80px;
}

.case-hero .hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.case-hero .slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.case-hero .hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 620px;
    grid-column: 1;
    justify-self: start;
    text-align: left;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.case-hero h1 {
    font-size: clamp(2.5rem, 4.8vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--white);
    text-shadow: 0 12px 30px var(--shadow-text);
}

.case-hero p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    color: var(--white);
    opacity: 0.92;
    max-width: 650px;
    line-height: 1.7;
    border-left: 3px solid var(--accent);
    padding-left: 1.8rem;
}

/* Force left/right placement to match global hero layout */
.case-hero .hero-content {
    grid-column: 1 / 2;
}

.case-hero .hero-features {
    grid-column: 2;
    justify-self: end;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-end;
    width: 230px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

.hero-features {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-end;
}

.feature-tag {
    display: flex;
    width: 100%;
    height: auto;
    align-items: center;
    justify-content: flex-start;
    padding: 1.1rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: var(--white-05);
    border: 1px solid var(--white-10);
}

.feature-tag i {
    color: var(--accent);
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.tag-text h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0;
    font-family: 'Outfit', sans-serif;
}

.feature-tag .tag-text p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--white-70);
}


.case-overview,
.challenge-solution,
.case-results,
.execution-timeline,
.case-cta {
    padding: 80px 10%;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-header .section-badge {
    display: inline-flex;
    margin-bottom: 1rem;
    color: var(--accent);
    background: var(--case-accent-light);
    padding: 0.7rem 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 3vw, 2.75rem);
    margin-bottom: 1rem;
}

.case-overview-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: start;
}

.case-copy p,
.challenge-card p,
.solution-card p {
    color: var(--text-main);
    line-height: 1.85;
}

.case-copy ul,
.challenge-card ul,
.solution-card ul {
    margin-top: 1.5rem;
    padding-left: 1.2rem;
    color: var(--text-main);
}

.case-copy ul li,
.challenge-card ul li,
.solution-card ul li {
    margin-bottom: 0.95rem;
}

.case-copy ul li::marker,
.challenge-card ul li::marker,
.solution-card ul li::marker {
    color: var(--accent);
}

.case-images {
    display: grid;
    gap: 1rem;
}

.case-image-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.case-image-card img {
    width: 100%;
    display: block;
    height: 240px;
    object-fit: cover;
    object-position: top center;
}

.case-image-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: var(--white);
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.challenge-solution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.challenge-card,
.solution-card,
.result-card {
    border-radius: 24px;
    padding: 2rem;
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.challenge-card {
    border-top: 4px solid var(--accent);
}

.solution-card {
    border-top: 4px solid var(--primary);
}

.challenge-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    background: rgba(42, 79, 161, 0.1);
    color: var(--accent);
    border-radius: 18px;
    margin-bottom: 1.25rem;
}

.challenge-card h3,
.solution-card h3,
.result-card h3 {
    margin-bottom: 1rem;
}

.case-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.result-card {
    text-align: center;
    min-height: 210px;
}

.result-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.result-card h3 {
    font-size: 1.1rem;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0;
    padding: 2rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    width: 4px;
    background: var(--primary);
    opacity: 0.15;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 52px;
    height: 52px;
    background: var(--white);
    border: 4px solid var(--accent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 2;
}

.timeline-content {
    background: var(--white);
    padding: 2.25rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--primary);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-content h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
    font-size: 1.35rem;
}

.timeline-content p {
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
}

.case-cta {
    padding-top: 80px;
    padding-bottom: 120px;
}

.case-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
    /* Use the case gradient from :root to create the blue container */
    background: var(--case-gradient-cta);
    color: var(--white);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 2.25rem 3rem;
    border-radius: 34px;
    animation: cta-float 4s ease-in-out infinite;
    box-shadow: 0 30px 60px rgba(8,24,56,0.35), 0 8px 24px rgba(26,47,95,0.18);
}

.case-cta-card h2 {
    margin: 0;
    font-size: clamp(2.25rem, 4.2vw, 3.25rem);
    color: var(--white-95);
    text-shadow: 0 18px 40px rgba(0,0,0,0.45);
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    line-height: 1.02;
}

.case-cta-card .section-badge {
    color: var(--white-90);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
}

.case-cta-card .cta-button.primary {
    padding: 0.95rem 2.25rem;
    font-size: 1rem;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(26,47,95,0.45), 0 6px 18px rgba(42,79,161,0.12);
    font-weight: 900;
    background: linear-gradient(180deg, var(--btn-gradient-start), var(--btn-gradient-end));
}

.case-cta-card .cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(26,47,95,0.45);
}

@media (max-width: 992px) {
    .case-hero,
    .case-overview-grid,
    .challenge-solution-grid {
        grid-template-columns: 1fr;
    }

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

    /* Match style.css hero 992px */
    .case-hero {
        text-align: left;
        height: auto;
        padding: 220px 5% 80px;
        min-height: 100vh;
    }

    .case-hero .hero-content {
        grid-column: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .case-hero h1 {
        font-size: 3.5rem;
        margin-bottom: 2rem;
    }

    .case-hero p {
        margin: 0 0 3rem;
        border-left: 3px solid var(--accent);
        padding-left: 2rem;
        max-width: 600px;
    }

    .case-hero .hero-btns {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
        max-width: 350px;
        align-self: center;
        margin-top: 1rem;
    }

    .case-hero .hero-btns .cta-button {
        width: 100%;
    }

    .case-hero .hero-features {
        grid-column: auto;
        display: flex !important;
        flex-direction: row;
        gap: 10px;
        align-items: stretch;
        justify-content: flex-start;
        margin-top: 1.5rem;
        width: 100%;
        min-width: 0;
    }

    .case-hero .feature-tag {
        flex: 1;
        min-width: 0;
        width: auto;
        height: auto;
        padding: 1.2rem 0.8rem;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        animation: none;
    }

    .case-hero .feature-tag i {
        font-size: 1.5rem;
        margin-right: 0;
    }

    .case-hero .feature-tag .tag-text h4 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .case-hero .feature-tag .tag-text p {
        font-size: 0.7rem;
        line-height: 1.2;
        display: block;
    }

    .case-cta-card {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .case-hero h1 {
        font-size: 2.5rem;
    }

    .case-results-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .timeline-container::before {
        left: 18px;
    }
    
    .case-overview,
    .challenge-solution,
    .case-results,
    .execution-timeline,
    .case-cta {
        padding: 60px 6%;
    }
}

@media (max-width: 576px) {
    /* Match style.css hero 576px */
    .case-hero {
        padding: 180px 5% 70px;
        min-height: 100svh;
    }

    .case-hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .case-hero p {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .case-hero .hero-btns {
        max-width: 100%;
    }

    .case-hero .feature-tag {
        padding: 0.8rem 0.4rem;
        gap: 0.5rem;
    }

    .case-hero .feature-tag i {
        font-size: 1.2rem;
    }

    .case-hero .feature-tag .tag-text h4 {
        font-size: 0.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .case-hero .feature-tag .tag-text p {
        font-size: 0.6rem;
    }
}

/* CTA animations: gentle float and shimmer to increase visibility */
@keyframes cta-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

@keyframes cta-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.case-cta-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--ease-out);
}

.case-cta-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0;
    z-index: 1;
}

/* Activate float+shimmer only on hover */
.case-cta-card:hover {
    transform: translateY(-6px);
}

.case-cta-card:hover::after {
    animation: cta-shimmer 1.2s linear 1;
    /* keep shimmer subtle so text remains readable */
    opacity: 0.12;
}

/* ensure content sits above shimmer overlay */
.case-cta-card > * {
    position: relative;
    z-index: 2;
}

/* keep the primary CTA gradient and white text on hover */
.case-cta-card .cta-button.primary:hover {
    background: linear-gradient(180deg, var(--btn-gradient-start), var(--btn-gradient-end));
    color: var(--white);
    box-shadow: 0 20px 50px rgba(8,24,56,0.35), 0 6px 18px rgba(26,47,95,0.18);
    transform: translateY(-4px);
}

.case-cta-card .cta-button.primary {
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.case-cta-card .cta-button.primary:hover {
    transform: translateY(-4px);
}
 