/* PALETA DE COLORES AZUL (CSS BASE) */
:root{
  --bg:#0b0f17;--panel:#0f1522;--muted:#9aa4b2;--text:#e8eef6;
  --brand:#0572F2; /* Azul principal */
  --brand-2:#5C9DF2; /* Azul para degradados */
  --ok:#10b981;--warn:#f59e0b;--danger:#ef4444;--shadow:0 10px 30px rgba(0 0 0 / 0.35);--radius:18px
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:linear-gradient(180deg,var(--bg),#0c121f 35%,#0e1423 100%);color:var(--text);font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial}
a{color:inherit;text-decoration:none}
.container{max-width:1200px;margin-inline:auto;padding:20px}

/* --- NAV Y BOTONES --- */
.nav{position:sticky;top:0;z-index:40;background:rgba(11,15,23,.7);backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.06)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.2px}
.brand .dot{width:10px;height:10px;border-radius:999px;background:linear-gradient(135deg,var(--brand),var(--brand-2))}
.menu{display:flex;gap:14px;align-items:center}
.menu a{padding:10px 12px;border-radius:10px;color:var(--muted); transition: color 0.2s, background 0.2s;}
.menu a.active,.menu a:hover{color:var(--text);background:rgba(255,255,255,.06)}

.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.12);font-weight:700; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;}
.btn:hover {opacity: 0.9; transform: translateY(-1px);}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand-2));border-color:transparent;color:#111}

/* --- SECCIONES Y TÍTULOS GENERALES --- */
section{padding:50px 0}
.section-title{display:flex;align-items:center;gap:10px;margin-bottom:20px; font-size: 2.2em; font-weight: 800;}
.section-title .dot{width:12px;height:12px;border-radius:999px;background:var(--brand)}
.section-subtitle{font-size: 1.1em; color: var(--muted); margin-bottom: 40px; max-width: 800px;}

/* --- CHIPS Y PILLS (Categorías) --- */
.chip{font-size:12px;color:var(--muted);padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08)}
.pill-brand{
    display: inline-flex; 
    align-items: center; 
    padding: 8px 14px; 
    margin-bottom: 12px;
    border-radius: 999px; 
    font-size: 13px; 
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pill-ciberseguridad { background: linear-gradient(90deg, #F25C05, #E94E57); } 
.pill-programacion { background: linear-gradient(90deg, #0572F2, #00BFFF); } 
.pill-robotica { background: linear-gradient(90deg, #10b981, #3CC766); } 
.pill-data { background: linear-gradient(90deg, #FFD700, #FFC300); } 

/* --- ESTILOS DE TARJETA DE CURSO (CATÁLOGO / HOME) --- */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}
.card{background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.02));border:1px solid rgba(255,255,255,.08);border-radius:var(--radius);padding:24px;box-shadow:0 1px 0 rgba(255,255,255,.04) inset; transition: all 0.2s ease-in-out;}
.card:hover { transform: translateY(-3px); border-color: var(--brand-2); box-shadow: var(--shadow);}
.card h3{margin:6px 0 8px;font-size:18px}
.desc{color:#c9d7e6;font-size:14px;line-height:1.6}
.meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

/* --- ESTILOS DE INDEX.HTML --- */

/* HERO SECTION */
.hero {
    padding: 100px 0 80px;
    text-align: center;
}
.hero h1 {
    font-size: 4em;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(5, 114, 242, 0.4);
}
.hero h1 span {
    background: linear-gradient(45deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.3em;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 30px;
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ESTILOS PARA LAS TARJETAS DE ÁREA (HOME) */
.area-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px; 
}

.area-card {
    background: var(--panel); 
    border: 1px solid rgba(255,255,255,.08); 
    border-radius: var(--radius); 
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    transition: transform 0.2s, box-shadow 0.2s; 
}

.area-card:hover {
    transform: translateY(-5px); 
    box-shadow: var(--shadow); 
}

.area-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.5em; 
}

.area-card .area-description {
    color: var(--muted);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; 
}

.area-card .area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px; 
}

.area-card .area-tag-chip {
    font-size: 0.8em;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    white-space: nowrap; 
    transition: color 0.2s, border-color 0.2s;
}
.area-card .area-tag-chip:hover {
    color: var(--text);
    border-color: rgba(255,255,255,.15);
}

/* ESTILOS PARA LA LISTA DE COHORTES (HOME) */
.cohort-header, .cohort-row {
    grid-template-columns: 2.5fr 1fr 1.2fr 1.5fr; /* Curso, Fecha, Modalidad, Botón */
    display: grid;
    gap: 20px;
    align-items: center;
    padding: 15px 0;
}
.cohort-header {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
}
.cohort-row {
    background: var(--panel);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,.08);
    transition: background 0.2s;
}
.cohort-row:hover {
    background: rgba(255,255,255,.04);
}
.cohort-title {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--text); 
}
.cohort-date {
    font-weight: 600;
    color: var(--text);
}
.cohort-modality {
    color: var(--muted);
    font-size: 0.9em;
}
.cohort-action {
    text-align: right;
}

/* --- ESTILOS DE CATALOGO.HTML --- */

.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr; /* Filtros (250px) y Contenido (el resto) */
    gap: 30px;
    margin-top: 20px;
}

.filter-sidebar {
    background: var(--panel);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.08);
    position: sticky; /* Fija la barra lateral */
    top: 100px; 
    height: fit-content;
}

.filter-sidebar h4 {
    font-size: 1.1em;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--text);
}

.filter-sidebar label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--muted);
    cursor: pointer;
}

.filter-sidebar input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--brand); /* Colorear el checkbox */
}

.filter-section:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

/* --- ESTILOS DE DETALLE.HTML --- */

/* Estilos de la cabecera y el layout de la página de detalle */
.detail-hero{padding:36px 0 24px}
.detail-grid{display:grid;grid-template-columns:2fr 1fr;gap:30px;align-items:flex-start}
.sidebar-panel{
    background:var(--panel);
    border:1px solid rgba(255,255,255,.08);
    border-radius:var(--radius);
    padding:25px; /* Aumento de padding */
    position:sticky;
    top:80px;
}
.sidebar-panel h3{margin-top:0; font-size: 1.5em; color: var(--brand);}
.detail-content h2 { font-size: 1.8em; margin-top: 40px; }


/* ESTILOS PARA EL TEMARIO POR MÓDULOS (Cajas/Cuadrados) */
.syllabus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.module-box {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%; /* Asegura que todas tengan la misma altura si están en un grid */
}
.module-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.module-box h4 {
    color: var(--brand-2); /* Resaltar título del módulo (azul) */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em; /* Aumento de tamaño para mejor jerarquía */
    border-bottom: 2px solid rgba(255,255,255,.05);
    padding-bottom: 10px;
    font-weight: 700;
}
.module-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.module-box li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255,255,255,.04);
    color: #c9d7e6;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.module-box li::before {
    content: '✓';
    color: var(--ok);
    font-weight: 700;
    font-size: 1.1em;
}
.module-box li:last-child {
    border-bottom: none;
}


/* --- MEDIA QUERIES GENERALES (Responsive Design) --- */
@media (max-width: 900px) {
    /* General */
    .section-title {
        font-size: 1.8em;
    }

    /* Navegación */
    .nav-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    .menu {
        flex-basis: 100%;
        justify-content: center;
    }
    
    /* Hero */
    .hero {
        padding: 50px 0;
    }
    .hero h1 {
        font-size: 2.5em;
    }

    /* Catálogo */
    .catalog-layout {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .filter-sidebar {
        position: static;
        top: auto;
        height: auto;
    }

    /* Detalle Curso */
    .detail-grid{
        grid-template-columns: 1fr;
        padding-bottom: 10px;
    }
    .detail-hero h1 {
        font-size: 2em;
    }
    .sidebar-panel {
        position: static; /* Desfija en móvil */
        margin-top: 20px;
    }
    
    /* Cohortes */
    .cohort-header { display: none; }
    .cohort-row {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .cohort-action {
        text-align: left;
        margin-top: 10px;
    }
    .cohort-action .btn {
        width: 100%;
    }

    /* Cards */
    .cards{grid-template-columns:1fr; gap: 20px;}
}


/* --- FOOTER --- */
footer{border-top:1px solid rgba(255,255,255,.06);margin-top:24px}
.foot{display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between;padding:20px 0;color:var(--muted)}