.cp-cursos {
    font-family: 'Raleway', 'Rawline', Arial, sans-serif;
}

.cp-cursos * {
    box-sizing: border-box;
}

.cp-cursos a {
    text-decoration: none;
}

/* Cabecalho: titulo + abas + botao */
.cp-head {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    margin-bottom: 52px;
}

.cp-title {
    flex: 0 0 auto;
    margin: 0;
    font-size: clamp(1.9rem, 2.9vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    color: #2c4073;
    white-space: nowrap;
}

.cp-tabs {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .cp-tabs::-webkit-scrollbar {
        display: none;
    }

    .cp-tabs li {
        flex: 0 0 auto;
        margin: 0;
    }

.cp-tab {
    display: inline-block;
    padding: 7px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    color: #2c4073;
    background: #e0e6f4;
    border-radius: 999px;
    transition: background 160ms ease, color 160ms ease;
}

    .cp-tab:hover {
        background: #d0d9ee;
    }

    .cp-tab.ativo {
        color: #fff;
        background: #3a4a9f;
    }

.cp-todas {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 44px;
    padding: 0 26px;
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #2c4073;
    border: 1.5px solid #2c4073;
    border-radius: 999px;
    transition: background 160ms ease, color 160ms ease;
}

    .cp-todas:hover {
        color: #fff;
        background: #2c4073;
    }

/* Carrossel */
.cp-wrapper {
    position: relative;
}

.cp-carousel {
    display: flex;
    gap: 46px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

    .cp-carousel::-webkit-scrollbar {
        display: none;
    }

.cp-slide {
    flex: 0 0 calc((100% - 3 * 46px) / 4);
    min-width: 0;
    scroll-snap-align: start;
}

.cp-card {
    display: block;
    color: inherit;
}

.cp-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 310 / 188;
    border-radius: 14px;
    background: #e8ecf6;
}

    .cp-thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 300ms ease;
    }

.cp-card:hover .cp-thumb img {
    transform: scale(1.04);
}

.cp-cat {
    display: block;
    margin: 16px 0 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #222;
}

.cp-nome {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.25;
    color: #2c4073;
}

.cp-card:hover .cp-nome {
    color: #3a4a9f;
}

.cp-msg {
    padding: 24px 0;
    color: #2c4073;
}

.cp-nav {
    position: absolute;
    top: 90px;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
    cursor: pointer;
    transition: background 200ms ease;
}

    .cp-nav svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: #2c4073;
        stroke-width: 2.5;
    }

    .cp-nav:hover {
        background: #2c4073;
    }

        .cp-nav:hover svg {
            stroke: #fff;
        }

    .cp-nav.prev {
        left: 10px;
    }

    .cp-nav.next {
        right: 10px;
    }

/* notebook: 3 por vez */
@media (max-width: 1199px) {
    .cp-carousel {
        gap: 28px;
    }

    .cp-slide {
        flex-basis: calc((100% - 2 * 28px) / 3);
    }

    .cp-head {
        margin-bottom: 36px;
    }
}

/* tablet: 2 por vez, abas em linha propria */
@media (max-width: 991px) {
    .cp-head {
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 26px;
    }

    .cp-title {
        order: 1;
        flex: 1 1 auto;
    }

    .cp-todas {
        order: 2;
    }

    .cp-tabs {
        order: 3;
        flex: 0 0 100%;
        gap: 10px;
    }

    .cp-carousel {
        gap: 22px;
    }

    .cp-slide {
        flex-basis: calc((100% - 22px) / 2);
    }

    .cp-nav {
        top: 70px;
        width: 40px;
        height: 40px;
    }
}

/* celular: 1 curso com espiada do proximo */
@media (max-width: 599px) {
    .cp-title {
        font-size: 1.7rem;
    }

    .cp-todas {
        min-width: 0;
        height: 38px;
        padding: 0 18px;
        font-size: 0.9rem;
    }

    .cp-tab {
        padding: 6px 16px;
        font-size: 0.85rem;
    }

    .cp-carousel {
        gap: 14px;
    }

    .cp-slide {
        flex-basis: 80%;
    }

    .cp-nav {
        display: none !important;
    }

    .cp-nome {
        font-size: 1.05rem;
    }
}
