/* Catálogo público /ofertaacademica/ (categorías, modalidades, horarios y listados de cursos).
   Complementa detalle.css: de ahí salen el hero (.det-hero), las tarjetas (.det-card),
   el estado vacío (.det-empty) y la paleta (#0A509B primario, #F59C1A ámbar).
   Aquí solo lo propio del catálogo. */

.ofp-wrap { color: #334155; }

/* ----- Hero: texto a la izquierda, buscador a la derecha ----- */
.ofp-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 32px; }
.ofp-hero__texto { flex: 1 1 340px; min-width: 0; }
.ofp-hero__lado { flex: 0 1 400px; min-width: 0; }
.ofp-eyebrow {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #DBEAFE;
    margin-bottom: .45rem;
}
.ofp-volver {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: .9rem;
    color: #fff;
    font-size: .85rem; font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
}
.ofp-volver:hover { color: #fff; border-bottom-color: #fff; }

.ofp-buscar {
    display: flex; align-items: center; gap: 6px;
    background: #fff;
    border-radius: 12px;
    padding: 5px 5px 5px 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
}
.ofp-buscar:focus-within { box-shadow: 0 0 0 3px rgba(245, 156, 26, .6), 0 6px 18px rgba(15, 23, 42, .16); }
.ofp-buscar > i { color: #64748B; font-size: .9rem; }
.ofp-buscar input {
    flex: 1; min-width: 0;
    border: 0; outline: 0;
    background: transparent;
    color: #0F172A;
    font-size: .95rem;
    padding: 8px 4px;
}
.ofp-buscar input::placeholder { color: #64748B; }
.ofp-buscar .btn { border-radius: 9px; padding: .55rem 1.05rem; font-weight: 600; white-space: nowrap; }

/* ----- Ruta del catálogo por capas: categoría > modalidad > horario > cursos ----- */
.ofp-ruta {
    list-style: none;
    margin: 0 0 26px;
    padding: 6px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
}
.ofp-paso {
    display: flex; align-items: center; gap: .65rem;
    height: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background .15s;
}
a.ofp-paso:hover { background: #fff; color: inherit; }
.ofp-paso__num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #475569;
    font-size: .8rem; font-weight: 700;
    flex-shrink: 0;
}
.ofp-paso__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ofp-paso__lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #64748B; }
.ofp-paso__val {
    font-size: .9rem; font-weight: 600; color: #64748B;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ofp-paso.is-hecho .ofp-paso__num { background: #15803D; color: #fff; }
.ofp-paso.is-hecho .ofp-paso__val { color: #0F172A; }
.ofp-paso.is-actual { background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.ofp-paso.is-actual .ofp-paso__num { background: #0A509B; color: #fff; }
.ofp-paso.is-actual .ofp-paso__val { color: #0A509B; }

/* ----- Encabezado de sección y barra de resultados ----- */
.ofp-seccion { font-size: 1.15rem; font-weight: 700; color: #0F172A; margin: 0 0 16px; }
.ofp-barra {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 18px;
}
.ofp-barra__total { font-size: .9rem; color: #64748B; margin: 0; }
.ofp-barra__total b { color: #0F172A; }
.ofp-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.ofp-filtro {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #fff;
    padding: .35rem .85rem;
    font-size: .84rem; font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.ofp-filtro:hover { border-color: #0A509B; color: #0A509B; }
.ofp-filtro.is-activo { background: #0A509B; border-color: #0A509B; color: #fff; }
.ofp-filtro--quitar { background: #EFF6FF; border-color: #BFDBFE; color: #0A509B; }

/* ----- Tarjeta base (opción del catálogo y curso) ----- */
.ofp-opcion,
.ofp-curso {
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ofp-opcion:hover,
.ofp-curso:hover {
    border-color: #0A509B;
    box-shadow: 0 10px 24px rgba(10, 80, 155, .14);
    transform: translateY(-2px);
}
.ofp-opcion:focus-within,
.ofp-curso:focus-within { outline: 3px solid rgba(245, 156, 26, .7); outline-offset: 2px; }
.ofp-opcion a:focus,
.ofp-curso a:focus { outline: 0; }

.ofp-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #EEF2F7; }
.ofp-img--icono {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: auto;
    height: 112px;
    background: #EFF6FF;
    border-bottom: 1px solid #DBEAFE;
    color: #0A509B;
    font-size: 2.2rem;
}
.ofp-cuerpo { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.ofp-titulo { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0 0 .4rem; }
.ofp-titulo a { color: #0F172A; text-decoration: none; }
.ofp-opcion:hover .ofp-titulo a,
.ofp-curso:hover .ofp-titulo a { color: #0A509B; }
.ofp-desc {
    font-size: .9rem; line-height: 1.55; color: #475569;
    margin: 0 0 .9rem;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden;
}
.ofp-ir {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: auto;
    color: #0A509B;
    font-size: .88rem; font-weight: 700;
}
.ofp-ir i { font-size: .78rem; transition: transform .15s; }
.ofp-opcion:hover .ofp-ir i,
.ofp-curso:hover .ofp-ir i { transform: translateX(3px); }

/* ----- Curso ----- */
.ofp-curso__portada { position: relative; }
.ofp-curso__estado {
    position: absolute; left: 12px; top: 12px;
    display: inline-flex; align-items: center; gap: .35rem;
    background: #fff;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .72rem; font-weight: 700;
    color: #166534;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}
.ofp-curso__estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #16A34A; }
.ofp-curso__tipo {
    font-size: .7rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: #0A509B;
    margin-bottom: .35rem;
}
.ofp-chips { display: flex; flex-wrap: wrap; gap: .35rem .4rem; margin-bottom: 1rem; }
.ofp-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    padding: .18rem .6rem;
    font-size: .75rem;
    color: #475569;
    line-height: 1.3;
}
.ofp-chip i { color: #0A509B; font-size: .72rem; }
.ofp-curso__pie {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #EEF2F7;
}
.ofp-curso__pie .ofp-ir { margin-top: 0; }
.ofp-precio { line-height: 1.15; }
.ofp-precio__lbl { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #64748B; }
.ofp-precio__val { font-size: 1.3rem; font-weight: 800; color: #0A509B; }
.ofp-precio del { color: #64748B; font-size: .82rem; margin-right: .3rem; }
.ofp-precio.is-promo .ofp-precio__val { color: #15803D; }

/* ----- Paginación con la paleta de la oferta ----- */
.ofp-wrap .page-link { min-width: 2rem; text-align: center; }
.ofp-wrap .page-item.active .page-link { background: #0A509B; border-color: #0A509B; color: #fff; }

@media (max-width: 767px) {
    .ofp-ruta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ofp-hero__lado { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .ofp-opcion, .ofp-curso, .ofp-ir i, .ofp-paso, .ofp-filtro { transition: none; }
    .ofp-opcion:hover, .ofp-curso:hover { transform: none; }
}
