/* ==========================================================================
   CONFIGURACIÓN GLOBAL Y VARIABLES MODERNAS
   ========================================================================== */
:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --sidebar-bg: #0f172a;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f1f5f9;
    --border-color: #e2e8f0;
    --radius: 12px;
    --font: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

/* Contenedor tipo "App de software" */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   BARRA LATERAL (SIDEBAR)
   ========================================================================== */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.brand h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-item {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.nav-item.active {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   CONTENIDO PRINCIPAL
   ========================================================================== */
.main-content {
    margin-left: 260px; /* Deja espacio para la barra fija */
    flex: 1;
    padding: 3rem;
}

.content-header {
    margin-bottom: 3rem;
}

.content-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* GRID DE PROGRAMAS */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* TARJETAS INTERACTIVAS */
.program-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.04);
    border-color: #cbd5e1;
}

.program-info h3 {
    font-size: 1.2rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.program-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* BOTONES DE DESCARGA */
.download-btn {
    display: inline-block;
    text-align: center;
    background-color: #f1f5f9;
    color: #334155;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.download-btn:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.site-btn {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.site-btn:hover {
    background-color: var(--primary-hover);
}

/* ==========================================================================
   RESPONSIVO (MENÚ PARA CELULARES Y TABLETS)
   ========================================================================== */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 1.5rem;
    }
    
    .brand h2 {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        white-space: nowrap;
    }
    
    .nav-item {
        display: inline-block;
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }
    
    .content-header {
        margin-bottom: 2rem;
    }
    
    .content-header h1 {
        font-size: 2rem;
    }
}