:root {
    --cpm-yellow: #ffc814;
    --cpm-dark: #111827;
    --cpm-blue: #172554;
    --cpm-muted: #6b7280;
}


/* =========================================================
   BASE
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: #1f2937;
    background: #fff;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar-brand {
    font-weight: 900;
    letter-spacing: -.03em;
}

.navbar-brand .mark {
    color: var(--cpm-yellow);
}

.site-nav {
    background: rgba(17, 24, 39, .97);
    backdrop-filter: blur(10px);
}

.site-nav .nav-link {
    color: #e5e7eb !important;
    font-weight: 600;
}

.site-nav .nav-link:hover {
    color: var(--cpm-yellow) !important;
}


/* =========================================================
   BOTÕES
========================================================= */

.btn-cpm {
    background: var(--cpm-yellow);
    border-color: var(--cpm-yellow);
    color: #111827;
    font-weight: 800;
}

.btn-cpm:hover {
    background: #e8b400;
    border-color: #e8b400;
    color: #111827;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 600px;

    display: flex;
    align-items: center;

    position: relative;

    background: #111827;
    color: #fff;

    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(3, 7, 18, .93),
            rgba(3, 7, 18, .64) 55%,
            rgba(3, 7, 18, .28)
        );
}

.hero-bg {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 770px;
}

.hero h1 {
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.045em;

    font-size:
        clamp(
            2.8rem,
            6vw,
            5.4rem
        );
}

.hero .lead {
    font-size: 1.25rem;
    color: #e5e7eb;
}


/* =========================================================
   ELEMENTOS GERAIS
========================================================= */

.eyebrow {
    display: inline-flex;
    align-items: center;

    gap: .5rem;

    font-size: .82rem;

    text-transform: uppercase;
    letter-spacing: .12em;

    font-weight: 900;

    color: #6b7280;
}

.section-title {
    font-size:
        clamp(
            2rem,
            4vw,
            3.2rem
        );

    font-weight: 900;

    letter-spacing: -.04em;

    color: #111827;
}

.section-sub {
    font-size: 1.08rem;

    color: #6b7280;

    max-width: 720px;
}


/* =========================================================
   CARDS
========================================================= */

.card-clean {
    border:
        1px solid
        #e5e7eb;

    border-radius: 1.25rem;

    overflow: hidden;

    transition: .25s;

    background: #fff;

    height: 100%;
}

.card-clean:hover {
    transform:
        translateY(
            -4px
        );

    box-shadow:
        0 20px 50px
        rgba(
            15,
            23,
            42,
            .09
        );
}

.card-clean img {
    width: 100%;
    height: 220px;

    object-fit: cover;
}

.course-icon {
    width: 54px;
    height: 54px;

    border-radius: 16px;

    background: #fff5c2;

    display: grid;
    place-items: center;

    font-size: 1.5rem;
}


/* =========================================================
   OUTROS
========================================================= */

.trust-band {
    background: #111827;
    color: #fff;
}

.trust-stat strong {
    display: block;

    font-size: 2rem;

    color: var(--cpm-yellow);
}

.bg-soft {
    background: #f8fafc;
}

.quote {
    font-size: 1.1rem;
    line-height: 1.75;
}

.news-meta,
.muted {
    color: #6b7280;
}


/* =========================================================
   CONTEÚDO DAS NOTÍCIAS / PÁGINAS / EVENTOS
========================================================= */

.content-body {
    font-size: 1.08rem;
    line-height: 1.8;
}

.content-body img {
    max-width: 100%;
    height: auto;

    border-radius: 1rem;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    background: #0b1120;
    color: #d1d5db;
}

.footer a {
    color: #d1d5db;
    text-decoration: none;
}

.footer a:hover {
    color: var(--cpm-yellow);
}

.footer-title {
    color: #fff;
    font-weight: 800;
}


/* =========================================================
   HERO INTERNO
========================================================= */

.page-hero {
    padding:
        8rem
        0
        4rem;

    background:
        linear-gradient(
            135deg,
            #111827,
            #172554
        );

    color: #fff;
}

.page-hero h1 {
    font-weight: 900;

    letter-spacing: -.04em;
}

.badge-cpm {
    background: #fff5c2;
    color: #6b5200;
}

.contact-card {
    border: 0;

    border-radius: 1.25rem;

    box-shadow:
        0 15px 45px
        rgba(
            15,
            23,
            42,
            .08
        );
}


/* =========================================================
   CONTEÚDO DO EDITOR
========================================================= */

.content-body img,
.content-body .editor-content-image {
    max-width: 100%;
    height: auto;

    border-radius: .9rem;
}

.content-body figure.editor-image-block {
    margin:
        2rem
        0;

    text-align: center;
}

.content-body figure.editor-image-block img {
    display: inline-block;

    cursor: zoom-in;
}

.content-body figure.editor-image-block img.is-full {
    width: 100%;
}

.content-body blockquote {
    border-left:
        4px solid
        #ffc814;

    padding:
        .8rem
        1.1rem;

    margin:
        1.5rem
        0;

    background: #fff9e7;
}

.content-body h2,
.content-body h3,
.content-body h4 {
    margin-top: 1.8rem;
    margin-bottom: .8rem;

    font-weight: 800;
}


.cpm-align-left {
    text-align: left;
}

.cpm-align-center {
    text-align: center;
}

.cpm-align-right {
    text-align: right;
}


/* =========================================================
   VÍDEOS DO EDITOR
========================================================= */

.content-body .editor-video-block {
    margin:
        2rem
        0;
}

.content-body .editor-video-ratio {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    background: #000;

    border-radius: 1rem;

    overflow: hidden;
}

.content-body .editor-video-embed {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;

    background: #000;
}

.content-body .editor-content-video {
    display: block;

    width: 100%;

    max-height: 760px;

    background: #000;

    border-radius: 1rem;
}


/* =========================================================
   GALERIA DAS POSTAGENS
========================================================= */

/*
|--------------------------------------------------------------------------
| DESKTOP
|--------------------------------------------------------------------------
|
| Primeira imagem ganha destaque.
| Demais imagens formam mosaico.
|--------------------------------------------------------------------------
*/

.content-body .cpm-gallery {

    display: grid;

    grid-template-columns:
        repeat(
            12,
            minmax(
                0,
                1fr
            )
        );

    grid-auto-rows: 190px;

    gap: 10px;

    margin:
        2rem
        0;
}


.content-body .cpm-gallery-item {

    position: relative;

    grid-column:
        span 4;

    margin: 0;

    overflow: hidden;

    border-radius: 1rem;

    background: #e9eef5;

    cursor: zoom-in;

    box-shadow:
        0 10px 30px
        rgba(
            15,
            23,
            42,
            .08
        );
}


/*
|--------------------------------------------------------------------------
| PRIMEIRA FOTO
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery-item:first-child {

    grid-column:
        span 8;

    grid-row:
        span 2;
}


/*
|--------------------------------------------------------------------------
| SEGUNDA E TERCEIRA
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery-item:nth-child(2),

.content-body
.cpm-gallery-item:nth-child(3) {

    grid-column:
        span 4;
}


/*
|--------------------------------------------------------------------------
| MOSTRA NO MÁXIMO 6 MINIATURAS
|--------------------------------------------------------------------------
|
| Todas as imagens continuam disponíveis no lightbox.
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery-item:nth-child(n+7) {

    display: none;
}


/*
|--------------------------------------------------------------------------
| IMAGENS
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery img,

.content-body
.cpm-gallery
.editor-content-image {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 0;

    transition:
        transform .28s ease,
        filter .28s ease;
}


.content-body
.cpm-gallery-item:hover img {

    transform:
        scale(
            1.035
        );

    filter:
        brightness(
            .96
        );
}


/*
|--------------------------------------------------------------------------
| INDICADOR +N
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery-more {

    position: absolute;
    inset: 0;

    display: grid;
    place-items: center;

    background:
        rgba(
            7,
            12,
            24,
            .62
        );

    color: #fff;

    font-size:
        clamp(
            1.5rem,
            4vw,
            2.2rem
        );

    font-weight: 900;

    pointer-events: none;
}


/*
|--------------------------------------------------------------------------
| GALERIAS COM 4 OU MAIS
|--------------------------------------------------------------------------
*/

.content-body
.cpm-gallery:has(
    .cpm-gallery-item:nth-child(4)
)
.cpm-gallery-item {

    grid-column:
        span 4;

    grid-row:
        span 1;
}


.content-body
.cpm-gallery:has(
    .cpm-gallery-item:nth-child(4)
)
.cpm-gallery-item:first-child {

    grid-column:
        span 8;

    grid-row:
        span 2;
}


/* =========================================================
   LIGHTBOX — IMAGEM EM TELA CHEIA
========================================================= */

.cpm-lightbox {

    position: fixed;
    inset: 0;

    z-index: 1090;

    display: none;

    align-items: center;
    justify-content: center;

    padding:
        72px
        70px
        58px;

    background:
        rgba(
            3,
            7,
            18,
            .94
        );

    backdrop-filter:
        blur(
            8px
        );
}


.cpm-lightbox.is-open {
    display: flex;
}


.cpm-lightbox-image {

    display: block;

    max-width:
        min(
            1180px,
            92vw
        );

    max-height: 82vh;

    object-fit: contain;

    border-radius: .8rem;

    box-shadow:
        0 25px 70px
        rgba(
            0,
            0,
            0,
            .35
        );
}


/* =========================================================
   CONTROLES LIGHTBOX
========================================================= */

.cpm-lightbox-close,
.cpm-lightbox-prev,
.cpm-lightbox-next {

    position: absolute;

    border: 0;

    color: #fff;

    background:
        rgba(
            255,
            255,
            255,
            .12
        );

    width: 46px;
    height: 46px;

    border-radius: 999px;

    display: grid;
    place-items: center;

    font-size: 1.5rem;

    cursor: pointer;

    transition: .2s;
}


.cpm-lightbox-close:hover,
.cpm-lightbox-prev:hover,
.cpm-lightbox-next:hover {

    background:
        var(
            --cpm-yellow
        );

    color: #111827;
}


.cpm-lightbox-close {

    top: 18px;
    right: 18px;
}


.cpm-lightbox-prev {

    left: 18px;
    top: 50%;

    transform:
        translateY(
            -50%
        );
}


.cpm-lightbox-next {

    right: 18px;
    top: 50%;

    transform:
        translateY(
            -50%
        );
}


.cpm-lightbox-counter {

    position: absolute;

    bottom: 20px;
    left: 50%;

    transform:
        translateX(
            -50%
        );

    color: #fff;

    background:
        rgba(
            0,
            0,
            0,
            .4
        );

    padding:
        .35rem
        .7rem;

    border-radius: 999px;

    font-size: .85rem;
}


body.cpm-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVO
========================================================= */

@media (
    max-width: 991px
) {

    .hero {
        min-height: 520px;
    }

    .hero::before {
        background:
            rgba(
                3,
                7,
                18,
                .75
            );
    }
}


@media (
    max-width: 767px
) {

    /*
    |--------------------------------------------------------------------------
    | GALERIA MOBILE
    |--------------------------------------------------------------------------
    */

    .content-body
    .cpm-gallery {

        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        grid-auto-rows: 125px;

        gap: 7px;

        margin:
            1.5rem
            0;
    }


    .content-body
    .cpm-gallery-item,

    .content-body
    .cpm-gallery:has(
        .cpm-gallery-item:nth-child(4)
    )
    .cpm-gallery-item {

        grid-column:
            span 1;

        grid-row:
            span 1;

        border-radius: .75rem;
    }


    /*
    | Primeira imagem maior no celular
    */

    .content-body
    .cpm-gallery-item:first-child,

    .content-body
    .cpm-gallery:has(
        .cpm-gallery-item:nth-child(4)
    )
    .cpm-gallery-item:first-child {

        grid-column:
            span 2;

        grid-row:
            span 2;
    }


    /*
    |--------------------------------------------------------------------------
    | LIGHTBOX MOBILE
    |--------------------------------------------------------------------------
    */

    .cpm-lightbox {

        padding:
            62px
            14px
            54px;
    }


    .cpm-lightbox-image {

        max-width: 96vw;

        max-height: 78vh;

        border-radius: .55rem;
    }


    .cpm-lightbox-prev,
    .cpm-lightbox-next {

        top: auto;

        bottom: 14px;

        transform: none;

        width: 42px;
        height: 42px;
    }


    .cpm-lightbox-prev {
        left: 16px;
    }


    .cpm-lightbox-next {
        right: 16px;
    }


    .cpm-lightbox-counter {
        bottom: 20px;
    }

}