/* ============================================================
   SAEC2 - Sección Oferta Académica
   Estilos complementarios a Bootstrap 4
   ============================================================ */

:root {
    --saec-blue: #002B49;
    --saec-dark: #001524;
    --saec-teal: #0d9488;
    --saec-teal-light: #f0fdfa;
    --saec-bg: #F8FAFC;
}

/* === LAYOUT GENERAL === */
.edu-section {
    background: var(--saec-bg);
    min-height: 60vh;
    padding-bottom: 3rem;
}

.edu-section .edu-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saec-blue);
    margin-bottom: 0.5rem;
}

.edu-section .edu-subtitle {
    color: #64748b;
    max-width: 800px;
    font-size: 0.95rem;
}

/* === BARRA DE BÚSQUEDA === */
.edu-search-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.edu-search-bar .form-control {
    border: none;
    box-shadow: none;
    font-size: 0.9rem;
    padding-left: 2.5rem;
    background: transparent;
}

.edu-search-bar .form-control:focus {
    box-shadow: none;
}

.edu-search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
}

.edu-search-wrapper {
    position: relative;
    flex: 1;
}

.edu-results-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    padding: 0 1rem;
    white-space: nowrap;
}

.btn-mobile-filters {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    color: #475569;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
}

.btn-mobile-filters:hover {
    background: #f1f5f9;
}

/* === SIDEBAR FILTROS === */
.edu-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.edu-sidebar .filter-group {
    margin-bottom: 1.5rem;
}

.edu-sidebar .filter-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.edu-sidebar .filter-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: #475569;
    transition: color 0.2s;
}

.edu-sidebar .filter-option:hover {
    color: var(--saec-blue);
}

.edu-sidebar .filter-option.active {
    color: var(--saec-blue);
    font-weight: 700;
}

.edu-sidebar .filter-radio {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.edu-sidebar .filter-option.active .filter-radio {
    background: var(--saec-blue);
    border-color: var(--saec-blue);
}

.edu-sidebar .filter-radio-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    display: none;
}

.edu-sidebar .filter-option.active .filter-radio-dot {
    display: block;
}

.edu-sidebar .filter-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 1rem 0;
}

/* Botones de filtro (Condición) */
.edu-sidebar .filter-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin: 0.15rem;
}

.edu-sidebar .filter-pill:hover {
    border-color: #cbd5e1;
    text-decoration: none;
    color: #475569;
}

.edu-sidebar .filter-pill.active {
    background: var(--saec-blue);
    border-color: var(--saec-blue);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 43, 73, 0.25);
}

/* === CARDS GRID === */
.edu-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.edu-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.edu-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    text-decoration: none !important;
    color: inherit !important;
}

.edu-card-img-wrapper {
    position: relative;
    height: 176px;
    overflow: hidden;
    background: #e2e8f0;
}

.edu-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    filter: saturate(0.5);
}

.edu-card:hover .edu-card-img {
    transform: scale(1.05);
    filter: saturate(1);
}

.edu-card-badge-overlay {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.edu-card-badge-free {
    background: var(--saec-teal);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.edu-card-modality-tag {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--saec-blue);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-top-left-radius: 0.5rem;
    text-transform: uppercase;
}

.edu-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.edu-card-type {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--saec-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.edu-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5rem;
    transition: color 0.2s;
}

.edu-card:hover .edu-card-title {
    color: var(--saec-blue);
}

.edu-card-desc {
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.edu-card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.edu-card-duration {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.edu-card-cta {
    font-size: 0.75rem;
    color: var(--saec-teal);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    transition: transform 0.2s;
}

.edu-card:hover .edu-card-cta {
    transform: translateX(4px);
}

/* === ESTADO VACÍO === */
.edu-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 2px dashed #e2e8f0;
}

.edu-empty-icon {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #cbd5e1;
    font-size: 1.5rem;
}

.edu-empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}

.edu-empty-state p {
    font-size: 0.85rem;
    color: #64748b;
}

.edu-clear-filters {
    color: var(--saec-teal);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    background: none;
    margin-top: 0.5rem;
}

/* === DETALLE - HERO === */
.edu-detail-hero {
    position: relative;
    height: 280px;
    background: var(--saec-dark);
    overflow: hidden;
    border-radius: 1rem;
}

.edu-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.edu-detail-hero .hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--saec-dark), transparent, transparent);
    opacity: 0.9;
}

.edu-detail-hero .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem 2rem;
    width: 100%;
}

.edu-detail-hero .hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.edu-detail-hero .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.edu-detail-hero .hero-meta i {
    color: var(--saec-teal);
    margin-right: 0.4rem;
}

/* Badges */
.edu-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.edu-badge-blue {
    background: var(--saec-blue);
    color: white;
    border: 1px solid #00406E;
}

.edu-badge-teal {
    background: var(--saec-teal-light);
    color: #115e59;
    border: 1px solid #99f6e4;
}

/* === DETALLE - CONTENIDO === */
.edu-detail-content {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.edu-detail-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--saec-blue);
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.edu-detail-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--saec-blue);
    margin-bottom: 1rem;
}

.edu-syllabus-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #f1f5f9;
    margin: 1.5rem 0;
}

.edu-syllabus-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}

.edu-syllabus-item i {
    color: var(--saec-teal);
    margin-top: 2px;
    flex-shrink: 0;
}

.edu-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: var(--saec-blue);
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.edu-btn-outline:hover {
    background: #e2e8f0;
    text-decoration: none;
    color: var(--saec-blue);
}

/* === DETALLE - SIDEBAR === */
.edu-detail-sidebar {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.edu-detail-sidebar .sidebar-cost-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.edu-detail-sidebar .sidebar-cost-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saec-blue);
    margin-top: 0.25rem;
}

.edu-detail-sidebar .sidebar-discount {
    font-size: 0.7rem;
    color: #0f766e;
    background: var(--saec-teal-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
    margin-top: 0.5rem;
}

.edu-detail-sidebar .form-control {
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    transition: all 0.2s;
}

.edu-detail-sidebar .form-control:focus {
    background: #fff;
    border-color: var(--saec-blue);
    box-shadow: 0 0 0 2px rgba(0, 43, 73, 0.1);
}

.edu-detail-sidebar label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.btn-saec {
    background: var(--saec-blue);
    color: white;
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    width: 100%;
    font-size: 0.9rem;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(0, 43, 73, 0.2);
    cursor: pointer;
}

.btn-saec:hover {
    background: var(--saec-dark);
    color: white;
}

.edu-success-box {
    text-align: center;
    padding: 1.5rem;
}

.edu-success-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 1px solid #bbf7d0;
    font-size: 1.5rem;
}

.edu-contact-box {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.edu-contact-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.edu-contact-box p {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.5rem;
}

.edu-contact-box a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--saec-blue);
}

/* === BACK BUTTON === */
.edu-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
    text-decoration: none !important;
}

.edu-back-btn:hover {
    color: var(--saec-blue);
    text-decoration: none !important;
}

.edu-back-btn .back-icon {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.edu-back-btn:hover .back-icon {
    border-color: var(--saec-blue);
}

/* === MOBILE DRAWER === */
.edu-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 21, 36, 0.75);
    z-index: 1050;
    display: none;
}

.edu-drawer-overlay.show {
    display: block;
}

.edu-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 1051;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

.edu-drawer.show {
    left: 0;
}

.edu-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.edu-drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--saec-blue);
}

.edu-drawer-close {
    background: none;
    border: none;
    padding: 0.4rem;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.edu-drawer-close:hover {
    background: #f1f5f9;
}

.btn-apply-filters {
    width: 100%;
    margin-top: 1.5rem;
    background: var(--saec-blue);
    color: white;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 0.85rem;
}

/* === RESPONSIVE === */
@media (max-width: 767.98px) {
    .edu-sidebar {
        display: none;
    }

    .btn-mobile-filters {
        display: flex;
    }

    .edu-results-count {
        display: none;
    }

    .edu-cards-grid {
        grid-template-columns: 1fr;
    }

    .edu-detail-hero {
        height: 220px;
        border-radius: 0;
    }

    .edu-detail-hero .hero-title {
        font-size: 1.25rem;
    }

    .edu-detail-hero .hero-content {
        padding: 1rem;
    }

    .edu-section .edu-title {
        font-size: 1.35rem;
    }

    .edu-detail-sidebar {
        position: static !important;
    }
}

@media (min-width: 768px) {
    .edu-sticky-sidebar {
        position: sticky;
        top: 100px;
    }

    .edu-detail-hero {
        height: 320px;
    }

    .edu-detail-hero .hero-title {
        font-size: 2rem;
    }
}

@media (min-width: 992px) {
    .edu-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .edu-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === EXTRAS: VIDEO & PDF === */
.edu-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.edu-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.btn-download-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ef4444;
    color: white !important;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s;
    margin-bottom: 1rem;
    border: 1px solid #dc2626;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
}

.btn-download-pdf:hover {
    background: #dc2626;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}