/* RESET BÁSICO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    /* CAMBIO SOLICITADO: Fondo gris muy clarito */
    background-color: #f9f9f9; 
}

/* ------------------ ENCABEZADO Y NAVEGACIÓN ------------------ */

header {
    background: #004c99; /* Azul institucional */
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Encabezado Fijo */
.fixed-header {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
}

/* Espaciador para evitar que el header fijo tape el contenido */
.header-spacer {
    height: 80px; /* Ajusta este valor al alto real de tu header */
    width: 100%;
}

header h1 {
    font-size: 1.8rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.5rem 0.25rem;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: #ffcc00; /* Amarillo/Dorado */
}

.cta {
    background-color: #ffcc00;
    color: #004c99;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta:hover {
    background-color: #e6b800;
}

/* ------------------ GENERALES Y SECCIONES ------------------ */

main {
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 40px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

section:last-child {
    border-bottom: none;
}

h2, h3 {
    color: #004c99;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
}

/* Sección HERO (Destacada) */
.seccion-principal {
    background: #e6f0ff; /* Azul claro para destacar */
    padding: 60px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.boton-primario {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.boton-primario:hover {
    background-color: #0056b3;
}

/* Grid de Cursos */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cursos-grid article {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-top: 3px solid #ffcc00;
}

.cursos-grid h4 {
    color: #004c99;
    margin-bottom: 0.5rem;
}

/* ------------------ GALERÍA (CARRUSEL) ------------------ */

#galeria {
    text-align: center;
    background-color: #e6f0ff;
    padding-bottom: 60px;
    border-radius: 10px;
}

.carrusel-contenedor {
    display: flex; 
    overflow: hidden; 
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carrusel-slide {
    display: none;
    min-width: 100%; 
    transition: transform 0.5s ease-in-out;
    height: auto;
}
.carrusel-slide.active { display: block; }

/* ------------------ CONTACTO Y REDES SOCIALES ------------------ */

address {
    font-style: normal;
}

address p a {
    color: #007bff;
    text-decoration: none;
}

.redes-sociales {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.redes-sociales h4 {
    color: #004c99;
    margin-bottom: 10px;
}

.social-icon {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

.social-icon.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}

.social-icon.instagram:hover {
    opacity: 0.9;
}

/* ------------------ ESTILOS DE LOGIN PAGE ------------------ */

/* Se mantiene el fondo de login-body, pero si quieres que sea el gris clarito, puedes eliminar esta clase */
/* Si la mantienes, tendrá el gris un poco más oscuro: background-color: #f4f4f9; */

.login-contenedor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px); 
    padding: 20px;
}

.formulario-login {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}

.grupo-formulario {
    margin-bottom: 15px;
}

.grupo-formulario label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #004c99;
}

.grupo-formulario input[type="text"],
.grupo-formulario input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.nota-login {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ==================================================
   ESTILOS BASE PARA LOGIN Y DASHBOARD
================================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f8;
    color: #333;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    text-decoration: underline;
}

/* ===========================
   CABECERA
=========================== */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

header nav span {
    margin-right: 1rem;
}

header nav a {
    color: #e74c3c;
    font-weight: bold;
}

/* ===========================
   FORMULARIO LOGIN
=========================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
}

.login-contenedor {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    bo

/* ===========================
   ESTILOS FLASH MESSAGES
=========================== */
.flash-messages {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px auto;
}

.flash {
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
    color: #fff;
}

/* Categorías de flash según Flask */
.flash.success {
    background-color: #28a745; /* verde */
}

.flash.danger {
    background-color: #dc3545; /* rojo */
}

.flash.warning {
    background-color: #ffc107; /* amarillo */
    color: #333;
}

.flash.info {
    background-color: #17a2b8; /* azul */
}

/* ----------------- dashboard ------------------*/

 /* Contenedor principal */
        .dashboard-body {
            background-color: #f9f9f9;
            font-family: Arial, sans-serif;
            min-height: 100vh;
            padding: 20px;
        }

        header {
            background-color: #004c99;
            color: white;
            padding: 1rem 2rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
        }

        header h1 {
            font-size: 1.8rem;
        }

        header nav span {
            margin-right: 1rem;
        }

        header nav a {
            color: #ffcc00;
            font-weight: bold;
            text-decoration: none;
        }

        header nav a:hover {
            text-decoration: underline;
        }

        .dashboard-contenedor {
            max-width: 1200px;
            margin: 0 auto;
        }

        .dashboard-opciones {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }

        .opcion {
            flex: 1 1 250px;
        }

        .opcion a {
            display: block;
            padding: 20px;
            background-color: #007bff;
            color: white;
            border-radius: 8px;
            text-align: center;
            font-weight: bold;
            transition: background-color 0.3s;
        }

        .opcion a:hover {
            background-color: #0056b3;
        }

/* ------------------ FOOTER ------------------ */

footer {
    text-align: center;
    padding: 15px 5%;
    background: #333;
    color: white;
    font-size: 0.9rem;
}