/* ===== RESET Y VARIABLES ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primario: #1a1a2e;
    --secundario: #16213e;
    --acento: #0f3460;
    --highlight: #e94560;
    --texto: #eaeaea;
    --texto-suave: #a0a0b0;
    --fondo: #f0f2f5;
    --card-bg: #ffffff;
    --sidebar-width: 220px;
    --sombra: 0 4px 20px rgba(0, 0, 0, 0.1);
    --radio: 10px;
    --transicion: 0.3s ease;
}

/* ===== TIPOGRAFÍA BASE ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--fondo);
    color: #333;
    line-height: 1.6;
}

/* ===== HEADER / TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, var(--primario), var(--acento));
    color: var(--texto);
    padding: 20px 40px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.top-bar p {
    font-size: 0.95rem;
    color: #c0c8e0;
    margin-top: 4px;
}

/* ===== LAYOUT PRINCIPAL ===== */
.contenedor {
    display: flex;
    min-height: calc(100vh - 80px);
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== MENÚ LATERAL ===== */
.menu-lateral {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primario), var(--secundario));
    color: var(--texto);
    padding: 30px 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    flex-shrink: 0;
}

.menu-lateral h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--texto-suave);
    padding: 0 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

.menu-lateral ul {
    list-style: none;
}

.menu-lateral ul li a {
    display: block;
    padding: 12px 20px;
    color: #c0c8e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transicion);
    border-left: 3px solid transparent;
}

.menu-lateral ul li a:hover {
    background-color: rgba(233, 69, 96, 0.15);
    color: var(--highlight);
    border-left-color: var(--highlight);
    padding-left: 26px;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.contenido {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ===== CARDS DE SECCIÓN ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radio);
    padding: 30px;
    box-shadow: var(--sombra);
    border-top: 4px solid var(--highlight);
    transition: transform var(--transicion);
}

.card:hover {
    transform: translateY(-2px);
}

.card h2 {
    font-size: 1.4rem;
    color: var(--primario);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fondo);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--highlight);
    border-radius: 50%;
}

/* ===== SUBTÍTULOS DE UNIDAD ===== */
.card h3 {
    font-size: 1rem;
    color: var(--acento);
    margin: 25px 0 12px;
    padding: 8px 14px;
    background: linear-gradient(90deg, rgba(15,52,96,0.08), transparent);
    border-left: 3px solid var(--acento);
    border-radius: 0 5px 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* ===== LISTAS DE ACTIVIDADES ===== */
.card article ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 5px 0;
}

.card article ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--fondo);
    border-radius: 6px;
    font-size: 0.88rem;
    color: #555;
    transition: background var(--transicion);
}

.card article ul li:hover {
    background: #e0e6f0;
}

.card article ul li a {
    background: var(--acento);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background var(--transicion);
}

.card article ul li a:hover {
    background: var(--highlight);
}

/* Links sin destino (href="#") con estilo desactivado */
.card article ul li a[href="#"] {
    background: #b0b8cc;
    cursor: default;
    pointer-events: none;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primario);
    color: #8090b0;
    text-align: center;
    padding: 25px 20px;
    font-size: 0.85rem;
    line-height: 2;
}

.footer p:first-child {
    color: var(--texto-suave);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--fondo);
}

::-webkit-scrollbar-thumb {
    background: var(--acento);
    border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .contenedor {
        flex-direction: column;
    }

    .menu-lateral {
        width: 100%;
        height: auto;
        position: static;
        padding: 15px 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .menu-lateral h2 {
        display: none;
    }

    .menu-lateral ul {
        display: flex;
        flex-direction: row;
        gap: 5px;
        padding: 0 15px;
    }

    .menu-lateral ul li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 14px;
        white-space: nowrap;
    }

    .menu-lateral ul li a:hover {
        padding-left: 14px;
        border-bottom-color: var(--highlight);
    }

    .contenido {
        padding: 15px;
    }

    .card article ul {
        grid-template-columns: 1fr 1fr;
    }

    .top-bar {
        position: static;
    }
}

@media (max-width: 480px) {
    .card article ul {
        grid-template-columns: 1fr;
    }

    .top-bar h1 {
        font-size: 1.3rem;
    }
}