/* Case study detail — matches Toada company profile slides 16–29 */

.cs-page {
    background-color: #F7F7F7;
    color: #4C489D;
    padding-top: 8rem !important;
}

.cs-page.section.intro {
    padding-bottom: 4em;
}

.cs-shell {
    width: min(100%, 1360px);
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

/* Two-column page layout: ~65% content / ~35% gallery */
.cs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    align-items: stretch;
}

.cs-main {
    min-width: 0;
}

/* Page header */
.cs-header {
    margin-bottom: 2rem;
}

.cs-meta-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: start;
    padding: 1.35rem 1.75rem;
    background: #ECECF0;
    border-radius: 4px;
}

.cs-meta-col {
    min-width: 0;
}

.cs-meta-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4C489D;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.cs-meta-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #1e1e1f;
}

.cs-meta-col--facts {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cs-meta-fact {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.cs-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4C489D;
    opacity: 0.85;
}

.cs-meta-fact .cs-meta-value {
    display: inline;
}

.cs-title {
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #4C489D;
    margin: 0 0 1.35rem;
    /* max-width: 22ch; */
}

/* Content sections */
.cs-section {
    margin-bottom: 2.5rem;
}

.cs-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
}

.cs-section-line {
    flex: 1;
    height: 1px;
    background: rgba(76, 72, 157, 0.22);
    min-width: 2rem;
}

.cs-section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4C489D;
    white-space: nowrap;
}

.cs-section-title--plain {
    margin-bottom: 0.85rem;
}

.cs-section--mandate .cs-section-head,
.cs-approach-head {
    font-size: 17px;
}

.cs-section--mandate .cs-section-title {
    font-size: 1em;
}

.cs-section--mandate .cs-diamonds span,
.cs-approach-head .cs-diamonds span {
    width: 0.65em;
    height: 0.65em;
}

.cs-section--mandate .cs-diamonds,
.cs-approach-head .cs-diamonds {
    gap: 0.32em;
}

.cs-copy {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 500;
    color: #1e1e1f;
    margin: 0;
    max-width: 52ch;
}

/* Diamond accents */
.cs-diamonds {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.cs-diamonds span {
    display: block;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border-radius: 1px;
}

.cs-diamonds--purple span {
    background: #4C489D;
}

.cs-diamonds--white span {
    background: #ffffff;
}

/* Impact section */
.cs-copy--impact {
    margin-bottom: 1.35rem;
}

.cs-impact-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2.5rem;
}

.cs-impact-kpi {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 18rem;
}

.cs-kpi-diamond {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #4C489D 0%, #3a3578 100%);
    border-radius: 3px;
    box-shadow: 0 4px 14px rgba(76, 72, 157, 0.25);
}

.cs-kpi-diamond-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    color: #ffffff;
}

.cs-kpi-keen-icon {
    display: block;
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

.cs-kpi-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.cs-kpi-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #4C489D;
}

.cs-kpi-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #1e1e1f;
}

/* Our Approach — purple band at bottom of content column */
.cs-approach-band {
    margin-top: 2.25rem;
    padding: 1.75rem 1.85rem 2rem;
    background: #4C489D;
    border-radius: 4px;
}

.cs-approach-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.cs-approach-title {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
}

.cs-approach-grid {
    display: grid;
    gap: 1.5rem 2rem;
}

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

.cs-approach-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cs-approach-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cs-approach-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cs-approach-line {
    display: block;
    width: 30%;
    height: 3px;
    background: #ffffff;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.cs-approach-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

/* Vertical wheel gallery — right column (stretches to match .cs-main) */
.cs-gallery-wheel {
    --wheel-slide-h: clamp(150px, 26vh, 210px);
    --wheel-step-gap: 20px;
    position: sticky;
    top: 7rem;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    align-items: stretch;
    gap: 1rem;
    min-width: 0;
    min-height: 100%;
    height: 100%;
}

.cs-wheel-frame {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.cs-wheel-glow {
    position: absolute;
    inset: 8% 4%;
    background: radial-gradient(
        ellipse at center,
        rgba(76, 72, 157, 0.14) 0%,
        rgba(76, 72, 157, 0.06) 45%,
        transparent 72%
    );
    filter: blur(16px);
    pointer-events: none;
    z-index: 0;
}

.cs-wheel-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 420px;
    height: 100%;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid rgba(76, 72, 157, 0.12);
    box-shadow: 0 16px 40px rgba(76, 72, 157, 0.1);
    z-index: 1;
}

.cs-gallery-wheel:not(.is-ready) .cs-wheel-slide:not([data-active="true"]) {
    visibility: hidden;
    opacity: 0;
}

.cs-wheel-mask {
    position: absolute;
    left: 0;
    right: 0;
    height: 15%;
    z-index: 4;
    pointer-events: none;
}

.cs-wheel-mask--top {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
}

.cs-wheel-mask--bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
}

.cs-wheel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.cs-wheel-slide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 1.5rem);
    margin: 0;
    transform:
        translate(-50%, calc(-50% + var(--wheel-y, 0px)))
        translateZ(var(--wheel-z, 0px))
        scale(var(--wheel-scale, 1));
    opacity: var(--wheel-opacity, 1);
    transition:
        transform 0.52s cubic-bezier(0.33, 1, 0.48, 1),
        opacity 0.4s ease,
        visibility 0.4s ease;
    will-change: transform, opacity;
    cursor: pointer;
    z-index: 1;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.cs-wheel-slide[data-active="true"] {
    cursor: default;
}

.cs-wheel-slide-inner {
    overflow: hidden;
    border-radius: 3px;
    background: #e8ebf0;
    height: var(--wheel-slide-h, clamp(150px, 26vh, 210px));
    box-shadow: 0 8px 24px rgba(26, 24, 53, 0.12);
}

.cs-wheel-slide[data-active="true"] .cs-wheel-slide-inner {
    box-shadow: 0 16px 36px rgba(76, 72, 157, 0.2);
}

.cs-wheel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-wheel-controls {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.cs-wheel-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(76, 72, 157, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: #4C489D;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(76, 72, 157, 0.08);
}

.cs-wheel-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #4C489D;
    color: #ffffff;
    border-color: #4C489D;
}

.cs-wheel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cs-wheel-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.cs-wheel-counter {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #4C489D;
    opacity: 0.75;
}

.cs-wheel-counter-current {
    color: #4C489D;
    opacity: 1;
}

.cs-wheel-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.cs-wheel-dot {
    width: 0.4rem;
    height: 0.4rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(76, 72, 157, 0.22);
    cursor: pointer;
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        width 0.25s ease;
}

.cs-wheel-dot.is-active {
    width: 1.2rem;
    background: linear-gradient(90deg, #4C489D 0%, #4C489D 100%);
}

.cs-wheel-dot:hover:not(.is-active) {
    transform: scale(1.2);
    background: rgba(76, 72, 157, 0.45);
}

.cs-legacy {
    margin-top: 0.5rem;
}

.cs-legacy .rich-text-wrap {
    max-width: 62ch;
    justify-content: flex-start;
    align-items: flex-start;
}

.cs-legacy .rich-text-wrap h4,
.cs-legacy .rich-text-wrap h6 {
    color: #4C489D !important;
    font-weight: 700 !important;
}

.cs-legacy .table-striped {
    border-collapse: collapse;
    width: 100%;
}

.cs-legacy .table-striped th,
.cs-legacy .table-striped td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: start;
}

.cs-legacy .table-striped th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.cs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(76, 72, 157, 0.18);
}

.cs-footer .go-back-button {
    color: #4C489D;
}

.cs-footer-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.75;
}

@media (max-width: 991px) {
    .cs-meta-bar {
        grid-template-columns: 1fr 1fr;
    }

    .cs-meta-col--facts {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }

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

    .cs-gallery-wheel {
        position: relative;
        top: 0;
        order: -1;
        margin-bottom: 1rem;
        min-height: auto;
        height: auto;
    }

    .cs-wheel-frame {
        flex: none;
    }

    .cs-wheel-viewport {
        flex: none;
        height: min(58vh, 460px);
        min-height: 0;
    }

    .cs-approach-grid--3,
    .cs-approach-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cs-meta-bar {
        grid-template-columns: 1fr;
        padding: 1.15rem 1.25rem;
    }

    .cs-meta-col--facts {
        flex-direction: column;
        gap: 0.65rem;
    }

    .cs-title {
        max-width: none;
    }

    .cs-impact-kpis {
        flex-direction: column;
        gap: 1rem;
    }

    .cs-approach-band {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .cs-approach-grid--2,
    .cs-approach-grid--3,
    .cs-approach-grid--4 {
        grid-template-columns: 1fr;
    }

    .cs-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-wheel-viewport {
        height: min(52vh, 380px);
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-wheel-slide,
    .cs-wheel-slide img,
    .cs-wheel-slide-inner,
    .cs-wheel-btn,
    .cs-wheel-dot {
        transition: none;
    }
}

[dir="rtl"] .cs-footer .back-arrow-icon {
    transform: scaleX(-1);
}

[dir="rtl"] .cs-section-head,
[dir="rtl"] .cs-approach-head,
[dir="rtl"] .cs-impact-kpi,
[dir="rtl"] .cs-meta-fact {
    flex-direction: row;
}

[dir="rtl"] .cs-kpi-text {
    align-items: flex-start;
    text-align: end;
}

[dir="rtl"] .cs-kpi-value,
[dir="rtl"] .cs-kpi-label {
    direction: rtl;
    unicode-bidi: plaintext;
    letter-spacing: 0;
    text-align: end;
    width: 100%;
}

