/* =========================================================
   TIMELINE (estrutura base)
========================================================= */

.po-timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* cada item = coluna timeline + conteúdo */
.po-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    position: relative;
}


/* =========================================================
   LINHA VERTICAL (segmentada por item)
========================================================= */

/* usamos duas linhas para criar gap no dot */
.po-item::before,
.po-item::after {
    content: "";
    position: absolute;
    left: 30px; /* metade da coluna de 60px */
    width: 2px;
    background: #000;
    z-index: 1;
}

/* linha acima do dot */
.po-item::before {
    top: 0;
    height: 15px; /* metade do dot (30px) */
}

/* linha abaixo do dot */
.po-item::after {
    top: 45px; /* dot (30px) + metade */
    bottom: 0;
}

/* remover segmentos extremos */
.po-item:first-child::before {
    display: none;
}


/* =========================================================
   ASIDE (coluna timeline)
========================================================= */

.po-item__aside {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}


/* =========================================================
   DOT (ícone do estado)
========================================================= */

.po-item__dot {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #EDF7F4;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 2;
}

/* estados */
.po-item__dot--concluido {
    background: #EDF7F4;
}

.po-item__dot--em_curso {
    background: #EDF7F4;
}

.po-item__dot--por_iniciar {
    background: #EDF7F4;
}

/* icons */
.po-item__icon {
    width: 20px;
    height: 20px;
}

.po-item__dot--concluido .po-item__icon {
    background: url('/wp-content/plugins/portal-core/assets/images/portal-maisinvest-icon-timeline-concluida.svg') center/contain no-repeat;
}

.po-item__dot--em_curso .po-item__icon {
    background: url('/wp-content/plugins/portal-core/assets/images/portal-maisinvest-icon-timeline-em-curso.svg') center/contain no-repeat;
}

/* fallback */
.po-item__dot--por_iniciar .po-item__icon {
    background: url('/wp-content/plugins/portal-core/assets/images/portal-maisinvest-icon-timeline-por-iniciar.svg') center/contain no-repeat;
}


/* =========================================================
   CARD (conteúdo)
========================================================= */

.po-item__content {
    background: #fff;
    padding: 24px;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    gap: 20px;

    box-shadow: 0 1px 8.8px rgba(0,0,0,0.25);
}


/* HEADER */

.po-item__header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.po-badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    width: fit-content;

    font-size: 12px;
    font-weight: 400;
    line-height: 117%;
    color: #fff;
}

.po-badge--em_curso { background: #0D4679; }
.po-badge--concluido { background: #0E8766; }
.po-badge--por_iniciar {
    background: #eee;
    color: #000D19;
}


/* TITLE */

.po-item__title {
    font-family: Spectral;
    font-size: 26px;
    font-weight: 500;
    line-height: 81.5%;
    letter-spacing: -1.3px;

    color: #043729;

    margin: 25px 0 10px;
    padding-bottom: 10px;

    border-bottom: 1px solid rgba(169,168,168,0.2);
}


/* DESCRIPTION */

.po-item__desc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.po-item__desc-label {
    font-size: 12px;
    font-weight: 300;
    color: #A9A8A8;
}

.po-item__desc p {
    margin: 0;
    font-size: 14px;
    color: #051727;
}


/* FOOTER */

.po-item__footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;

    padding-top: 10px;
    border-top: 1px solid rgba(169,168,168,0.2);
}

.po-item__date {
    font-size: 12px;
    font-weight: 300;
    color: #A9A8A8;
}


/* =========================================================
   SLIDER (Embla)
========================================================= */

.embla__viewport { overflow: hidden; }

.embla__container { display: flex; }

.embla__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.embla__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* wrapper */

.po-item__media {
    width: 100%;
}

.po-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    border-radius: 10px;

    cursor: grab;
}


/* progress bar */

.po-slider__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;

    display: flex;
    gap: 5px;
    padding: 0 20px 20px;
    box-sizing: border-box;
}

.po-progress__segment {
    flex: 1;
    height: 2px;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.po-progress__segment.is-active {
    background: #fff;
}


/* =========================================================
   GRID (layout texto + imagem)
========================================================= */

.po-item__grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1000px){

    .po-item__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(42vw, 800px);
        gap: 50px;
        align-items: center;
    }

    .po-item__text {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 690px){

    .po-item {
        grid-template-columns: 40px 1fr;
        gap: 10px;
    }

    .po-item::before,
    .po-item::after {
        left: 20px;
    }
}



/* ==========================================================================
   Progresso de Obra - Modelo Único
   ========================================================================== */

.po-progress-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid rgba(5, 23, 39, 0.08);
    box-shadow: 0 14px 34px rgba(5, 23, 39, 0.06);
}

.po-progress-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
}

.po-progress-card__eyebrow {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    color: #0E8766;
    margin-bottom: 6px;
}

.po-progress-card__title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.2;
    color: #051727;
}

.po-progress-card__date {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6B7280;
}

.po-progress-card__percentage {
    flex: 0 0 auto;
    min-width: 82px;
    height: 82px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F0F8F5;
    color: #0E8766;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.po-progress-card__bar {
    height: 16px;
    background: #E8ECEB;
    border-radius: 999px;
    overflow: hidden;
}

.po-progress-card__bar span {
    display: block;
    height: 100%;
    background: #0E8766;
    border-radius: 999px;
    transition: width 0.25s ease;
}

@media (max-width: 700px) {
    .po-progress-card {
        padding: 20px;
    }

    .po-progress-card__header {
        display: grid;
        gap: 16px;
    }

    .po-progress-card__percentage {
        width: 72px;
        min-width: 72px;
        height: 72px;
        font-size: 20px;
    }
}