.cph-wrap,
.cph-wrap * {
    box-sizing: border-box;
}

.cph-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    font-family: inherit;
}

.cph-track {
    display: flex;
    width: 100%;
    height: var(--cph-height, 720px);
    min-height: var(--cph-min-height, 520px);
    gap: var(--cph-gap, 0px);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
    touch-action: pan-x;
    will-change: scroll-position;
}

.cph-track.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-behavior: auto;
}

.cph-track::-webkit-scrollbar {
    height: 8px;
}

.cph-track::-webkit-scrollbar-track {
    background: transparent;
}

.cph-track::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 999px;
}

.cph-card {
    position: relative;
    flex: 0 0 var(--cph-closed-width, 20%);
    min-width: var(--cph-closed-width, 20%);
    height: 100%;
    overflow: hidden;
    isolation: isolate;
    background-color: #111;
    transition: flex-basis 560ms cubic-bezier(0.22, 1, 0.36, 1), min-width 560ms cubic-bezier(0.22, 1, 0.36, 1), height 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cph-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--cph-image);
    background-size: cover;
    background-position: var(--cph-image-position, center center);
    transform: scale(1.015);
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.cph-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.22));
    pointer-events: none;
}

.cph-card.is-active {
    flex-basis: var(--cph-open-width, calc(var(--cph-closed-width) * 2.65));
    min-width: var(--cph-open-width, calc(var(--cph-closed-width) * 2.65));
}

.cph-card.is-active {
    z-index: 12;
    transform: translateX(var(--cph-active-shift, 0px));
}

.cph-track.is-dragging .cph-card.is-active {
    transform: translateX(0);
}

.cph-card.is-active::before {
    transform: scale(1);
    filter: none;
}

.cph-hit {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
}

.cph-title-vertical {
    position: absolute;
    left: 22px;
    bottom: 24px;
    z-index: 4;
    padding: 10px 9px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 260ms ease, transform 320ms ease;
}

.cph-title-vertical span {
    display: block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.cph-panel {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 7;
    min-height: 150px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    background: var(--cph-overlay-rgba, rgba(79, 151, 207, 0.86));
    color: #fff;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 360ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cph-card.is-active .cph-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cph-card.is-active .cph-title-vertical {
    opacity: 0;
    transform: translateY(20px);
}

.cph-content {
    width: 100%;
    max-width: 760px;
    position: relative;
    z-index: 5;
}

.cph-subtitle {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

.cph-title {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(28px, 3vw, 48px);
    line-height: 1.05;
    font-weight: 800;
    text-transform: uppercase;
}

.cph-excerpt {
    max-width: 680px;
    color: #fff;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
}

.cph-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 10px 18px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 0;
    color: #fff;
    background: transparent;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 220ms ease, color 220ms ease;
    pointer-events: auto;
}

.cph-button:hover,
.cph-button:focus {
    background: #fff;
    color: #111;
    text-decoration: none;
}

.cph-empty {
    padding: 24px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #333;
}

@media (max-width: 1024px) and (min-width: 768px) {
    .cph-card:hover,
    .cph-card.is-active {
        flex-basis: min(var(--cph-open-width, calc(var(--cph-closed-width) * 2.65)), 72vw);
        min-width: min(var(--cph-open-width, calc(var(--cph-closed-width) * 2.65)), 72vw);
    }
}

@media (max-width: 767px) {
    .cph-wrap {
        overflow: visible;
    }

    .cph-track {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        overflow-x: hidden;
        overflow-y: visible;
        cursor: default;
        touch-action: pan-y;
        scrollbar-width: none;
        -webkit-overflow-scrolling: auto;
    }

    .cph-track::-webkit-scrollbar {
        display: none;
    }

    .cph-wrap.has-mobile-active .cph-track {
        height: auto !important;
        min-height: 0 !important;
    }

    .cph-card,
    .cph-card:hover,
    .cph-wrap.has-mobile-active .cph-card,
    .cph-wrap.has-mobile-active .cph-card:hover {
        display: block;
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        flex-basis: auto !important;
        height: var(--cph-mobile-auto-height, var(--cph-mobile-height, 190px));
        min-height: var(--cph-mobile-auto-height, var(--cph-mobile-height, 190px));
        margin: 0;
        transition: height 520ms cubic-bezier(0.22, 1, 0.36, 1), min-height 520ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .cph-card.is-active,
    .cph-card.is-active:hover,
    .cph-wrap.has-mobile-active .cph-card.is-active,
    .cph-wrap.has-mobile-active .cph-card.is-active:hover {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
        flex-basis: auto !important;
        height: var(--cph-mobile-auto-active-height, var(--cph-mobile-active-height, 360px));
        min-height: var(--cph-mobile-auto-active-height, var(--cph-mobile-active-height, 360px));
    }

    .cph-card::before {
        background-position: var(--cph-mobile-image-position, left top);
        transform: scale(1.01);
    }

    .cph-card.is-active::before {
        transform: scale(1);
    }

    .cph-hit {
        z-index: 5;
    }

    .cph-title-vertical {
        left: 22px;
        bottom: 24px;
        padding: 9px 12px;
        background: rgba(0, 0, 0, 0.88);
        transform: none;
    }

    .cph-title-vertical span {
        display: block;
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 20px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: 0.03em;
        white-space: nowrap;
    }

    .cph-panel {
        left: 22px;
        right: 22px;
        bottom: 22px;
        min-height: auto;
        padding: 20px 22px;
        opacity: 0;
        transform: translateY(18px);
        pointer-events: none;
    }

    .cph-card:hover .cph-panel {
        opacity: 0;
        transform: translateY(18px);
        pointer-events: none;
    }

    .cph-card.is-active .cph-panel {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .cph-card:hover .cph-title-vertical {
        opacity: 1;
        transform: none;
    }

    .cph-card.is-active .cph-title-vertical {
        opacity: 0;
        transform: translateY(18px);
    }

    .cph-title {
        margin-bottom: 12px;
        font-size: 25px;
    }

    .cph-subtitle {
        font-size: 11px;
    }

    .cph-excerpt {
        font-size: 14px;
        line-height: 1.4;
    }
}

/* Ajustes v1.3.4 - compatibilidade com menu mobile fixo */
@media (max-width: 767px) {
    body.cpmlf-mobile-has-menu .cph-wrap {
        margin-top: 0 !important;
    }
}


/* Ajustes v1.3.5 - mobile com menu fixo CP */
@media (max-width: 767px) {
    body.cpmlf-mobile-has-menu .cph-wrap,
    body.cpmlf-mobile-has-menu .cph-track,
    body.cpmlf-mobile-has-menu .elementor-widget-cp_horizontal_portfolio,
    body.cpmlf-mobile-has-menu .elementor-widget-cp-portfolio-horizontal {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .cph-wrap[data-cph-portfolio="1"] {
        clear: both !important;
    }
}


/* Ajustes v1.3.6 - expansão desktop inteligente para a esquerda/direita */
@media (min-width: 768px) {
    .cph-card.cph-expand-left.is-active,
    .cph-card.cph-expand-right.is-active {
        z-index: 20;
    }
}


/* v1.4.0 - visual editorial e capítulos por categoria */
.cph-card-number {
    position: absolute;
    top: 28px;
    left: 24px;
    z-index: 4;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0.04em;
    pointer-events: none;
    transition: opacity 260ms ease;
}

.cph-card-cta {
    position: absolute;
    left: 24px;
    bottom: 26px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 260ms ease, transform 320ms ease;
}

.cph-card-cta-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    font-size: 23px;
    font-weight: 400;
}

.cph-title-vertical {
    bottom: 102px;
}

.cph-card.is-active .cph-card-cta,
.cph-card.is-active .cph-card-number {
    opacity: 0;
    transform: translateY(12px);
}

.cph-card.has-chapters .cph-panel {
    align-items: flex-start;
    max-height: calc(100% - 48px);
}

.cph-card.has-chapters .cph-content {
    max-width: none;
}

.cph-chapters {
    width: 100%;
}

.cph-chapters-heading {
    margin: 0 0 12px;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cph-chapters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: var(--cph-chapters-max-height, 310px);
    padding-right: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.55) transparent;
}

.cph-chapters-list::-webkit-scrollbar {
    width: 5px;
}

.cph-chapters-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.55);
    border-radius: 999px;
}

.cph-chapter-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none !important;
    transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.cph-chapter-link:hover,
.cph-chapter-link:focus-visible {
    transform: translateX(4px);
    border-color: rgba(255,255,255,.38);
    background: rgba(255,255,255,.18);
    color: #fff;
}

.cph-chapter-number {
    min-width: 28px;
    color: rgba(255,255,255,.7);
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .08em;
}

.cph-chapter-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.cph-chapter-title {
    color: inherit;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

.cph-chapter-excerpt {
    color: rgba(255,255,255,.72);
    font-size: 11px;
    line-height: 1.35;
}

.cph-chapter-arrow {
    font-size: 19px;
    line-height: 1;
    transition: transform 220ms ease;
}

.cph-chapter-link:hover .cph-chapter-arrow {
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .cph-card-number {
        top: 16px;
        left: 18px;
        font-size: 15px;
    }

    .cph-title-vertical {
        left: 18px;
        bottom: 20px;
    }

    .cph-card-cta {
        display: none;
    }

    .cph-card.has-chapters .cph-panel {
        top: 16px;
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-height: none;
        padding: 18px;
        overflow: hidden;
    }

    .cph-card.has-chapters .cph-title {
        margin-bottom: 10px;
        font-size: 21px;
    }

    .cph-chapters-heading {
        margin-bottom: 8px;
        font-size: 10px;
    }

    .cph-chapters-list {
        max-height: calc(var(--cph-mobile-active-height, 420px) - 130px);
        gap: 6px;
    }

    .cph-chapter-link {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 8px;
    }

    .cph-chapter-title {
        font-size: 12px;
    }

    .cph-chapter-excerpt {
        display: none;
    }
}


/* v1.4.1 - links dos capítulos acima das camadas de ativação do card */
.cph-card.is-active .cph-hit {
    pointer-events: none !important;
}

.cph-card.has-chapters .cph-panel,
.cph-card.has-chapters .cph-content,
.cph-card.has-chapters .cph-chapters,
.cph-card.has-chapters .cph-chapters-list {
    position: relative;
    z-index: 20;
}

.cph-chapter-link {
    position: relative;
    z-index: 30;
    pointer-events: auto !important;
    cursor: pointer !important;
}


/* v1.4.2 - estabiliza o card aberto e evita salto do painel ao navegar nos capítulos */
@media (min-width: 768px) {
    .cph-card.has-chapters .cph-panel {
        top: auto !important;
        bottom: 24px !important;
        height: auto !important;
        max-height: calc(100% - 48px) !important;
    }

    .cph-card:not(.is-active) .cph-panel {
        opacity: 0 !important;
        transform: translateY(24px) !important;
        pointer-events: none !important;
    }

    .cph-card:not(.is-active) {
        flex-basis: var(--cph-closed-width) !important;
        min-width: var(--cph-closed-width) !important;
    }
}

/* v1.4.3 - estabilizacao definitiva do painel de capitulos */
.cph-card.has-chapters {
    contain: paint;
}

.cph-card.has-chapters .cph-panel {
    top: auto !important;
    bottom: 24px !important;
    height: auto !important;
    max-height: calc(100% - 48px) !important;
    overflow: hidden !important;
}

.cph-card.has-chapters .cph-content {
    min-width: 0 !important;
}

/* O item da lista nao desloca mais o painel/card no hover. */
.cph-chapter-link:hover,
.cph-chapter-link:focus-visible {
    transform: none !important;
}

@media (max-width: 767px) {
    .cph-card.has-chapters .cph-panel {
        top: auto !important;
        right: 16px !important;
        bottom: 16px !important;
        left: 16px !important;
        height: auto !important;
        max-height: calc(100% - 32px) !important;
        overflow: hidden !important;
    }

    .cph-card.has-chapters .cph-chapters-list {
        max-height: min(var(--cph-chapters-max-height, 310px), calc(var(--cph-mobile-active-height, 420px) - 150px)) !important;
    }
}


/* v1.4.4 - corrige posicionamento exclusivo dos cards com capitulos.
   A regra da v1.4.1 aplicava position: relative ao painel e anulava
   o position: absolute original, fazendo o conteudo subir no hover. */
.cph-card.has-chapters {
    contain: none !important;
}

.cph-card.has-chapters .cph-panel {
    position: absolute !important;
    top: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 20 !important;
    width: auto !important;
    margin: 0 !important;
}

.cph-card.has-chapters .cph-content,
.cph-card.has-chapters .cph-chapters,
.cph-card.has-chapters .cph-chapters-list {
    position: relative !important;
    z-index: 21 !important;
}

@media (max-width: 767px) {
    .cph-card.has-chapters .cph-panel {
        right: 16px !important;
        bottom: 16px !important;
        left: 16px !important;
    }
}


/* v1.4.5 - o titulo vertical foi removido do markup.
   O titulo da categoria permanece apenas no painel expandido. */
.cph-title-vertical {
    display: none !important;
}
