/* ==========================================================================
   CATÁLOGO DE CURSOS Y OFICIOS - CFL N° 407
   ========================================================================== */

/* Buscador de Cursos */
.cfl-search-wrapper {
    background: rgba(240, 244, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-xl);
    padding: 2rem 2.2rem 1.6rem;
    border: 1px solid rgba(29, 78, 216, 0.12);
    box-shadow: 0 10px 35px rgba(11, 31, 102, 0.06);
    max-width: 820px;
    margin: 0 auto 2.5rem;
}

.cfl-search-top-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--cfl-blue-bright);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cfl-search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.cfl-search-input-box i.search-icon {
    position: absolute;
    left: 1.4rem;
    color: var(--cfl-text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.cfl-search-input {
    width: 100%;
    padding: 1.1rem 3.8rem 1.1rem 3.4rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(29, 78, 216, 0.15);
    background: var(--cfl-white);
    color: var(--cfl-text-dark);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.cfl-search-input:focus {
    border-color: var(--cfl-blue-bright);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12), 0 6px 22px rgba(0, 0, 0, 0.06);
}

.cfl-search-clear-btn {
    display: none;
    position: absolute;
    right: 1.1rem;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--cfl-text-body);
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.cfl-search-clear-btn:hover {
    background: #cbd5e1;
}

.cfl-result-counter {
    display: none;
    margin-top: 0.85rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--cfl-text-body);
}

/* Filtros de Categorías */
.cfl-cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.cfl-cat-btn {
    padding: 9px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    outline: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cfl-cat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 31, 102, 0.25);
}

.cfl-cat-btn.active {
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45);
    transform: translateY(-1px);
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.cfl-cat-btn.inactive {
    opacity: 0.45;
}

.cfl-cat-btn .badge-count {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 1px 7px;
    font-size: 0.72rem;
    margin-left: 2px;
}

/* Rejilla de Cursos */
.cfl-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.2rem;
}

/* Tarjeta de Curso */
.cfl-course-card {
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 32px rgba(11, 31, 102, 0.05), 0 0 20px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cfl-course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #0b1f66, #1d4ed8);
}

.cfl-course-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 20px 45px rgba(11, 31, 102, 0.10);
    border-color: rgba(2, 132, 199, 0.45);
}

.cfl-card-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 6px;
}

.cfl-course-cat-tag {
    font-size: 0.74rem;
    font-weight: 800;
    padding: 3px 11px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cfl-badge-free {
    font-size: 0.74rem;
    font-weight: 800;
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
    padding: 3px 11px;
    border-radius: 20px;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.cfl-course-title {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--cfl-navy-mid);
    margin-bottom: 0.75rem;
    line-height: 1.35;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cfl-course-title:hover {
    color: var(--cfl-blue-bright);
}

.cfl-course-desc {
    color: var(--cfl-text-body);
    font-size: 0.93rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.cfl-card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.9rem;
    margin-bottom: 1.1rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.cfl-btn-detail {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid transparent;
}

/* Sin Resultados */
#cflNoResults {
    display: none;
    text-align: center;
    padding: 4.5rem 1rem;
    grid-column: 1 / -1;
}

#cflNoResults .dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cfl-cyan);
    margin: 0 4px;
    animation: cflDotBounce 1.4s ease-in-out infinite;
}

#cflNoResults .dots span:nth-child(2) { animation-delay: 0.2s; }
#cflNoResults .dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cflDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-12px); opacity: 1; }
}

/* Modal de Detalle de Curso */
.cfl-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    padding-top: 70px;
    padding-bottom: 2rem;
    overflow-y: auto;
}

.cfl-modal-content {
    background: var(--cfl-white);
    width: 100%;
    max-width: 800px;
    max-height: calc(88vh - 40px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: auto 0;
}

.cfl-modal-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.8rem 2.2rem;
    position: relative;
    border-bottom: 2px solid #bae6fd;
}

.cfl-modal-close-btn-icon {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.3);
    color: var(--cfl-cyan) !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cfl-modal-close-btn-icon:hover {
    background: rgba(2, 132, 199, 0.25);
}

.cfl-modal-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.cfl-modal-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfl-modal-header h2 {
    color: var(--cfl-navy-mid);
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.cfl-modal-meta-row {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    color: var(--cfl-text-body);
    font-size: 0.92rem;
    font-weight: 700;
    flex-wrap: wrap;
}

.cfl-modal-body {
    padding: 2rem 2.2rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    background: var(--cfl-white);
}

.cfl-modal-box {
    background: #f8fafc;
    border-left: 4px solid var(--cfl-cyan);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.3rem 1.6rem;
}

.cfl-modal-box-title {
    color: var(--cfl-navy-mid);
    font-size: 1.05rem;
    font-weight: 900;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfl-modal-syllabus-content {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.3rem 1.6rem;
    color: var(--cfl-text-dark);
    font-size: 0.94rem;
    line-height: 1.75;
}

.cfl-modal-syllabus-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cfl-modal-syllabus-content li {
    margin-bottom: 0.65rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
    color: var(--cfl-text-dark);
    font-weight: 500;
}

.cfl-modal-syllabus-content li i {
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--cfl-cyan);
    font-size: 0.88rem;
}

.cfl-modal-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cfl-modal-footer {
    background: #f8fafc;
    padding: 1.2rem 2.2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cfl-modal-btn-close {
    padding: 11px 26px;
    border-radius: 50px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: var(--cfl-navy-mid);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.cfl-modal-btn-close:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.cfl-modal-btn-action {
    padding: 13px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.88rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: var(--transition);
}

/* ==========================================================================
   INTERRUPTOR DE VISTA (MAPA CONCEPTUAL VS CATÁLOGO)
   ========================================================================== */
.cfl-view-switcher-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}

.cfl-view-switcher {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 5px;
    border-radius: 50px;
    border: 1.5px solid rgba(29, 78, 216, 0.18);
    box-shadow: 0 8px 24px rgba(11, 31, 102, 0.06);
    gap: 4px;
}

.cfl-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: var(--cfl-navy-mid);
    font-family: var(--font-heading);
    font-size: 0.90rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.cfl-view-btn:hover {
    color: var(--cfl-blue-bright);
    background: rgba(29, 78, 216, 0.06);
}

.cfl-view-btn.active {
    background: linear-gradient(135deg, #071540 0%, #0b1f66 45%, #1d4ed8 100%);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(11, 31, 102, 0.25);
}

/* Badge "Mapa de Cursos" abajo del título */
.cfl-map-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 0.9rem;
    padding: 6px 18px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #38bdf8;
    background: linear-gradient(135deg, rgba(7, 21, 64, 0.85) 0%, rgba(29, 78, 216, 0.3) 100%);
    border: 1px solid rgba(56, 189, 248, 0.38);
    box-shadow: 0 4px 16px rgba(11, 31, 102, 0.18);
}

/* ==========================================================================
   BUSCADOR COMPACTO Y ELEGANTE (ALTA VISIBILIDAD Y REMARCADO)
   ========================================================================== */
.cfl-compact-search-box {
    position: relative;
    max-width: 460px;
    margin: 0 auto 0.4rem;
    display: flex;
    align-items: center;
}

.cfl-compact-search-box .search-icon {
    position: absolute;
    left: 18px;
    font-size: 1.05rem;
    color: #0284c7;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cfl-compact-search-input {
    width: 100%;
    padding: 12px 46px 12px 48px;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--cfl-navy-mid);
    background: #ffffff;
    border: 2px solid rgba(29, 78, 216, 0.55);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(11, 31, 102, 0.12), 0 0 0 3.5px rgba(56, 189, 248, 0.25);
    outline: none;
    transition: all 0.25s ease;
}

.cfl-compact-search-box:hover .cfl-compact-search-input {
    border-color: #1d4ed8;
    box-shadow: 0 10px 28px rgba(11, 31, 102, 0.16), 0 0 0 4.5px rgba(56, 189, 248, 0.38);
}

.cfl-compact-search-box:hover .search-icon {
    color: #1d4ed8;
    transform: scale(1.08);
}

.cfl-compact-search-input:focus {
    border-color: #0284c7;
    box-shadow: 0 12px 32px rgba(11, 31, 102, 0.18), 0 0 0 5.5px rgba(56, 189, 248, 0.45);
    background: #ffffff;
}

.cfl-compact-search-input::placeholder {
    color: #64748b;
    font-weight: 600;
}

.cfl-compact-search-clear {
    position: absolute;
    right: 15px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.1rem;
    color: var(--cfl-text-muted);
    cursor: pointer;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cfl-compact-search-clear:hover {
    color: #ef4444;
    background: #fee2e2;
    border-color: #fca5a5;
}

/* ==========================================================================
   DROPDOWN DE SUGERENCIAS INTELIGENTES POR APROXIMACIÓN (AUTOCOMPLETE)
   ========================================================================== */
.cfl-compact-search-box {
    position: relative;
}

.cfl-search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(2, 132, 199, 0.35);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(7, 21, 64, 0.16), 0 4px 14px rgba(2, 132, 199, 0.12);
    z-index: 99999;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    padding: 6px;
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: rgba(2, 132, 199, 0.45) transparent;
}

.cfl-search-suggestions-dropdown.is-open {
    display: block;
    animation: cflSuggestFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cflSuggestFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cfl-suggestion-header {
    padding: 8px 12px 6px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(7, 21, 64, 0.06);
    margin-bottom: 4px;
}

.cfl-suggestion-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cfl-suggestion-header i {
    font-size: 0.72rem;
    color: #0284c7;
}

.cfl-suggestion-header-close {
    background: none;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.cfl-suggestion-header-close:hover {
    color: #ef4444;
}

.cfl-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.16s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid transparent;
}

.cfl-suggestion-item:hover,
.cfl-suggestion-item.is-selected {
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.22);
    transform: translateX(3px);
}

.cfl-suggestion-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.cfl-suggestion-item:hover .cfl-suggestion-icon,
.cfl-suggestion-item.is-selected .cfl-suggestion-icon {
    transform: scale(1.08);
}

.cfl-suggestion-content {
    flex: 1;
    min-width: 0;
}

.cfl-suggestion-title {
    font-family: var(--font-heading);
    font-size: 0.90rem;
    font-weight: 700;
    color: var(--cfl-navy-mid);
    line-height: 1.25;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfl-suggestion-title mark {
    background: rgba(56, 189, 248, 0.32);
    color: #0369a1;
    font-weight: 800;
    border-radius: 3px;
    padding: 0 2px;
}

.cfl-suggestion-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.2;
}

.cfl-suggestion-cat {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cfl-suggestion-dur {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cfl-suggestion-offer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 7px;
    border-radius: 50px;
    font-size: 0.70rem;
}

.cfl-suggestion-arrow {
    color: #94a3b8;
    font-size: 0.78rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    padding-left: 4px;
}

.cfl-suggestion-item:hover .cfl-suggestion-arrow,
.cfl-suggestion-item.is-selected .cfl-suggestion-arrow {
    color: #0284c7;
    transform: translateX(3px);
}

.cfl-suggestion-empty {
    padding: 16px 14px;
    text-align: center;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
}

.cfl-suggestion-empty strong {
    color: var(--cfl-navy-mid);
}

@media (max-width: 768px) {
    .cfl-search-suggestions-dropdown {
        max-height: 300px;
        border-radius: 14px;
        padding: 4px;
    }
    .cfl-suggestion-item {
        padding: 8px 10px;
        gap: 10px;
    }
    .cfl-suggestion-icon {
        width: 32px;
        height: 32px;
        font-size: 0.88rem;
    }
    .cfl-suggestion-title {
        font-size: 0.84rem;
    }
    .cfl-suggestion-meta {
        font-size: 0.72rem;
        gap: 4px 8px;
    }
}

/* ==========================================================================
   BANNER DE AVISO SOBRE VACANTES Y DISPONIBILIDAD (ESTILO OFICIAL)
   ========================================================================== */
.cfl-vacancies-alert-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 18px;
    padding: 0.95rem 1.6rem;
    max-width: 960px;
    margin: 0 auto 2.2rem auto;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.08);
    transition: all 0.25s ease;
}

.cfl-vacancies-alert-banner:hover {
    box-shadow: 0 6px 24px rgba(2, 132, 199, 0.14);
    border-color: #7dd3fc;
}

.cfl-vacancies-alert-banner .vacancies-alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 900;
    flex-shrink: 0;
}

.cfl-vacancies-alert-banner .vacancies-alert-text {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    line-height: 1.45;
    color: #0369a1;
}

.cfl-vacancies-alert-banner .vacancies-alert-text strong {
    color: #071540;
    font-weight: 800;
}

.cfl-vacancies-alert-banner .vacancies-alert-link {
    color: #0284c7;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cfl-vacancies-alert-banner .vacancies-alert-link:hover {
    color: #071540;
}

/* Barra Guía de Navegación Lateral y Accesos Rápidos */
.cfl-map-flow-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.85rem auto 1.15rem;
    max-width: 1400px;
    padding: 0.45rem 1.15rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(11, 31, 102, 0.04);
}

.flow-steps-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.flow-step-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cfl-navy-mid);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.flow-step-btn:hover {
    background: rgba(29, 78, 216, 0.08);
    color: var(--cfl-blue-bright);
}

.flow-step-btn.active {
    background: linear-gradient(135deg, #0b1f66, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(11, 31, 102, 0.22);
}

.flow-sep {
    font-size: 0.65rem;
    color: #94a3b8;
    opacity: 0.7;
}

.flow-hint-text {
    font-size: 0.76rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.flow-hint-text i {
    color: var(--cfl-blue-bright);
}

@media (max-width: 991px) {
    .cfl-map-flow-indicator {
        display: none;
    }
}

/* Contenedor del Escenario con Flechas Flotantes */
.cfl-map-stage-wrapper {
    position: relative;
    width: 100%;
}

.cfl-map-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #071540 0%, #1d4ed8 55%, #0284c7 100%);
    border: 2.2px solid #38bdf8;
    box-shadow: 0 8px 24px rgba(11, 31, 102, 0.45), 0 0 16px rgba(56, 189, 248, 0.45);
    color: #ffffff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    transition: opacity 0.3s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.cfl-map-nav-arrow.arrow-prev {
    left: -22px;
}

.cfl-map-nav-arrow.arrow-next {
    right: -22px;
}

.cfl-map-nav-arrow.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Movimiento latente orgánico para llamar la atención sutilmente */
.cfl-map-nav-arrow.arrow-next.is-visible {
    animation: cflArrowNextLatent 2.4s infinite ease-in-out;
}

.cfl-map-nav-arrow.arrow-prev.is-visible {
    animation: cflArrowPrevLatent 2.4s infinite ease-in-out;
}

@keyframes cflArrowNextLatent {
    0%, 100% {
        transform: translateY(-50%) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(11, 31, 102, 0.45), 0 0 16px rgba(56, 189, 248, 0.45);
    }
    50% {
        transform: translateY(-50%) translateX(6px) scale(1.09);
        box-shadow: 0 12px 30px rgba(11, 31, 102, 0.60), 0 0 24px rgba(56, 189, 248, 0.80);
    }
}

@keyframes cflArrowPrevLatent {
    0%, 100% {
        transform: translateY(-50%) translateX(0) scale(1);
        box-shadow: 0 8px 24px rgba(11, 31, 102, 0.45), 0 0 16px rgba(56, 189, 248, 0.45);
    }
    50% {
        transform: translateY(-50%) translateX(-6px) scale(1.09);
        box-shadow: 0 12px 30px rgba(11, 31, 102, 0.60), 0 0 24px rgba(56, 189, 248, 0.80);
    }
}

.cfl-map-nav-arrow:hover {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 50%, #0b1f66 100%);
    border-color: #ffffff;
    animation-play-state: paused;
    transform: translateY(-50%) scale(1.18);
    box-shadow: 0 14px 36px rgba(11, 31, 102, 0.70), 0 0 28px rgba(56, 189, 248, 0.95);
}

.cfl-map-nav-arrow:active {
    transform: translateY(-50%) scale(0.94);
    box-shadow: 0 4px 14px rgba(11, 31, 102, 0.4);
}

@media (max-width: 1280px) {
    .cfl-map-nav-arrow.arrow-prev {
        left: 10px;
    }
    .cfl-map-nav-arrow.arrow-next {
        right: 10px;
    }
}

@media (max-width: 991px) {
    .cfl-map-nav-arrow {
        display: none !important;
    }
}

/* ==========================================================================
   TARJETA CONTENEDORA DEL MAPA CONCEPTUAL (PROTEGE CONTRA THREE.JS)
   ========================================================================== */
.cfl-map-stage-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 28px;
    padding: 2.2rem 2.4rem;
    box-shadow: 0 14px 40px rgba(11, 31, 102, 0.06), 0 0 25px rgba(255, 255, 255, 0.6) inset;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #0284c7 #f1f5f9;
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAB6ElEQVR4nO2UTWgTQRiG32x+jIdWGEeKIGIvIwqVolcr0pASEVoFSe0lHpRAQU96EAQLQm3Bi4L0FCK0pEgSf/GYeigFT0Jqq7brqQSEsJuFSi/5gSlfiKFIazfdzeayDywzLLvf+8w38HmwD4yLawDuAdgC8MrQ1fdwEsbFQi63KOlhXHywu77HzKlL2vo7en/02GlaPre9G+yfU8sGjAvZzm40oaCdoXvtYQM+q52yeh0+KwLp14lBWqM379CiA1hyVCAUGvi7HQbw7CA1FHQYxRVAA8ZFoBMCHsbFdQDj/oA/XK1UpwFMACiXtHXTRWhCGrq661Q104HxbCYZVn9+QTwee6h4vWU4iAIg4PcH0N3dhanJR3iTTuJU70nnDBgXo2f7BmSxqDXH7M69GSyPZcbF4ytXx2S5XJGtQv8wLqxfG+Pi+f0HEy0LFAq/SWDDsgDBuEjMzqVbEkhnPpJACnbAuLhw/MQ5ubb2y7TAUCRKAhdtESAYF3cvXR6Rm5t/9g1PJFMUPgO7YVxM9Z8flPn86q7BtVpNPp1+IXnPGRLos5Ll+Y/E7UPBYOJWLIqR4Uh9TuiagZXVH8i+/YRvy99fAnhi6KrWFgGCcXEYQBzADQBHAFBYHsC8oatf6x+5uLi4wBrbaNTwYibpqFQAAAAASUVORK5CYII=") 9 10, grab;
    scroll-behavior: smooth;
}

.cfl-map-stage-card.is-panning {
    cursor: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACCElEQVR4nO2WT0gbQRSHf8b/lUQYR6UoCB5GSlGLIl5EpJQiCOrBBk9WrOTUemkPFaGCB/XQg4Koh+ChxVKiVBAPnloEQYQKaZsWjYgUS6hkXbBYAkl0ypNsMCGmht3oZT+Y5c3szL6PmZ3ZBUxMbpiMRI2Mi04A/ZGqE8AjAEEAMwBOqaiK122EQNYl7Uuu95QXsHf3t83OvEYoFMKzgUHU1N7tPTs9g8eDQQCr1McomSiMC6kRHwcCAXlw4KP4Z3NLh6TCuBjCdQhUVNbHtJ+c/JU+32+KfxmyBIwLqcVFxVVJB1ptVhQU3DovAMp0CzAu5JF/J+ZmUXHVZnZOdqNWLynhSAuMi5fx067VaYo1jo//ROOPn9Zj+uvehizuIfGzkQxaLlXxJtzS/8OiBft7n+Fw9MCSmYkbQUZYW9uQdQ0PZCroWYIoh4f+6AMvxukWsNCFcfGqt28AwWAo5bc9MoaOaX0wLiaevxiWqaKdiroFCMaF881bV0oCroVlEpiHETAu6m+X18jt7d0rCzxstZNAkyECBOPiKX1gLh46l+Gcm6fk0zAaxsXYvbr70u32JEwcDofl6Pik5KV3SKBaT66MJBJPcvPynI977Ohob4XNZoXiV/HN8wOLH1bw9cv3KQAjquL1p0WAYFzkA3AA6AJQCICS0c/HO1Xxbp13MjExMYE+/gG2+Cthad/jGAAAAABJRU5ErkJggg==") 9 10, grabbing !important;
    scroll-behavior: auto !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Evitar que el cursor de arrastre penetre en las columnas y tarjetas interactivas */
.cfl-map-sidebar-col,
.cfl-map-courses-col,
.cfl-map-details-col,
.cfl-map-syllabus-col,
.cfl-sidebar-panel,
.cfl-subnodes-container,
.cfl-syllabus-segment-container {
    cursor: default;
}

.cfl-map-stage-card::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}
.cfl-map-stage-card::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.cfl-map-stage-card::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #1d4ed8 0%, #0284c7 50%, #38bdf8 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
    transition: background 0.2s ease;
}
.cfl-map-stage-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #071540 0%, #0b1f66 40%, #1d4ed8 100%);
}

.cfl-map-universe {
    display: block;
    position: relative;
    z-index: 6;
    animation: cflFadeIn 0.35s ease;
}

@keyframes cflFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Layout Principal del Escenario: 4 Columnas Progresivas con Espaciado Amplio */
.cfl-map-flow-stage-l2r {
    display: flex;
    gap: 6.8rem;
    align-items: flex-start;
    position: relative;
    min-height: 540px;
    width: max-content;
    min-width: 100%;
}

/* Lienzo SVG Dinámico de Conexiones Rectas (Izquierda a Derecha) */
.cfl-map-svg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: visible !important;
}

.cfl-map-wire {
    fill: none;
    stroke: url(#cflWireGradient);
    stroke-width: 2.2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
    filter: drop-shadow(0 0 3px rgba(29, 78, 216, 0.35));
    transition: opacity 0.25s ease, stroke-width 0.25s ease;
}

.cfl-map-wire.is-active-path {
    stroke-width: 2.8px;
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.75));
}

.cfl-map-wire-active {
    fill: none;
    stroke: url(#cflWireDetailGradient);
    stroke-width: 2.6px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.65));
    transition: opacity 0.25s ease;
}

/* Acabado de Alta Definición para el Comienzo y Final de Conexiones SVG */
.cfl-wire-origin-ring {
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.85));
    transition: opacity 0.2s ease;
}

.cfl-wire-origin-core {
    pointer-events: none;
}

.cfl-wire-end-dot {
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.65));
    transition: opacity 0.2s ease;
}

.cfl-wire-end-dot-active {
    filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.95));
    animation: cflNodePulse 2.4s infinite ease-in-out;
}

@keyframes cflNodePulse {
    0%, 100% {
        r: 5px;
        filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.8));
    }
    50% {
        r: 6.2px;
        filter: drop-shadow(0 0 9px rgba(56, 189, 248, 1));
    }
}

.cfl-map-node-dot {
    stroke-width: 2px;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.6));
    animation: cflDotPulse 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes cflDotPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   COLUMNA 3: LOS 3 CUADROS MODULARES DEL CURSO SELECCIONADO (COMPACTOS)
   ========================================================================== */
.cfl-map-details-col {
    position: relative;
    z-index: 3;
    flex: 0 0 275px;
    /* Posicionamiento vertical fluido sincronizado con las conexiones */
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.cfl-subnodes-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: cflFadeIn 0.3s ease;
}

.cfl-subnode-card {
    background: rgba(255, 255, 255, 0.60);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    padding: 0.80rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 11px;
    box-shadow: 0 4px 14px rgba(11, 31, 102, 0.04), 0 0 15px rgba(255, 255, 255, 0.5) inset;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    animation: cflSubnodePop 0.2s ease backwards;
}

.cfl-subnode-hours { animation-delay: 0.02s; }
.cfl-subnode-mode  { animation-delay: 0.04s; }
.cfl-subnode-temario { animation-delay: 0.06s; }

@keyframes cflSubnodePop {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.cfl-subnode-card:hover {
    border-color: var(--cfl-blue-bright);
    box-shadow: 0 6px 18px rgba(11, 31, 102, 0.12);
    background: #ffffff;
}

.cfl-subnode-card .subnode-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.cfl-subnode-hours .subnode-icon {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.cfl-subnode-mode .subnode-icon {
    background: rgba(2, 132, 199, 0.12);
    color: var(--cfl-cyan);
}

.cfl-subnode-card .subnode-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cfl-subnode-card .subnode-label {
    font-family: var(--font-heading);
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cfl-text-muted);
}

.cfl-subnode-card .subnode-val {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--cfl-navy-mid);
    line-height: 1.25;
}

/* Subcuadro 3: Ver Temario de Curso (Fondo Claro Vidriado sin Azul Oscuro) */
.cfl-subnode-temario {
    background: rgba(255, 255, 255, 0.94);
    border: 1.5px solid rgba(29, 78, 216, 0.18);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(11, 31, 102, 0.04);
}

.cfl-subnode-temario .subnode-icon {
    background: rgba(2, 132, 199, 0.12);
    color: var(--cfl-cyan);
}

.cfl-subnode-temario .subnode-label {
    color: var(--cfl-text-muted);
}

.cfl-subnode-temario .subnode-val {
    color: var(--cfl-navy-mid);
    display: flex;
    align-items: center;
    font-weight: 800;
    transition: color 0.2s ease;
}

.cfl-subnode-temario .subnode-val i {
    color: var(--cfl-blue-bright);
    transition: transform 0.2s ease;
}

.cfl-subnode-temario:hover,
.cfl-subnode-temario.active {
    background: #ffffff;
    border-color: var(--cfl-cyan);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 31, 102, 0.10), 0 0 12px rgba(56, 189, 248, 0.35);
}

.cfl-subnode-temario:hover .subnode-val,
.cfl-subnode-temario.active .subnode-val {
    color: var(--cfl-blue-bright);
}

.cfl-subnode-temario:hover .subnode-val i,
.cfl-subnode-temario.active .subnode-val i {
    transform: translateX(3px);
}

/* Subcuadro 4: Preinscripción / Ver Disponibilidad */
.cfl-subnode-inscribe {
    text-decoration: none;
    border-color: rgba(2, 132, 199, 0.35);
    background: rgba(240, 249, 255, 0.95);
    cursor: pointer;
}

.cfl-subnode-inscribe .subnode-icon {
    background: rgba(2, 132, 199, 0.15);
    color: #0284c7;
}

.cfl-subnode-inscribe .subnode-label {
    color: #0284c7;
}

.cfl-subnode-inscribe .subnode-val {
    color: #071540;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.cfl-subnode-inscribe .subnode-val i {
    color: #0284c7;
    transition: transform 0.2s ease;
}

.cfl-subnode-inscribe:hover {
    background: #ffffff;
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.20), 0 0 14px rgba(56, 189, 248, 0.35);
}

.cfl-subnode-inscribe:hover .subnode-val {
    color: #0284c7;
}

.cfl-subnode-inscribe:hover .subnode-val i {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   COLUMNA 4: SEGMENTO DE DESGLOSE DEL TEMARIO Y PERFIL (REEMPLAZO TOTAL DEL MODAL)
   ========================================================================== */
.cfl-map-syllabus-col {
    flex: 0 0 380px;
    width: 380px;
    max-width: 380px;
    position: relative;
    z-index: 3;
    animation: cflFadeIn 0.35s ease;
    transition: opacity 0.2s ease;
}

.cfl-syllabus-segment-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
}

.cfl-syllabus-seg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.15rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 246, 255, 0.94) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 15px;
    border: 1.5px solid rgba(29, 78, 216, 0.22);
    box-shadow: 0 4px 16px rgba(11, 31, 102, 0.05);
    position: relative;
}

.cfl-seg-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cfl-navy-mid);
}

.cfl-seg-title-row i {
    color: var(--cfl-blue-bright);
    font-size: 1.05rem;
}

.cfl-seg-title {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--cfl-navy-mid);
}

.cfl-seg-back-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(29, 78, 216, 0.08);
    border: 1px solid rgba(29, 78, 216, 0.22);
    color: var(--cfl-blue-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.cfl-seg-back-btn:hover {
    background: var(--cfl-blue-bright);
    color: #ffffff;
    border-color: var(--cfl-blue-bright);
    transform: translateX(-2px);
}

.cfl-seg-close-btn {
    background: transparent;
    border: none;
    font-size: 1.35rem;
    color: var(--cfl-text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s ease;
}

.cfl-seg-close-btn:hover {
    color: #ef4444;
}

.cfl-syllabus-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(29, 78, 216, 0.16);
    border-radius: 15px;
    padding: 0.95rem 1.2rem;
    box-shadow: 0 4px 16px rgba(11, 31, 102, 0.04);
    transition: all 0.22s ease;
    cursor: pointer;
    user-select: none;
}

.cfl-syllabus-card:hover {
    border-color: var(--cfl-blue-bright);
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(11, 31, 102, 0.08);
}

.cfl-syllabus-card.is-open .syllabus-card-collapsible-body {
    cursor: default;
    user-select: text;
}

.cfl-syllabus-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.syllabus-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
    transition: opacity 0.2s ease;
}

.syllabus-card-header:hover {
    opacity: 0.88;
}

.syllabus-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfl-accordion-chevron {
    font-size: 0.80rem;
    color: var(--cfl-text-muted);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.cfl-syllabus-card.is-open .cfl-accordion-chevron {
    transform: rotate(180deg);
    color: var(--cfl-blue-bright);
}

.syllabus-card-collapsible-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin-top 0.25s ease;
    margin-top: 0;
}

.cfl-syllabus-card.is-open .syllabus-card-collapsible-body {
    max-height: 240px;
    opacity: 1;
    margin-top: 0.55rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(2, 132, 199, 0.45) rgba(240, 244, 255, 0.5);
}

.cfl-syllabus-card.is-open .syllabus-card-collapsible-body::-webkit-scrollbar {
    width: 5px;
}
.cfl-syllabus-card.is-open .syllabus-card-collapsible-body::-webkit-scrollbar-track {
    background: rgba(240, 244, 255, 0.5);
    border-radius: 6px;
}
.cfl-syllabus-card.is-open .syllabus-card-collapsible-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0284c7, #38bdf8);
    border-radius: 6px;
}
.cfl-syllabus-card.is-open .syllabus-card-collapsible-body::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* Ajustes de límite específicos por tipo de tarjeta */
.cfl-syllabus-topics-card.is-open .syllabus-card-collapsible-body {
    max-height: 230px; /* ~3-4 módulos a la vista, scroll interno garantizado */
}

.cfl-syllabus-schedule-card.is-open .syllabus-card-collapsible-body {
    max-height: 210px;
    scrollbar-color: rgba(217, 119, 6, 0.45) rgba(240, 244, 255, 0.5);
}
.cfl-syllabus-schedule-card.is-open .syllabus-card-collapsible-body::-webkit-scrollbar-thumb {
    background: #d97706;
}

.cfl-syllabus-profile-card.is-open .syllabus-card-collapsible-body {
    max-height: 180px;
}

.syllabus-card-label {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--cfl-navy-mid);
}

.syllabus-topics-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cfl-syllabus-topic-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--cfl-text-body);
    line-height: 1.5;
    background: rgba(240, 244, 255, 0.55);
    border-radius: 9px;
    padding: 7px 10px;
    border: 1px solid rgba(29, 78, 216, 0.08);
}

.cfl-syllabus-topic-item i {
    color: #16a34a;
    font-size: 0.78rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.syllabus-profile-text {
    font-size: 0.85rem;
    color: var(--cfl-text-body);
    line-height: 1.65;
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
}

.syllabus-reqs-content,
.syllabus-cert-text {
    font-size: 0.83rem;
    color: var(--cfl-text-body);
    line-height: 1.55;
    margin: 0;
}

/* Bloque de Acción Compacto en Segmento de Temario (Dual Grid 50/50 Estricto) */
.cfl-syllabus-action-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.cfl-syllabus-dual-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 0.4rem;
    width: 100%;
    box-sizing: border-box;
}

.cfl-syllabus-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0.65rem 0.35rem;
    border-radius: 11px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1px;
    text-decoration: none !important;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.cfl-syllabus-btn-action span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Botón Descargar PDF en Rojo Adobe Acrobat */
.cfl-syllabus-btn-download {
    background: linear-gradient(135deg, #ea3829 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(234, 56, 41, 0.32) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.cfl-syllabus-btn-download:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f84f3f 0%, #dc2626 100%) !important;
    box-shadow: 0 6px 18px rgba(234, 56, 41, 0.45) !important;
    filter: brightness(1.06);
}

.cfl-syllabus-btn-download i {
    font-size: 0.76rem;
    flex-shrink: 0;
}

/* Botón Preinscripción en Azul */
.cfl-syllabus-btn-enroll {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cfl-syllabus-btn-enroll:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.40);
    filter: brightness(1.06);
}

@media (max-width: 480px) {
    .cfl-syllabus-dual-actions {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 0.3rem;
    }
    .cfl-syllabus-btn-action {
        font-size: 0.68rem;
        padding: 0.58rem 0.2rem;
        letter-spacing: 0;
        gap: 3px;
    }
    .cfl-syllabus-btn-enroll.is-active-offer {
        font-size: 0.67rem !important;
        letter-spacing: 0 !important;
        padding: 0.58rem 0.15rem !important;
    }
    .cfl-syllabus-btn-download i {
        font-size: 0.70rem;
    }
}

.cfl-syllabus-micro-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0.42rem 0.65rem;
    margin-top: 0.45rem;
    border-radius: 9px;
    font-family: var(--font-heading);
    font-size: 0.73rem;
    line-height: 1.35;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.cfl-syllabus-micro-notice.is-open {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.cfl-syllabus-micro-notice.is-closed {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.cfl-syllabus-micro-notice i {
    font-size: 0.82rem;
    flex-shrink: 0;
}

.cfl-syllabus-micro-notice strong {
    color: #071540;
    font-weight: 800;
}

/* ==========================================================================
   COLUMNA 2 (CENTRO): NODOS DE CURSOS
   ========================================================================== */
.cfl-map-courses-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 0 0 315px;
    position: relative;
    z-index: 3;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modo Compacto Automático para Categorías con Gran Cantidad de Cursos (Evita Scroll Excesivo) */
.cfl-map-courses-col.cfl-compact-leaves {
    gap: 0.45rem;
}

.cfl-map-courses-col.cfl-compact-leaves .cfl-map-course-leaf {
    padding: 8.5px 12px;
    font-size: 0.85rem;
    border-radius: 10px;
    border-left-width: 3.5px;
}

.cfl-map-course-leaf {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(29, 78, 216, 0.16);
    border-left: 4px solid var(--cat-accent, #1d4ed8);
    border-radius: 13px;
    padding: 13px 16px;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--cfl-navy-mid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(11, 31, 102, 0.03);
    animation: cflLeafPop 0.25s ease backwards;
    animation-delay: calc(var(--order, 0) * 0.02s);
}

@keyframes cflLeafPop {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.cfl-map-course-leaf:hover {
    background: #ffffff;
    border-color: var(--cat-accent, #1d4ed8);
    box-shadow: 0 6px 16px rgba(11, 31, 102, 0.12);
}

.cfl-map-course-leaf.active {
    background: linear-gradient(135deg, #071540 0%, #0b1f66 60%, var(--cat-accent, #1d4ed8) 100%);
    border-color: #38bdf8;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(11, 31, 102, 0.35), 0 0 16px rgba(56, 189, 248, 0.35);
}

.cfl-map-course-leaf .leaf-icon {
    font-size: 0.82rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.cfl-map-course-leaf.active .leaf-icon {
    color: #38bdf8;
    opacity: 1;
    transform: translateX(2px);
}

.cfl-map-course-leaf .leaf-content-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.cfl-map-course-leaf .leaf-name-text {
    line-height: 1.25;
}

.cfl-leaf-km42-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.10);
    border: 1px solid rgba(2, 132, 199, 0.25);
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.1;
    transition: all 0.2s ease;
}

.cfl-map-course-leaf.active .cfl-leaf-km42-badge {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.6);
    color: #38bdf8;
}

/* Subcuadro Horarios y Sedes */
.syllabus-schedule-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cfl-sched-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.cfl-sched-item.subsede-item {
    background: rgba(2, 132, 199, 0.05);
    border-color: rgba(2, 132, 199, 0.30);
}

.sched-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.sched-pill-tag-main {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.sched-comm-entry {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sched-comm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.22);
    padding: 2px 7px;
    border-radius: 6px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.sched-comm-divider {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}

.subsede-item .sched-comm-divider {
    border-top-color: rgba(2, 132, 199, 0.25);
}

.sched-dates {
    font-size: 0.84rem;
    color: #1e293b;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.4;
}

.sched-dates i {
    color: #d97706;
    margin-top: 3px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.sched-dates strong {
    color: #0f172a;
    font-weight: 700;
}

.sched-time {
    font-size: 0.84rem;
    color: #334155;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.4;
}

.sched-time i {
    color: #0284c7;
    margin-top: 3px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.sched-time strong {
    color: #0f172a;
    font-weight: 700;
}

/* ==========================================================================
   VERTIENTES INTERACTIVAS DE SEDE Y TURNO (ARQUITECTURA DE NAVEGACIÓN DISRUPTIVA)
   ========================================================================== */
.cfl-vertiente-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 6px;
    width: 100%;
}

.cfl-vertiente-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 11px;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    width: 100%;
}

.cfl-vertiente-pill:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    color: #0369a1;
    transform: translateX(2px);
}

.cfl-vertiente-pill.active {
    background: linear-gradient(135deg, #0b1f66 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
}

.cfl-vertiente-pill.active i {
    color: #38bdf8 !important;
}

.cfl-vertiente-pill .vertiente-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cfl-vertiente-pill .vertiente-info strong {
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.cfl-vertiente-pill .vertiente-info small {
    font-family: var(--font-body);
    font-size: 0.70rem;
    font-weight: 500;
    opacity: 0.85;
}

.cfl-vertiente-pill .vertiente-check {
    margin-left: auto;
    font-size: 0.78rem;
    color: #4ade80 !important;
}

.cfl-vertiente-single {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.cfl-vertiente-single strong {
    font-family: var(--font-heading);
    font-size: 0.84rem;
    color: #0f172a;
    font-weight: 700;
}

.cfl-vertiente-single small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: #64748b;
}

/* ==========================================================================
   PASTILLAS DE SEDE / TURNO COMPACTAS EN COLUMNA 3 (FICHA DEL MAPA)
   Optimizadas para que NUNCA partan palabras en móvil ni deformen el árbol
   ========================================================================== */
.cfl-sede-tabs-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
    width: 100%;
}

.cfl-sede-tab-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 9px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.cfl-sede-tab-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfl-sede-tab-pill:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    color: #0369a1;
}

.cfl-sede-tab-pill.active {
    background: linear-gradient(135deg, #0b1f66 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.cfl-tab-check {
    font-size: 0.70rem;
    color: #4ade80 !important;
    flex-shrink: 0;
}

/* ==========================================================================
   SELECTOR DE SEDE FORMAL EN COLUMNA 4 (PROGRAMA & CURSADA)
   Aprovecha todo el ancho disponible para desplegar la dirección oficial
   ========================================================================== */
.cfl-sched-sede-switcher {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cfl-sched-sede-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

@media (max-width: 480px) {
    .cfl-sched-sede-tabs {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.cfl-sched-sede-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    padding: 7px 10px;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: left;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

.cfl-sched-sede-tab:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.cfl-sched-sede-tab.active {
    background: linear-gradient(135deg, #0b1f66 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(29, 78, 216, 0.25);
}

.cfl-sched-sede-tab i {
    font-size: 0.88rem;
    color: #0284c7;
    flex-shrink: 0;
}

.cfl-sched-sede-tab.active i {
    color: #38bdf8 !important;
}

.cfl-sched-sede-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.cfl-sched-sede-info strong {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfl-sched-sede-info small {
    font-size: 0.68rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfl-sched-sede-tab.active .cfl-tab-check {
    margin-left: auto;
    font-size: 0.74rem;
    color: #4ade80 !important;
}

/* Banner de la Sede seleccionada en Etapa 4 */
.sched-vertiente-banner {
    margin-bottom: 10px;
}

.sched-vertiente-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(11, 31, 102, 0.08);
    border: 1px solid rgba(11, 31, 102, 0.18);
    color: #0b1f66;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.1px;
    padding: 5px 11px;
    border-radius: 8px;
    line-height: 1.3;
}

.sched-vertiente-badge i {
    color: #0284c7;
}

/* Selector de turnos de cursada */
.cfl-shift-selector-wrap {
    margin: 8px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cfl-shift-selector-label {
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cfl-shift-selector-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cfl-shift-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 11px;
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cfl-shift-pill:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.cfl-shift-pill.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}

.cfl-shift-pill.active i {
    color: #fef08a;
}

.sched-vertiente-detail-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.sched-detail-row {
    font-family: var(--font-body);
    font-size: 0.80rem;
    color: #1e293b;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    line-height: 1.4;
}

.sched-detail-row strong {
    font-family: var(--font-heading);
    color: #0f172a;
}

.sched-detail-row i {
    color: #0284c7;
    margin-top: 3px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.sched-detail-row strong {
    color: #0f172a;
    font-weight: 700;
}

/* ==========================================================================
   COLUMNA 1 (IZQUIERDA): LISTADO VERTICAL DE CATEGORÍAS (SIN SCROLL, AGRANDADO)
   ========================================================================== */
.cfl-map-sidebar-col {
    flex: 0 0 280px;
    position: relative;
    z-index: 4;
}

.cfl-sidebar-panel {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(29, 78, 216, 0.16);
    border-radius: 22px;
    padding: 1.15rem 1rem;
    box-shadow: 0 8px 24px rgba(11, 31, 102, 0.05);
}

.cfl-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--cfl-navy-mid);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 0.7rem;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid rgba(11, 31, 102, 0.08);
}

.cfl-sidebar-header i {
    color: var(--cfl-blue-bright);
}

.cfl-sidebar-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.36rem;
    max-height: none;
    overflow-y: visible;
}

.cfl-sidebar-cat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px 8px 11px;
    border-radius: 12px;
    border: 1.5px solid rgba(226, 232, 240, 0.95);
    background: #ffffff;
    color: var(--cfl-navy-mid);
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(11, 31, 102, 0.04);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cfl-sidebar-cat-btn .cat-btn-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.cfl-sidebar-cat-btn .cat-btn-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.cfl-sidebar-cat-btn i {
    color: var(--cat-accent, #1d4ed8);
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.cfl-sidebar-cat-btn .cat-btn-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.cfl-sidebar-cat-btn .cat-btn-badge {
    background: rgba(11, 31, 102, 0.06);
    color: var(--cfl-navy-mid);
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.cfl-sidebar-cat-btn .cat-btn-arrow {
    font-size: 0.72rem;
    color: #94a3b8;
    width: auto;
    text-align: right;
    transition: transform 0.22s ease, color 0.22s ease;
}

/* Efecto hover: invitación clara a interactuar */
.cfl-sidebar-cat-btn:hover {
    background: #f8fafc;
    border-color: rgba(29, 78, 216, 0.3);
    color: var(--cfl-blue-bright);
    box-shadow: 0 3px 8px rgba(11, 31, 102, 0.08);
    transform: translateY(-1px);
}

.cfl-sidebar-cat-btn:hover .cat-btn-arrow {
    color: var(--cfl-blue-bright);
    transform: translateX(2px);
}

.cfl-sidebar-cat-btn:hover .cat-btn-badge {
    background: rgba(29, 78, 216, 0.12);
    color: var(--cfl-blue-bright);
}

/* Efecto apretable táctil al pulsar con el dedo / click */
.cfl-sidebar-cat-btn:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: 0 1px 2px rgba(11, 31, 102, 0.08);
}

/* Botón de Categoría Activo / Seleccionado */
.cfl-sidebar-cat-btn.active {
    background: linear-gradient(135deg, #071540 0%, #0b1f66 60%, var(--cat-accent, #1d4ed8) 100%);
    color: #ffffff !important;
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 5px 16px rgba(11, 31, 102, 0.28), 0 0 12px rgba(56, 189, 248, 0.18);
    transform: translateY(-1px);
}

.cfl-sidebar-cat-btn.active .cat-btn-name {
    color: #ffffff;
}

.cfl-sidebar-cat-btn.active i {
    color: #38bdf8 !important;
}

.cfl-sidebar-cat-btn.active .cat-btn-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.cfl-sidebar-cat-btn.active .cat-btn-arrow {
    color: #38bdf8 !important;
    transform: translateX(3px);
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.8));
}

/* ==========================================================================
   RESPONSIVE ADAPTATIONS
   ========================================================================== */
@media (max-width: 1180px) {
    .cfl-map-flow-stage-l2r {
        grid-template-columns: 240px 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    .cfl-map-stage-card {
        padding: 1.2rem 1rem;
        border-radius: 20px;
        -webkit-overflow-scrolling: touch;
    }
    .cfl-map-flow-stage-l2r {
        display: flex;
        flex-direction: row;
        gap: 5.5rem;
        min-height: 480px;
        padding-right: 1.5rem;
    }
    .cfl-map-flow-stage-l2r.is-hidden,
    #cflMapStage.is-hidden,
    #cflMapStage[style*="display: none"],
    #cflMapStage[style*="display:none"] {
        display: none !important;
        min-height: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    .cfl-map-empty-offers-state.is-hidden {
        display: none !important;
    }
    .cfl-map-sidebar-col {
        flex: 0 0 278px;
        min-width: 278px;
        max-width: 278px;
    }
    .cfl-sidebar-panel {
        padding: 0.55rem 0.55rem !important;
        border-radius: 14px !important;
    }
    .cfl-sidebar-cat-btn {
        padding: 6.5px 8px !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-left {
        gap: 6px !important;
        min-width: 0 !important;
    }
    .cfl-sidebar-cat-btn i {
        font-size: 0.88rem !important;
        width: 16px !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-name {
        font-size: 0.81rem !important;
        letter-spacing: -0.2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-right {
        gap: 4px !important;
        flex-shrink: 0 !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-badge.is-offer {
        padding: 1.5px 5.5px !important;
        font-size: 0.68rem !important;
        gap: 3px !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-badge.is-offer i {
        font-size: 0.58rem !important;
    }
    .cfl-sidebar-cat-btn .cat-btn-arrow {
        font-size: 0.65rem !important;
    }
    .badge-count-desktop {
        display: none !important;
    }
    .badge-count-mobile {
        display: inline !important;
    }
    .cfl-map-courses-col {
        flex: 0 0 205px;
        min-width: 205px;
        max-width: 205px;
    }
    .cfl-map-course-leaf,
    .cfl-map-courses-col.cfl-compact-leaves .cfl-map-course-leaf {
        padding: 9px 11px;
        font-size: 0.82rem;
        gap: 6px;
    }
    .cfl-map-course-leaf .leaf-name-text {
        white-space: normal;
        word-break: break-word;
    }
    .cfl-map-details-col {
        flex: 0 0 230px;
        min-width: 230px;
        max-width: 230px;
    }
    .cfl-subnode-card {
        padding: 0.65rem 0.85rem;
    }
    .cfl-map-syllabus-col {
        flex: 0 0 290px;
        min-width: 290px;
        max-width: 290px;
    }
    .cfl-map-svg-canvas {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .cfl-view-switcher {
        width: 100%;
    }
    .cfl-view-btn {
        flex: 1;
        justify-content: center;
        padding: 9px 12px;
        font-size: 0.82rem;
    }
    .cfl-search-wrapper {
        padding: 1.5rem 1.2rem;
    }
    .cfl-cat-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 8px;
        margin-bottom: 2rem;
    }
    .cfl-cat-btn {
        flex: 0 0 auto;
        padding: 7px 14px;
        font-size: 0.76rem;
    }
    .cfl-courses-grid {
        grid-template-columns: 1fr;
    }
    .cfl-course-card {
        padding: 1.4rem;
    }
    .cfl-modal-overlay {
        padding: 10px;
        padding-top: 50px;
    }
    .cfl-modal-header {
        padding: 1.2rem;
    }
    .cfl-modal-header h2 {
        font-size: 1.3rem;
    }
    .cfl-modal-body {
        padding: 1.2rem;
    }
    .cfl-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    .cfl-modal-btn-action,
    .cfl-modal-btn-close {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .cfl-vacancies-alert-banner {
        padding: 0.85rem 1.1rem;
        gap: 12px;
        margin-bottom: 1.5rem;
    }
    .cfl-vacancies-alert-banner .vacancies-alert-text {
        font-size: 0.84rem;
    }
    .cfl-syllabus-btn-enroll {
        padding: 0.85rem 1.1rem;
        font-size: 0.82rem;
    }
}

.cfl-courses-header-section {
    padding: 1.2rem 0 0.2rem;
    background: transparent;
    position: relative;
    z-index: 5;
}

.cfl-courses-main-section {
    padding: 0 0 2rem;
    background: transparent;
    position: relative;
    z-index: 5;
}

/* ==========================================================================
   ESTILOS DE OFERTA ACADÉMICA EN TIEMPO REAL & FILTROS INTELIGENTES
   ========================================================================== */
.cfl-map-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: 1000px;
    margin: 0 auto 0.6rem;
}

.cfl-map-filter-pills {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    order: 1;
}

.cfl-map-top-bar .cfl-compact-search-box {
    margin: 0;
    flex: 1 1 300px;
    max-width: 380px;
    order: 2;
}

.cfl-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--cfl-navy-mid);
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(29, 78, 216, 0.25);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 4px 12px rgba(11, 31, 102, 0.06);
}

.cfl-filter-pill:hover {
    background: #ffffff;
    border-color: #1d4ed8;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(11, 31, 102, 0.12);
}

.cfl-filter-pill.active {
    background: linear-gradient(135deg, #071540 0%, #1d4ed8 100%);
    color: #ffffff !important;
    border-color: #38bdf8;
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.35);
}

.cfl-filter-pill.active i {
    color: #38bdf8 !important;
}

.cfl-filter-pill.cfl-pill-oferta-active {
    border-color: rgba(16, 185, 129, 0.6);
}

.cfl-filter-pill.cfl-pill-oferta-active i.fa-bolt {
    color: #10b981 !important;
}

.cfl-filter-pill.cfl-pill-oferta-active.active i.fa-bolt {
    color: #34d399 !important;
}

.cfl-filter-pill .pill-text-mobile {
    display: none;
}

.cfl-filter-pill .pill-text-desktop {
    display: inline;
}

.cfl-pulse-dot {
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: cflPulseGreen 1.8s infinite;
    flex-shrink: 0;
}

@keyframes cflPulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Botón de Categoría con Ofertas Activas (Acento lateral verde y contador iluminado) */
.cfl-sidebar-cat-btn.has-active-offer {
    border-left: 4.5px solid #10b981 !important;
}

.cfl-sidebar-cat-btn.has-active-offer:hover {
    border-left-color: #059669 !important;
}

.cfl-sidebar-cat-btn.has-active-offer.active {
    border-left: 5px solid #34d399 !important;
}

/* Contador Destacado con Vacantes Abiertas (ej: ⚡ 1 de 8) */
.cat-btn-badge.is-offer {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
    font-weight: 800 !important;
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    letter-spacing: -0.2px;
}

.cat-btn-badge.is-offer i {
    color: #16a34a !important;
    font-size: 0.62rem !important;
    width: auto !important;
}

.cfl-sidebar-cat-btn:hover .cat-btn-badge.is-offer {
    background: #bbf7d0 !important;
    color: #14532d !important;
    border-color: #4ade80 !important;
}

.cfl-sidebar-cat-btn.active .cat-btn-badge.is-offer {
    background: #ffffff !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.cfl-sidebar-cat-btn.active .cat-btn-badge.is-offer i {
    color: #059669 !important;
}

.cfl-leaf-oferta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #065f46;
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 2.5px 8px;
    border-radius: 6px;
    margin-top: 3px;
    line-height: 1.2;
}

/* Estado INACTIVO de curso en oferta */
.cfl-map-course-leaf.is-on-offer:not(.active) {
    background: #f0fdf4 !important;
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
    border-left: 4.5px solid #10b981 !important;
}

.cfl-map-course-leaf.is-on-offer:not(.active) .leaf-name-text {
    color: #071540 !important;
    font-weight: 700;
}

.cfl-map-course-leaf.is-on-offer:not(.active):hover {
    background: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.22);
}

/* Estado ACTIVO / SELECCIONADO de curso en oferta (Alto Contraste) */
.cfl-map-course-leaf.active.is-on-offer {
    background: linear-gradient(135deg, #071e22 0%, #064e3b 55%, #059669 100%) !important;
    border: 2px solid #34d399 !important;
    border-left: 5px solid #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 26px rgba(6, 78, 59, 0.45), 0 0 18px rgba(52, 211, 153, 0.4) !important;
}

.cfl-map-course-leaf.active.is-on-offer .leaf-name-text {
    color: #ffffff !important;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.cfl-map-course-leaf.active.is-on-offer .leaf-icon {
    color: #34d399 !important;
    opacity: 1;
}

.cfl-map-course-leaf.active .cfl-leaf-oferta-badge {
    background: #ffffff !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cfl-syllabus-btn-enroll.is-active-offer {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border-color: rgba(52, 211, 153, 0.5) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
    font-size: 0.71rem !important;
    letter-spacing: 0 !important;
    padding: 0.65rem 0.25rem !important;
}

.cfl-syllabus-btn-enroll.is-active-offer:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.5) !important;
}

.cfl-syllabus-btn-enroll.is-closed {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25) !important;
}

/* ==========================================================================
   BANNER DE OFERTAS EN HERO (HOME) - TERMINACIÓN PREMIUM & MOBILE-FIRST
   ========================================================================== */
.cfl-hero-oferta-banner {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    border-radius: 999px;
    padding: 6px 8px 6px 14px;
    margin-bottom: 1.6rem;
    box-shadow: 0 8px 24px -6px rgba(5, 150, 105, 0.22), 0 2px 8px rgba(11, 31, 102, 0.04);
    max-width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cfl-hero-oferta-banner:hover {
    border-color: #10b981;
    box-shadow: 0 10px 28px -6px rgba(5, 150, 105, 0.32), 0 4px 12px rgba(11, 31, 102, 0.08);
}

.cfl-hero-oferta-banner .oferta-banner-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cfl-hero-oferta-banner .oferta-banner-text {
    font-size: 0.95rem;
    color: #071540;
    line-height: 1.3;
}

.cfl-hero-oferta-banner .oferta-banner-text strong {
    color: #064e3b;
    font-weight: 800;
}

.cfl-hero-oferta-banner .oferta-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none !important;
    padding: 7px 16px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.38);
    transition: all 0.22s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.cfl-hero-oferta-banner .oferta-banner-cta i {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.cfl-hero-oferta-banner .oferta-banner-cta:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.cfl-hero-oferta-banner .oferta-banner-cta:hover i {
    transform: translateX(2px);
}

/* RESPONSIVE MÓVIL Y TABLET (< 991px) - DISTRIBUCIÓN COMPACTA Y SIN ESPACIOS EXCESIVOS */
@media (max-width: 991px) {
    /* Header compacto con título legible y proporcionado */
    .cfl-courses-header-wrap,
    .cfl-courses-header-section {
        padding: 0 !important;
        margin: 0 0 6px 0 !important;
    }
    .cfl-courses-header-wrap .section-title-mist,
    .cfl-courses-header-section .section-title-mist {
        padding: 0.55rem 0.85rem !important;
        border-radius: 14px !important;
        margin: 0 auto 6px !important;
        box-shadow: 0 3px 12px rgba(11, 31, 102, 0.04) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .cfl-courses-header-wrap .section-tag,
    .cfl-courses-header-section .section-tag {
        font-size: 0.62rem !important;
        letter-spacing: 0.8px !important;
        margin-bottom: 0.15rem !important;
    }
    .cfl-courses-header-wrap .section-title,
    .cfl-courses-header-section .section-title {
        font-size: 1.35rem !important;
        font-weight: 800 !important;
        margin-bottom: 0.15rem !important;
        line-height: 1.2 !important;
    }
    .cfl-courses-header-wrap .section-subtitle,
    .cfl-courses-header-section .section-subtitle {
        font-size: 0.74rem !important;
        line-height: 1.25 !important;
        margin: 0 auto 0.25rem !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .cfl-courses-header-wrap .section-divider,
    .cfl-courses-header-section .section-divider {
        margin: 0.15rem auto 0 !important;
        width: 32px !important;
        height: 2px !important;
    }

    /* Sección principal pegada al título */
    .cfl-courses-main-section {
        padding: 0.35rem 0 1rem !important;
        margin: 0 !important;
    }
    .cfl-courses-main-section > .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Banner de Inscripciones Abiertas compacto y en 1 sola línea */
    .cfl-hero-oferta-banner {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-radius: 999px;
        padding: 4px 6px 4px 11px;
        gap: 8px;
        width: auto;
        max-width: 100%;
        margin: 0 auto 0.85rem;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 4px 12px rgba(5, 150, 105, 0.16);
    }

    .cfl-hero-oferta-banner .oferta-banner-left {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-align: left;
    }

    .cfl-hero-oferta-banner .cfl-pulse-dot {
        width: 7px;
        height: 7px;
    }

    .cfl-hero-oferta-banner .oferta-banner-text {
        font-size: 0.78rem;
        white-space: nowrap;
        line-height: 1.2;
    }

    .cfl-hero-oferta-banner .oferta-banner-cta {
        width: auto;
        justify-content: center;
        padding: 4px 10px;
        font-size: 0.72rem;
        font-weight: 700;
        border-radius: 999px;
        gap: 4px;
    }

    .cfl-hero-oferta-banner .oferta-banner-cta i {
        font-size: 0.62rem;
    }

    /* Barra Superior de Controles: 1) Buscador arriba, 2) Botón de catálogo abajo, 3) Mapa abajo */
    .cfl-map-top-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        margin: 0 auto 0.3rem !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* 1. Arriba de todo: el buscador sin espacios residuales */
    .cfl-map-top-bar .cfl-compact-search-box,
    .cfl-compact-search-box {
        position: relative !important;
        order: 1 !important;
        flex: 0 0 38px !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        box-sizing: border-box !important;
    }

    .cfl-compact-search-input {
        padding: 7px 32px 7px 34px !important;
        font-size: 0.84rem !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .cfl-compact-search-box .search-icon {
        left: 11px !important;
        font-size: 0.82rem !important;
    }

    .cfl-compact-search-clear {
        right: 9px !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 0.82rem !important;
    }

    /* Desplegable de sugerencias en móvil: elegante, flotante y pegado al buscador */
    .cfl-search-suggestions-dropdown {
        top: calc(100% + 2px) !important;
        margin-top: 0 !important;
        border-radius: 14px !important;
        padding: 4px !important;
        box-shadow: 0 12px 32px rgba(7, 21, 64, 0.22), 0 3px 10px rgba(2, 132, 199, 0.14) !important;
        background: rgba(255, 255, 255, 0.99) !important;
        z-index: 99999 !important;
    }

    .cfl-suggestion-item {
        padding: 8px 10px !important;
        gap: 10px !important;
    }

    .cfl-suggestion-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.88rem !important;
    }

    .cfl-suggestion-title {
        font-size: 0.84rem !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    .cfl-suggestion-meta {
        font-size: 0.72rem !important;
        gap: 4px 8px !important;
    }

    /* 2. Abajo: botones de catálogo e inscripción juntos */
    .cfl-map-filter-pills {
        order: 2 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .cfl-filter-pill {
        padding: 7px 8px !important;
        font-size: 0.74rem !important;
        font-weight: 700 !important;
        justify-content: center !important;
        gap: 6px !important;
        border-radius: 999px !important;
        white-space: nowrap !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .cfl-filter-pill i {
        font-size: 0.76rem !important;
    }

    .cfl-filter-pill .pill-text-desktop {
        display: none !important;
    }

    .cfl-filter-pill .pill-text-mobile {
        display: inline !important;
    }

    /* 3. Abajo: el mapa conceptual de cursos (pegado, sin espacios) */
    .cfl-map-flow-indicator {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }

    .cfl-map-stage-wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .cfl-map-stage-card {
        padding: 0.3rem 0.45rem 0.8rem !important;
        border-radius: 16px !important;
        margin-top: 0 !important;
    }

    /* Panel de Áreas de Formación compacto */
    .cfl-sidebar-panel {
        padding: 0.6rem 0.65rem !important;
        border-radius: 14px !important;
    }

    .cfl-sidebar-header {
        padding-bottom: 0.35rem !important;
        margin-bottom: 0.35rem !important;
        font-size: 0.74rem !important;
        gap: 5px !important;
    }
}

/* ==========================================================================
   AVISO TOAST & BANNER CONTEXTUAL: CURSOS/TURNOS DE LA 2° MITAD DEL AÑO
   ========================================================================== */

/* Toast Flotante Contextual Emitido por Cefelito */
.cfl-semester-toast {
    position: fixed;
    bottom: 106px;
    left: 24px;
    width: fit-content;
    max-width: min(340px, calc(100vw - 32px));
    z-index: 9999999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom left;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cfl-semester-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cfl-toast-inner {
    background: linear-gradient(135deg, rgba(7, 21, 64, 0.96) 0%, rgba(11, 31, 102, 0.96) 65%, rgba(16, 38, 110, 0.96) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.65);
    box-shadow: 0 12px 30px rgba(7, 21, 64, 0.5), 0 0 18px rgba(217, 119, 6, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #ffffff;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.cfl-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cfl-toast-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfl-toast-cefelito-avatar {
    color: #38bdf8;
    font-size: 0.74rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.cfl-toast-cefelito-avatar i {
    color: #38bdf8;
    font-size: 0.85rem;
}

.cfl-toast-timer-wrap {
    width: 100%;
    height: 4px;
    background: rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 5px;
    position: relative;
}

.cfl-toast-progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    transform-origin: left;
}

.cfl-toast-tail {
    position: absolute;
    bottom: -8px;
    left: 38px;
    width: 16px;
    height: 9px;
    pointer-events: none;
    z-index: 5;
    line-height: 0;
}

.cfl-toast-tail svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.cfl-toast-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.26) 0%, rgba(217, 119, 6, 0.18) 100%);
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(217, 119, 6, 0.22);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.cfl-toast-close {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin: 0;
    transition: color 0.15s, transform 0.15s;
}

.cfl-toast-close:hover {
    color: #f59e0b;
    transform: scale(1.15);
}

.cfl-toast-msg {
    font-size: 0.81rem;
    color: #f1f5f9;
    line-height: 1.38;
    margin: 0;
}

.cfl-toast-msg strong {
    color: #ffffff;
    font-weight: 700;
}

.cfl-toast-date-highlight {
    color: #fde047 !important;
    font-weight: 800;
}

.cfl-toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    width: 100%;
    transform-origin: left;
}

/* Banner de cursada Columna 4 (Ficha de Cursada) */
.sched-second-half-box {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(11, 31, 102, 0.08) 100%);
    border: 1px solid rgba(217, 119, 6, 0.35);
    border-left: 4px solid #d97706;
    border-radius: 10px;
    padding: 9px 12px;
    margin-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sched-sh-badge-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.sched-sh-pill {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    font-size: 0.70rem;
    font-weight: 800;
    padding: 2.5px 8.5px;
    border-radius: 12px;
    border: 1px solid rgba(217, 119, 6, 0.38);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.12);
}

.sched-sh-body {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.79rem;
    color: #334155;
    line-height: 1.4;
}

.sched-sh-body i {
    color: #0284c7;
    margin-top: 2px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .cfl-semester-toast {
        bottom: 84px;
        left: 14px;
        right: auto;
        max-width: calc(100vw - 28px);
    }
    .cfl-toast-inner {
        padding: 10px 12px 11px;
    }
    .cfl-toast-tail {
        left: 24px;
    }
}

/* ==========================================================================
   MODAL GUÍA INTERACTIVA DEL MAPA DE CURSOS (CAMINO 1)
   ========================================================================== */

.cfl-guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.cfl-guide-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 21, 64, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cfl-guide-modal-dialog {
    position: relative;
    z-index: 2;
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(7, 21, 64, 0.4), 0 0 30px rgba(56, 189, 248, 0.15);
    animation: cflGuideModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cflGuideModalPop {
    from {
        opacity: 0;
        transform: scale(0.93) translateY(18px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cfl-guide-modal-content {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cfl-guide-modal-header {
    background: linear-gradient(135deg, #071540 0%, #0b1f66 45%, #0284c7 100%);
    color: #ffffff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cfl-guide-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cfl-guide-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #38bdf8;
    flex-shrink: 0;
}

.cfl-guide-title {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.cfl-guide-subtitle {
    margin: 4px 0 0;
    font-size: 0.84rem;
    color: #cbd5e1;
}

.cfl-guide-btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cfl-guide-btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

.cfl-guide-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f8fafc;
}

/* Diagrama de 3 columnas estilo PC */
.cfl-guide-steps-diagram {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
}

.cfl-guide-step-card {
    flex: 1;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(11, 31, 102, 0.05);
    transition: transform 0.2s, border-color 0.2s;
}

.cfl-guide-step-card:hover {
    transform: translateY(-3px);
    border-color: #0284c7;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

.cfl-guide-step-num {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0b1f66;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfl-guide-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0 10px;
}

.cfl-guide-step-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #071540;
    margin: 0 0 6px;
}

.cfl-guide-step-desc {
    font-size: 0.81rem;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

.cfl-guide-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
    font-size: 1.15rem;
    flex-shrink: 0;
    opacity: 0.6;
}

/* Tip Mobile */
.cfl-guide-mobile-tip {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1.5px solid rgba(2, 132, 199, 0.28);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cfl-guide-tip-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #0284c7;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.cfl-guide-tip-text {
    font-size: 0.84rem;
    color: #1e293b;
    line-height: 1.45;
}

.cfl-guide-tip-text strong {
    color: #071540;
}

.cfl-guide-modal-footer {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.cfl-guide-btn-primary {
    background: linear-gradient(135deg, #0b1f66 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cfl-guide-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.cfl-guide-btn-secondary {
    background: #ffffff;
    color: #0b1f66;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.cfl-guide-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #0284c7;
    color: #0284c7;
}

/* Botón de acceso a la guía desde la página */
.cfl-map-guide-pill-btn {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
}

.cfl-map-guide-pill-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.2);
}

.cfl-map-guide-pill-btn:hover i,
.cfl-map-guide-pill-btn:hover span {
    color: #ffffff !important;
}

.cfl-map-mobile-guide-bar {
    display: none;
    justify-content: center;
    margin: 8px 0 12px;
}

@media (max-width: 991px) {
    .cfl-map-mobile-guide-bar {
        display: flex;
    }
}

@media (max-width: 640px) {
    .cfl-guide-steps-diagram {
        flex-direction: column;
        gap: 10px;
    }
    .cfl-guide-step-arrow {
        transform: rotate(90deg);
        margin: -2px 0;
    }
    .cfl-guide-step-card {
        padding: 14px 12px;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 12px;
    }
    .cfl-guide-step-num {
        position: static;
        flex-shrink: 0;
    }
    .cfl-guide-step-icon {
        display: none;
    }
    .cfl-guide-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    .cfl-guide-btn-primary,
    .cfl-guide-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}




/* Botón Guía Visual en Barra de Pasos PC */
.cfl-flow-guide-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1.5px solid #bae6fd;
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.1);
}

.cfl-flow-guide-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

.cfl-flow-guide-btn:hover i,
.cfl-flow-guide-btn:hover span {
    color: #ffffff !important;
}

.cfl-flow-guide-btn i {
    color: #0284c7;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}
