.courses-wheel {
    padding: 96px 0;
    background: var(--wp--preset--color--neutral-100);
    overflow-x: hidden;
}

/* ── Header ────────────────────────────────────────────────────── */

.cw-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    max-width: 640px;
}

.cw-header-icon {
    color: var(--wp--preset--color--purple-500);
    display: flex;
    align-items: center;
}

.cw-header-icon svg {
    width: 20px;
    height: 20px;
}

.cw-title {
    font-size: 48px;
    line-height: 1;
    font-weight: 700;
    color: var(--wp--preset--color--black);
    margin: 0;
}

.cw-desc {
    font-size: 20px;
    line-height: 28px;
    font-weight: 300;
    color: var(--wp--preset--color--dark);
    margin: 0;
}

/* ── Desktop ───────────────────────────────────────────────────── */

.cw-mobile {
    display: none;
}

.cw-stage {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    padding: 64px 0;
}

/* ── Wheel ─────────────────────────────────────────────────────── */

.cw-wheel-col {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    padding-left: 160px;
    padding-right: 40px;
}

.cw-wheel-wrap {
    position: relative;
    width: 560px;
    height: 560px;
}

.cw-svg {
    display: block;
    width: 560px;
    height: 560px;
}

.cw-seg {
    cursor: pointer;
    transition: opacity 0.2s, filter 0.2s;
    outline: none;
}

.cw-seg:hover,
.cw-seg:focus-visible {
    filter: brightness(1.15);
}

.cw-stage.has-selection .cw-seg.is-active {
    filter: brightness(1.12);
}

/* Icon overlays */

.cw-seg-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--wp--preset--color--white);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}

.cw-seg-icon svg,
.cw-seg-icon img {
    width: 24px;
    height: 24px;
}

/* Labels outside wheel */

.cw-seg-label {
    position: absolute;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--neutral-100);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--wp--preset--color--dark);
    box-shadow: 0 4px 7.5px rgba(0, 0, 0, .1), 0 1.5px 3px rgba(0, 0, 0, .1);
    pointer-events: none;
    text-align: center;
    max-width: 132px;
    transition: opacity 0.2s;
    /* quadrant classes set the transform */
}

.cw-seg-label--top {
    transform: translate(-50%, -100%);
}

.cw-seg-label--right {
    transform: translate(0, -50%);
}

.cw-seg-label--bottom {
    transform: translate(-50%, 0);
}

.cw-seg-label--left {
    transform: translate(-100%, -50%);
}

.cw-seg-label--alt {
    background: rgba(26, 26, 37, .55);
    border-color: var(--wp--preset--color--neutral-300);
    color: var(--wp--preset--color--white);
    backdrop-filter: blur(2px);
    box-shadow: none;
    white-space: nowrap;
    max-width: none;
}

/* ── Panel ─────────────────────────────────────────────────────── */

/* Grid overlay: placeholder and card share the same cell */
.cw-panel-col {
    flex: 0 0 440px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 560px;
}

.cw-panel-placeholder,
.cw-panel-card {
    grid-column: 1;
    grid-row: 1;
}

.cw-panel-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 48px 20px;
    opacity: 1;
    transition: opacity 0.15s ease;
    pointer-events: auto;
}

.cw-panel-placeholder p {
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: var(--wp--preset--color--neutral-300);
    margin: 0;
}

.cw-stage.has-selection .cw-panel-placeholder {
    opacity: 0;
    pointer-events: none;
}

.cw-panel-card {
    width: 400px;
    background: linear-gradient(137.15deg, var(--wp--preset--color--white) 0%, #f9fafb 100%);
    border: 1px solid #f3f4f6;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
    overflow: hidden;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.cw-stage.has-selection .cw-panel-card {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition: opacity 0.22s ease 0.12s, transform 0.22s ease 0.12s;
}

@media (max-width:1440px) {
    .cw-panel-placeholder {
        padding-bottom: 0;
    }
}

/* ── Card internals (shared desktop + mobile) ──────────────────── */

.cw-card-top-bar {
    height: 6px;
    background: linear-gradient(90deg, #fbdd01 0%, #fd4ef5 100%);
}

.cw-card-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.cw-card-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cw-card-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    color: var(--wp--preset--color--neutral-300);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cw-card-title {
    font-size: 24px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--wp--preset--color--dark);
    margin: 0;
}

.cw-card-desc {
    font-size: 14px;
    line-height: 20px;
    font-weight: 300;
    color: var(--wp--preset--color--dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cw-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cw-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--dark);
    border-radius: 4px;
    font-size: 14px;
    line-height: 20px;
    color: var(--wp--preset--color--dark);
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.cw-card-tag:hover {
    background: var(--wp--preset--color--dark);
    color: var(--wp--preset--color--white);
}

.cw-card-cta {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.cw-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--wp--preset--color--dark);
    text-decoration: none;
    transition: gap 0.15s;
}

.cw-card-link:hover {
    gap: 12px;
}

/* ── Mobile slider ─────────────────────────────────────────────── */

.cw-swiper {
    padding: 8px 0 40px;
}

@media (min-width: 768px) {
    .cw-swiper {
        padding: 8px 0 64px;
    }
}

.cw-slide {
    height: auto;
    background: var(--wp--preset--color--white);
    border: 1px solid #f3f4f6;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
    overflow: hidden;
}

.cw-swiper-pagination {
    bottom: 8px;
}

.cw-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--wp--preset--color--neutral-200);
    opacity: 1;
    border-radius: 50%;
    transition: background 0.2s, width 0.2s, height 0.2s;
}

.cw-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--wp--preset--color--dark);
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width:1366px) {
    .courses-wheel {
        padding-bottom: 48px;
    }
}

@media (max-width: 1300px) {
    .cw-stage {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 32px 0;
    }

    /* padding-top/bottom clear the outer segment labels, which are
       absolutely positioned above/below the wheel circle itself (see
       $r_label in index.php - top/bottom labels sit ~82px past the circle
       edge, plus their own height) - not just breathing room, so don't
       shrink these below what the labels actually need or they overlap the
       header above / the panel-card below. */
    .cw-wheel-col {
        flex: none;
        width: 100%;
        justify-content: center;
        padding-top: 140px;
        padding-bottom: 140px;
    }

    .cw-panel-col {
        flex: none;
        width: 100%;
        min-height: 0;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .cw-panel-card {
        width: 100%;
        max-width: 500px;
        transform: none;
        transition: opacity 0.3s ease;
    }

    .cw-stage.has-selection .cw-panel-card {
        transition: opacity 0.3s ease 0.1s;
    }
}

@media (max-width: 991px) {
    .courses-wheel {
        padding: 80px 0;
    }

    .cw-header {
        margin-bottom: 32px;
    }

    .cw-title {
        font-size: 40px;
    }

    .cw-desc {
        font-size: 18px;
        line-height: 24px;
    }

    .cw-desktop {
        display: none;
    }

    .cw-mobile {
        display: block;
    }
}


.cw-wheel-wrap {
    position: relative;
    width: 560px;
    height: 560px;
    flex: 0 0 auto;
}

@media (max-width: 1300px) {
    .cw-wheel-col {
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }
}

@media (max-width: 760px) {
    .cw-wheel-wrap {
        transform: scale(.82);
        transform-origin: center top;
        margin-bottom: -90px;
    }
}

@media (max-width: 620px) {
    .cw-wheel-wrap {
        transform: scale(.68);
        margin-bottom: -150px;
    }
}

/* ── Dark mode ─────────────────────────────────────────────────── */

html[data-theme="dark"] .courses-wheel {
    background: var(--wp--preset--color--black, #1A1A25);
}

html[data-theme="dark"] .courses-wheel .sec-headline-icon,
html[data-theme="dark"] .courses-wheel .sec-headline {
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .cw-title {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .cw-desc {
    color: rgba(255, 255, 255, .7);
}

html[data-theme="dark"] .cw-svg circle {
    fill: var(--wp--preset--color--dark, #2E2E39);
}

html[data-theme="dark"] .cw-seg {
    stroke: var(--wp--preset--color--black, #1A1A25);
}

html[data-theme="dark"] .cw-seg-label:not(.cw-seg-label--alt) {
    background: var(--wp--preset--color--dark, #2E2E39);
    border-color: rgba(255, 255, 255, .12);
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .cw-panel-placeholder p {
    color: rgba(255, 255, 255, .5);
}

html[data-theme="dark"] .cw-panel-card {
    background: var(--wp--preset--color--dark, #2E2E39);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .cw-card-badge {
    color: rgba(255, 255, 255, .5);
}

html[data-theme="dark"] .cw-card-title,
html[data-theme="dark"] .cw-card-desc {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .cw-card-tag {
    background: transparent;
    border-color: rgba(255, 255, 255, .3);
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .cw-card-tag:hover {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--dark, #2E2E39);
}

html[data-theme="dark"] .cw-card-link {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .cw-slide {
    background: var(--wp--preset--color--dark, #2E2E39);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .cw-swiper-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, .2);
}

html[data-theme="dark"] .cw-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--wp--preset--color--white);
}