/* ==========================================
   CASE STUDIES PAGE
   Depends on styles-denics.css
   ========================================== */

/* ------------------------------------------
   HERO
------------------------------------------ */

.casehero {
    padding: 180px 0 120px;
    background: linear-gradient(135deg, #232323 0%, #2f2f2f 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.casehero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(247,147,26,.12), transparent 50%);
    pointer-events: none;
}

.casehero .container {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.casehero h1 {
    color: white;
    margin-bottom: 24px;
}

.casehero span.highlight {
    color: var(--accent);
    margin-bottom: 24px;
}

.casehero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,.8);
    line-height: 1.8;
}


/* ------------------------------------------
   INTRO
------------------------------------------ */

.caseintro {
    padding: 100px 0;
    background: white;
}

.caseintro .container {
    max-width: 900px;
}

.caseintro p {
    font-size: 1.45rem;
    color: var(--text-muted);
    line-height: 1.9;
}
.caseintro p.muted {
    border: 1px solid var(--text-muted);
    border-radius: 12px;
    padding: 8px;
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    line-height: 2;
}

/* ------------------------------------------
   CASE LIST
------------------------------------------ */

.caselist {
    padding: 120px 0;
    background: linear-gradient(180deg, #181818 0%, #0f0f0f 100%);
}

.caselist .container {
    display: flex;
    flex-direction: column;
    gap: 80px;
}


/* ------------------------------------------
   CASE CARD
------------------------------------------ */

.casecard {
    display: flex;
    align-items: center; /* Aligns contents cleanly on a shared horizontal plane */
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.casecard:hover {
    transform: translateY(-3px);
    border-color: rgba(247,147,26,.25);
    box-shadow: 0 0px 20px rgba(250, 145, 7, 0.5);
}

.casecard.reverse .caseimage {
    left: auto;
    right: 0;
}

.casecard.reverse .casecontent {
    margin-left: 0;
    margin-right: 40%;
}


/* ------------------------------------------
   IMAGE CONTAINER (Pinned to Card Bounds)
------------------------------------------ */

.caseimage {
    width: 40%;
    flex: 0 0 40%;
    overflow: hidden;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
}

.caseimage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .8s ease;
}

.casecard:hover .caseimage img {
    transform: scale(1.04);
}


/* ------------------------------------------
   CONTENT CONTAINER (The Height Driver)
------------------------------------------ */

.casecontent {
    width: 60%;
    flex: 0 0 60%;
    padding: 50px;
    margin-left: 40%; /* Keeps text pushed clear of the left-pinned image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.casenumber {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: .18em;
    margin-bottom: 18px;
}

.casecontent h2 {
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--off-white);
}


/* ------------------------------------------
   REQUIREMENT / CHALLENGE / SOLUTION
------------------------------------------ */

.casesections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.caseblock {
    padding-left: 20px;
    border-left: 2px solid rgba(247,147,26,.25);
}

.caseblock h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--accent);
    margin-bottom: 10px;
}

.caseblock p {
    color: var(--text-muted-light);
    line-height: 1.8;
}


/* ------------------------------------------
   FEATURE TAGS
------------------------------------------ */

.featurelist {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
    padding: 0;
}

.featurelist li {
    padding: 8px 14px;
    border-radius: 999px;
    background: #fafafa;
    border: 1px solid var(--border);
    font-size: .8rem;
}


/* ------------------------------------------
   CTA
------------------------------------------ */

.casecta {
    padding: 140px 0;
    background: linear-gradient(90deg, #ff8c00, #ffb347);
    color: white;
}

.casecta .container {
    max-width: 900px;
    text-align: center;
}

.casecta h2 {
    color: white;
    margin-bottom: 24px;
}

.casecta p {
    max-width: 900px;
    margin: 0 auto 40px;
    font-size: 1.45rem;
    line-height: 2;
    color: rgba(255,255,255,.92);
}




/* ------------------------------------------
   RESPONSIVE OVERRIDES
------------------------------------------ */

@media (max-width: 991px) {
    .casecard {
        flex-direction: column;
        align-items: stretch;
    }

    .casecard.reverse .caseimage,
    .casecard.reverse .casecontent {
        order: initial;
    }

    .caseimage {
        position: relative;
        width: 100%;
        flex: 0 0 auto;
        height: 320px;
    }

    .casecontent {
        width: 100%;
        flex: 0 0 auto;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 40px;
    }

    .featurelist {
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .casehero {
        padding: 140px 0 90px;
    }

    .caseintro,
    .caselist,
    .casecta {
        padding-left: 20px;
        padding-right: 20px;
    }

    .casecontent {
        padding: 32px;
    }
}