/* ============================================================
   Casos Destacados Widget — casos-destacados.css
   ============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.cd-wrapper {
    background-color: #e8e6e1;
    padding: 40px 48px;
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Header ───────────────────────────────────────────────── */
.cd-header {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 24px;
}

.cd-header__titulo {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    line-height: 1;
    margin: 0;
}

.cd-header__sub {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.5;
    color: #e05a2b;
    margin: 0;
    max-width: 200px;
    padding-top: 4px;
}

/* ── Divisor ──────────────────────────────────────────────── */
.cd-divider {
    height: 2px;
    background-color: #1a1a1a;
    margin-bottom: 0;
}

/* ── Lista ────────────────────────────────────────────────── */
.cd-lista {
    display: flex;
    flex-direction: column;
}

/* ── Fila de caso ─────────────────────────────────────────── */
.cd-caso {
    display: grid;
    grid-template-columns: 52px 220px 1fr 180px auto;
    align-items: center;
    gap: 16px 24px;
    padding: 20px 0;
    border-bottom: 1px solid #c8c4bb;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cd-caso:last-child {
    border-bottom: none;
}

/* Número */
.cd-caso__num {
    font-size: 2rem;
    font-weight: 700;
    color: #c8c4bb;
    line-height: 1;
    user-select: none;
}

/* Info */
.cd-caso__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cd-caso__nombre {
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    line-height: 1.2;
}

.cd-caso__entidades {
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a7870;
}

/* Progreso */
.cd-caso__progreso {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cd-barra {
    display: flex;
    gap: 3px;
    height: 22px;
}

.cd-seg {
    flex: 1;
    display: block;
    border-radius: 2px;
    transition: opacity 0.2s ease;
}

.cd-seg--completo  { background-color: #e05a2b; }
.cd-seg--en-curso  { background-color: #c8c4a0; }
.cd-seg--pendiente { background-color: #1a1a1a; }

.cd-barra-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7a7870;
}

/* Etapa */
.cd-caso__etapa {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cd-caso__etapa-pre {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7a7870;
}

.cd-caso__etapa-nombre {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a1a;
}

.cd-caso__estado {
    font-size: 0.68rem;
    font-weight: 500;
    color: #7a7870;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Botón Ver más */
.cd-caso__flecha {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e05a2b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1.5px solid #e05a2b;
    border-radius: 2px;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* neutralizar estilos de Elementor/tema sobre <a> */
    background-image: none !important;
    box-shadow: none !important;
}

.cd-caso__flecha::before {
    display: none !important;
    content: none !important;
}

.cd-caso__flecha::after {
    content: '→';
    font-size: 0.85em;
    transition: transform 0.2s ease;
    display: inline !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
}

.cd-caso__flecha:hover {
    background-color: #e05a2b !important;
    background-image: none !important;
    color: #fff !important;
    box-shadow: none !important;
}

.cd-caso__flecha:hover::after {
    transform: translateX(3px);
    background: none !important;
    box-shadow: none !important;
}

.cd-caso__flecha:focus {
    outline: none;
    box-shadow: none !important;
}


/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cd-caso {
        grid-template-columns: 40px 180px 1fr 160px auto;
        gap: 12px 16px;
    }
}

@media (max-width: 768px) {
    .cd-wrapper {
        padding: 28px 20px;
    }

    .cd-header {
        flex-direction: column;
        gap: 12px;
    }

    .cd-header__sub {
        max-width: 100%;
    }

    .cd-caso {
        grid-template-columns: 36px 1fr 36px;
        grid-template-rows: auto auto auto;
        gap: 8px 12px;
        padding: 16px 0;
    }

    .cd-caso__num {
        grid-column: 1;
        grid-row: 1;
        font-size: 1.4rem;
    }

    .cd-caso__info {
        grid-column: 2;
        grid-row: 1;
    }

    .cd-caso__flecha {
        grid-column: 3;
        grid-row: 1;
    }

    .cd-caso__progreso {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .cd-caso__etapa {
        grid-column: 1 / -1;
        grid-row: 3;
        flex-direction: row;
        gap: 8px;
        align-items: baseline;
        flex-wrap: wrap;
    }

    .cd-caso__etapa-pre {
        display: none;
    }
}

@media (max-width: 480px) {
    .cd-caso__nombre {
        font-size: 0.85rem;
    }

    .cd-barra {
        height: 16px;
    }
}
