/* Case Study Detail Frontend Styles */

.case-study-detail {
    color: #fff;
    background: #0b0f12;
    font-family: Arial, Helvetica, sans-serif;
}

.cs-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    height: 100%;
    min-height: 500px;
    background-color: #111;
}

.cs-hero .overlay {
    position: absolute;
    inset: 0;
    border-radius: 40px;
    background: linear-gradient(180deg, #00000000, #111318);
}

.cs-hero .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cs-hero h1 {
    font-size: 3rem;
    margin: 0;
    color: #fff;
    max-width: 780px;
    line-height: 1.05;
}

.cs-client-logo {
    position: absolute;
    right: 30px;
    bottom: 30px;
}

.cs-client-logo img {
    display: block;
    max-width: 200px;
    height: auto;
}

.cs-client-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 80px auto 70px;
    padding: 0 100px;
}

.cs-client-info strong {
    font-family: "Ambit";
    display: block;
    color: #f99f22;
    text-transform: uppercase;
    font-size: 25px;
    margin-bottom: 10px;
}

.cs-client-info div > div {
    font-size: 20px;
    line-height: 1.5;
}

.cs-stats {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px auto 0;
    padding: 0 24px;
    border-radius: 40px;
    background-color: #011D37;
}

.cs-stat {
    padding: 60px 24px;
    border-radius: 24px;
    color: #D9D9D9;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cs-stat .value {
    font-family: "Ambit";
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    text-align: center;
}

.cs-stat .desc {
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
}
.cs-card-first {
    background: #083C6D;
    position: relative;
    z-index: 2;
}
.cs-card-second {
    background: #0A4883;
}
.cs-card-first,
.cs-card-second {
    padding: 150px 60px 70px;
    border-radius: 40px;
    margin-top: -70px;
}

.cs-card-first h3,
.cs-card-second h3 {
    font-family: "Ambit";
    display: block;
    color: #f99f22;
    text-transform: uppercase;
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 18px;
}

.cs-card-first .content,
.cs-card-second .content {
    color: #e7eefb;
    line-height: 1.8;
}

.cs-card-first .content p {
    margin-top: 30px;
}

.cs-card-first .content ul,
.cs-card-second .content ul {
    list-style: disc inside;
}

.cs-card-first .content li,
.cs-card-second .content li {
    font-family: "Ambit";
    font-size: 26px;
}

.cs-timeline {
    margin-top: 24px;
}

.cs-timeline-entry {
    padding: 18px 0 18px 20px;
    position: relative;
}

.cs-timeline-entry strong {
    display: block;
    color: #fff;
    font-size: 26px;
    margin-bottom: 10px;
}

.cs-timeline-entry div {
    color: #d3dfea;
    line-height: 1.75;
}

.cs-testimonial {
    background: #f99f22;
    color: #111;
    padding: 32px;
    border-radius: 40px;
    margin-top: 40px;
}

.cs-testimonial .rating {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.cs-testimonial blockquote {
    margin: 0 0 16px;
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Quote-box / Testimonial Aside Styles */

.cs-testimonial-aside {
    display: flex;
    align-items: stretch;
    justify-content: end;
    margin-top: -400px;
    padding-right: 50px;
}

.cs-testimonial-inner {
    position: relative;
    background: #D9D9D9;
    border-radius: 32px;
    padding: 36px 90px 36px 36px;
    width: 100%;
    max-width: 730px;
}

.cs-testimonial-inner .quote-shap {
    position: absolute;
    bottom: -48px;
    transform: translate(-30px, -10px);
    color: #D9D9D9;
    margin-left: 80px;
}

.cs-testimonial-inner .stars {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.cs-testimonial-inner .star svg {
    width: 28px;
    height: 28px;
    color: #DB942E;
}

.cs-testimonial-inner .quote-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #081c2f;
    margin: 0 0 12px;
}

.cs-testimonial-inner .author {
    color: #000;
    font-weight: 400;
    font-style: italic;
}

.cs-testimonial-inner .quote-icon {
    position: absolute;
    right: -10px;
    top: -8px;
    opacity: 1;
    transform: rotate(10deg);
}

.cs-testimonial-inner p {
    color: #000;
    position: relative;
    z-index: 2;
}

.cs-testimonial-inner::before {
    content: "”";
    font-size: 360px;
    color: #E9FAE8;
    position: absolute;
    right: 4%;
    top: -4%;
    font-family: "Ambit";
    font-weight: 900;
    line-height: 1;
}

/* Ensure testimonial aside contrasts like homepage */

body.single-project #header {
    display: none;
}

.cs-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 0;
    color: #ffffff;
}

.cs-page-back {
    display: inline-flex;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.cs-page-back:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
}   

.cs-page-back-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-page-brand {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.cs-page-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
}

.cs-explore {
    margin: 30px auto 60px;
    padding-top: 120px;
}

.cs-explore h3 {
    margin-bottom: 40px;
    color: #FFFFFF;
    font-size: 42px;
}

.cs-explore-row {
    display: flex;
    gap: 44px;
    align-items: stretch;
    overflow: hidden;
    height: 482px;
}

.cs-explore-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    min-width: 80px;
    border-radius: 28px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: #071c33;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cs-explore-card .eyebrow {
    opacity: 0;
    transition: opacity 0.45s ease;
}

.cs-explore-card.is-expanded .eyebrow {
    opacity: 1;
}

.cs-explore-card:hover,
.cs-explore-card.is-expanded {
    flex: 2.5;
}

.cs-explore-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(7, 28, 51, 0) 0%, rgba(7, 28, 51, 0.88) 100%);
    opacity: 0.75;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cs-explore-card:not(.is-expanded)::after {
    opacity: 0.45;
}

.cs-explore-card.is-expanded::after {
    box-shadow: inset 0 -24px 60px rgba(0, 0, 0, 0.35);
}

.cs-explore-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 28, 51, 0) 0%,
        rgba(7, 28, 51, 0.4) 40%,
        rgba(7, 28, 51, 0.8) 75%,
        rgba(7, 28, 51, 0.95) 100%
    );
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.cs-explore-card:hover .cs-explore-card-overlay,
.cs-explore-card.is-expanded .cs-explore-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(7, 28, 51, 0) 0%,
        rgba(7, 28, 51, 0.3) 30%,
        rgba(7, 28, 51, 0.7) 65%,
        rgba(7, 28, 51, 0.92) 100%
    );
}

.cs-explore-card-content {
    position: relative;
    padding: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.cs-explore-card .eyebrow {
    font-family: "Ambit";
    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
    color: #F4EAE2;
    margin: 0;
}

.cs-explore-card-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.cs-explore-card.is-expanded .cs-explore-card-desc {
    opacity: 1;
    max-height: 100px;
    color: #5B7B99;
    font-size: 24px;
}

.cs-explore-card-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f99f22;
    margin-top: 4px;
    transition: all 0.4s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.cs-explore-card.is-expanded .cs-explore-card-link {
    opacity: 1;
    max-height: 40px;
}

.cs-explore-card-link::after {
    content: '\2192';
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cs-explore-card.is-expanded .cs-explore-card-link::after {
    transform: translateX(6px);
}

.cs-explore-card-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}
.cs-timeline .cs-timeline-entry:not(:last-child)::before {
    content: '';
    width: 1px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 30px;
    background-color: #D9D9D9;
}
.cs-timeline .cs-timeline-entry::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #D9D9D9;
    border-radius: 50%;
    position: absolute;
    left: -4px;
    top: 28px;
}
.cs-client-info div:last-child {
    margin-left: auto;
}

@media (max-width: 1024px) {
    .cs-explore-row {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .cs-explore-row {
        height: 300px;
    }
}

@media (max-width: 680px) {
    .cs-explore-row {
        gap: 10px;
        height: 280px;
    }

    .cs-explore-card {
        flex: 1;
    }

    .cs-explore-card:hover {
        flex: 1.8;
    }
}

.cs-explore-card-fallback {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
}

.cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(1) {
    width: 880px;
}

.cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(2),
.cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(3) {
    width: 620px;
}

/* Tablet */

@media (max-width: 1024px) {
    .cs-client-info,
    .cs-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-explore-row {
        flex-wrap: wrap;
    }

    .cs-explore-card {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }

    .cs-client-logo {
        margin: 24px auto 0;
        display: flex;
        justify-content: center;
    }
}

/* Mobile */

@media (max-width: 680px) {
    .cs-client-info,
    .cs-stats,
    .cs-explore {
        grid-template-columns: 1fr;
    }

    .cs-hero {
        padding: 60px 0 40px;
    }

    .cs-hero h1 {
        font-size: 2.2rem;
    }

    .cs-client-info {
        margin-top: 40px;
        padding: 0;
    }

    .cs-card-first,
    .cs-card-second,
    .cs-testimonial {
        padding: 105px 24px 24px;
    }

    .cs-strategy-section {
        grid-template-columns: 1fr;
    }

    .cs-testimonial-aside {
        margin-top: 20px;
        padding-right: 0;
    }
    .cs-testimonial-inner {
        max-width: unset;
        padding: 36px;
    }
    .cs-stat {
        padding: 25px;
    }
    .cs-card-first .content li, .cs-card-second .content li {
        font-size: 16px;
    }
    .cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(1),
    .cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(2),
    .cs-strategy-section .cs-card-second .cs-timeline .cs-timeline-entry:nth-child(3) {
        width: 100%;
    }
    .cs-testimonial-inner .quote-shap {
        margin-left: 40px;
        bottom: -45px;
    }
    .cs-client-info div:last-child {
        margin-left: unset;
    }
}