body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: #f5f5f5;
}

main {
    flex: 1 0 auto;
}


/* CABECERA */

nav {
    height: auto;
    line-height: normal;
    padding: 4px 0;
    background-color: #1d87c1;

}

.logo-header {
    position: static !important;
    transform: none !important;
    height: 80px;
    display: flex;
    align-items: center;
}

.logo-header img {
    height: 80px;
    width: auto;
    display: block;
}

.logo-cmf {
    height: 80px;
    display: flex;
    align-items: center;
}

.logo-cmf img {
    height: 80px;
    width: auto;
    display: block;
}


/* PORTADA */

.portada {
    padding-top: 45px;
    padding-bottom: 25px;
}

.portada h1 {
    font-weight: 500;
    margin-bottom: 10px;
}

.portada p {
    color: #666;
}


/* TARJETAS */

.card-title {
    font-weight: 500 !important;
}

.card-title .material-icons {
    font-size: 30px;
}


/* FOOTER */

.page-footer {
    background-color: #444;
    margin-top: 40px;
}

.footer-copyright {
    background-color: rgba(0, 0, 0, 0.15) !important;
}



.plan-card {
    height: 100%;
}

.plan-card .card-content {
    min-height: 190px;
}

.plan-card .card-title {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
}

.plan-titulo {
    margin-top: 15px;
    min-height: 48px;
}

.plan-datos {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #666;
}

.plan-datos span {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* ============================================================
   PLAN
   ============================================================ */

.programa {
    padding: 30px 0 40px;
}

.programa-titulo h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 25px;
}

.programa-descripcion {
    color: #666;
}

.programa-info,
.programa-detalles {
    margin-top: 25px;
}

.info-bloque {
    margin: 25px 0;
}

.info-bloque h5 {
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-bloque h5 .material-icons {
    font-size: 22px;
}

.info-bloque p {
    line-height: 1.6;
}


/* TABLA DE ACCIONES */

.responsive-table {
    overflow-x: auto;
    margin: 30px 0;
}

.responsive-table table {
    min-width: 850px;
}

.responsive-table th {
    white-space: nowrap;
}

.responsive-table td {
    vertical-align: top;
}

.responsive-table td:nth-child(1) {
    white-space: nowrap;
}

.responsive-table td:nth-child(3),
.responsive-table td:nth-child(4),
.responsive-table td:nth-child(5) {
    text-align: center;
    white-space: nowrap;
}


/* ============================================================
   PLAN
   ============================================================ */

.plan-header {
    padding-top: 40px;
    padding-bottom: 30px;
}

.plan-header h1 {
    margin-top: 5px;
    margin-bottom: 25px;
    font-weight: 500;
}

.plan-acciones {
    margin-top: 25px;
}


/* ============================================================
   PROGRAMAS
   ============================================================ */

.programas {
    padding-bottom: 50px;
}

.programas > h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 25px;
}

.programas-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Tarjeta completa como enlace */

.programa-card {
    display: block;
    color: inherit;
    text-decoration: none;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.programa-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.programa-card-contenido {
    padding: 25px 30px;
}

.programa-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.7rem;
    font-weight: 500;
}

.programa-descripcion {
    color: #555;
    line-height: 1.6;
}

.programa-destinatarios {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.programa-destinatarios strong {
    display: block;
    margin-bottom: 5px;
}

.programa-destinatarios p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.programa-card-enlace {
    margin-top: 20px;
    color: #1976d2;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.programa-card-enlace .material-icons {
    font-size: 20px;
}



/* ============================================================
   PROGRAMA
   ============================================================ */

.programa-header {
    padding-top: 30px;
    padding-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    color: #666;
}

.back-link:hover {
    color: #1976d2;
}

.back-link .material-icons {
    font-size: 20px;
}

.programa-header h1 {
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 500;
}

.programa-descripcion {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #555;
}

.programa-estado {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1976d2;
}


/* ============================================================
   DATOS DEL PROGRAMA
   ============================================================ */

.programa-datos {
    margin-bottom: 50px;
}

.info-bloque {
    margin: 35px 0;
}

.info-bloque h2 {
    font-size: 1.35rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.info-bloque h2 .material-icons {
    font-size: 24px;
}

.info-bloque p {
    line-height: 1.65;
    color: #555;
}


/* ============================================================
   ACCIONES FORMATIVAS
   ============================================================ */

.programa-acciones {
    padding-bottom: 50px;
}

.programa-acciones > h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 25px;
}

.responsive-table {
    overflow-x: auto;
}

.responsive-table table {
    min-width: 850px;
}

.responsive-table th {
    white-space: nowrap;
}

.responsive-table td {
    vertical-align: top;
}

.responsive-table td:first-child {
    white-space: nowrap;
}


/*  Buscador */

/* =====================================================
   BUSCADOR DE FORMACIÓN
===================================================== */

.buscador-formacion {
    margin: 20px 0 35px;
}

.buscador-input {
    margin: 0;
}

.buscador-boton {
    width: 100%;
    margin-top: 5px;
}

.resultados-titulo {
    margin-bottom: 20px;
}


/* =====================================================
   RESULTADOS
===================================================== */

.resultados-formacion {
    width: 100%;
}


.resultado-formacion {
    display: grid;

    grid-template-columns:
        100px
        minmax(180px, 1fr)
        minmax(150px, 0.8fr)
        minmax(250px, 2fr)
        40px;

    align-items: center;

    width: 100%;

    padding: 14px 12px;

    margin-bottom: 2px;

    border-bottom: 1px solid #ddd;

    color: #222;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}


.resultado-formacion:hover {
    background-color: #f5f5f5;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.08);

    color: #222;
}


.resultado-plan {
    font-weight: bold;
}


.resultado-programa {
    font-weight: 500;
}


.resultado-codigos {
    font-size: 0.9rem;

    color: #555;
}


.resultado-denominacion {
    color: #333;
}


.resultado-flecha {
    text-align: right;

    color: #777;
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 600px) {

    .resultado-formacion {
        grid-template-columns: 1fr 40px;

        gap: 5px 10px;

        padding: 15px 10px;
    }


    .resultado-plan {
        grid-column: 1 / 2;
    }


    .resultado-programa {
        grid-column: 1 / 2;
    }


    .resultado-codigos {
        grid-column: 1 / 2;
    }


    .resultado-denominacion {
        grid-column: 1 / 2;
    }


    .resultado-flecha {
        grid-column: 2 / 3;
        grid-row: 1 / 5;
    }

}