/* Variables CSS para colores y tipografía */
:root {
    --primary-color: #005092; /* Color principal */
    --secondary-color: #0c3d49; /* Color secundario */
    --accent-color: #00f7ff; /* Color de acento */
    --text-color: #333;
    --light-text-color: #555;
    --background-light: #f8f8f8;
    --background-dark: #eee;
    --font-family-sans: 'Arial', sans-serif;
    --font-family-serif: 'Georgia', serif;
}

/* Reset básico y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden; /* Para contener floats */
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Elimina espacio extra debajo de las imágenes */
}

/* Botones */
.button-primary, .button-secondary, .button-campus {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.button-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
}

.button-primary:hover {
    background: #003d70;
}

.button-secondary {
    background: var(--secondary-color);
    color: #fff;
    border: none;
}

.button-secondary:hover {
    background: #04151a;
}

.button-campus {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.button-campus:hover {
    background: #00c5cc;
}

/* --- Header --- */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--background-dark);
    padding: 10px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Para responsive */
}

.main-header .logo img {
    height: 60px; /* Ajusta el tamaño de tu logo */
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: bold;
    padding: 5px 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Slider Principal --- */
.main-slider {
    position: relative;
    width: 100%;
    height: 450px; /* Altura del slider */
    overflow: hidden;
    background: var(--background-dark); /* Color de fallback */
}

.slider-container {
    display: flex;
    width: 300%; /* Si tienes 3 slides */
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    width: 33.3333%; /* Cada slide ocupa el 100% */
    height: 100%;
    flex-shrink: 0; /* No se encoge */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.slide-content {
    text-align: center;
    max-width: 800px;
    padding: 20px;
    background: rgba(0,0,0,0.4); /* Fondo semi-transparente para texto */
    border-radius: 10px;
}

.slide-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 1.2em;
    margin-bottom: 25px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 10;
}

.slider-nav button {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.5em;
    transition: background-color 0.3s ease;
}

.slider-nav button:hover {
    background: rgba(0,0,0,0.8);
}

/* --- Tarjetas de Contenido --- */
.content-cards {
    padding: 50px 0;
    background: var(--background-light);
}

.content-cards .container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.content-cards .card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex: 1; /* Para que ocupen espacio equitativamente */
    min-width: 280px; /* Tamaño mínimo antes de apilarse */
    padding-bottom: 20px; /* Espacio para el botón */
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.content-cards .card:hover {
    transform: translateY(-5px);
}

.content-cards .card img {
    width: 100%;
    height: 200px; /* Altura fija para las imágenes de tarjeta */
    object-fit: cover; /* Asegura que la imagen cubra el área */
    margin-bottom: 15px;
}

.content-cards .card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.content-cards .card p {
    font-size: 0.9em;
    color: var(--light-text-color);
    padding: 0 20px;
    margin-bottom: 20px;
}

/* --- Barra Lateral de Redes Sociales --- */
.social-sidebar {
    position: fixed; /* Fija la barra en la pantalla */
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 100;
}

.social-sidebar a {
    display: block;
    padding: 12px 15px;
    color: var(--primary-color);
    font-size: 1.5em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-sidebar a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- Footer --- */
.main-footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 40px 0 20px;
    font-size: 0.9em;
}

.footer-cols {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    font-size: 1.2em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.footer-col ul {
    padding: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #fff;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.footer-col p i {
    margin-right: 8px;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

/* --- Banner Estático (Para Cursos, Asesores, etc.) --- */
.main-banner {
    position: relative;
    width: 100%;
    height: 450px; /* Misma altura que el slider */
    background-size: cover;
    background-position: center;
    background-color: var(--primary-color); /* Color de fallback */
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-content {
    text-align: center;
    max-width: 800px;
    padding: 20px;
    background: rgba(0,0,0,0.5); /* Fondo semi-transparente para mejor lectura */
    border-radius: 10px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.banner-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 1.2em;
}

/* Estilos para el botón de hamburguesa */
.menu-toggle {
    display: none; /* Oculto por defecto en escritorio */
    background: transparent;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px 10px;
}

/* Estilos del Overlay del Menú Móvil */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Fondo oscuro semitransparente */
    display: none; /* Oculto por defecto */
    z-index: 9999; /* Asegura que esté por encima de todo */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-nav li {
    margin: 20px 0;
}

.mobile-nav a {
    color: #fff;
    font-size: 1.5em;
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    transition: background-color 0.3s ease;
}

.mobile-nav a:hover {
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Estilo para el botón de campus dentro del menú móvil */
.mobile-campus-btn {
    background: var(--accent-color);
    color: var(--text-color);
    margin-top: 20px;
    padding: 12px 25px;
    border-radius: 25px;
    display: inline-block; /* Para que tome el padding */
}
.mobile-campus-btn:hover {
    background: #00c5cc;
}

/* =======================================
   Media Queries para Responsiveness
   ======================================= 
*/
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;
    }
    .header-actions {
        margin-top: 10px;
        justify-content: center;
    }
    .main-slider {
        height: 350px;
    }
    .slide-content h2 {
        font-size: 1.8em;
    }
    .slide-content p {
        font-size: 1em;
    }
    .content-cards .container {
        flex-direction: column;
        align-items: center;
    }
    .content-cards .card {
        min-width: 90%;
    }
    .footer-cols {
        flex-direction: column;
        text-align: center;
    }
    .social-sidebar {
        flex-direction: row;
        width: 100%;
        left: 0;
        bottom: 0;
        top: auto;
        transform: none;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        justify-content: center;
    }
    .social-sidebar a {
        padding: 8px 10px;
    }
    .header-top {
        /* Restablece la alineación horizontal para el logo y la hamburguesa */
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px; /* Añade un poco de padding a los lados */
    }

    /* Oculta el menú de escritorio y las acciones en móvil */
    .desktop-nav,
    .desktop-actions {
        display: none;
    }

    /* Muestra el botón de hamburguesa en móvil */
    .menu-toggle {
        display: block;
    }
    
    /* Cuando el menú móvil está activo, se muestra */
    .mobile-menu-overlay.active {
        display: flex; /* O un deslizamiento con transform */
    }
}

/* ================================================= */
/* ESTILOS PARA LA PÁGINA DE CONSULTA DE CERTIFICADOS */
/* ================================================= */

/* Contenedor principal del formulario */
.consulta-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    max-width: 600px; /* Limita el ancho del formulario */
    margin: 30px auto; /* Centra el formulario */
    text-align: center;
}

/* Estilo de la etiqueta (label) del formulario */
.consulta-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: left;
}

/* Estilo del campo de entrada de texto (cédula) */
.consulta-form input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--background-dark);
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
}

/* El botón de consultar (reutiliza .button-secondary) */
.consulta-form .button-secondary {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

/* Contenedor donde se muestran los resultados */
.consulta-resultado {
    margin-top: 30px;
    padding: 15px;
    border-radius: 5px;
    text-align: left;
    font-size: 1.1em;
    font-weight: 500;
}

/* Estilo para el mensaje de carga (mientras PHP consulta) */
.loading-message {
    text-align: center;
    color: var(--primary-color);
    margin-top: 20px;
}

/* Estilo de Resultado encontrado (Fondo verde) */
.consulta-resultado.encontrado {
    border: 2px solid #28a745; /* Borde verde */
    background: #e6fff0; /* Fondo verde claro */
    color: var(--text-color);
}

/* Estilo de Resultado NO encontrado (Fondo rojo) */
.consulta-resultado.no-encontrado {
    border: 2px solid #dc3545; /* Borde rojo */
    background: #fff0f0; /* Fondo rojo claro */
    color: #dc3545;
}

/* Lista de certificados (para múltiples resultados) */
.lista-certificados {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.lista-certificados li {
    background: #fff;
    border-bottom: 1px dashed var(--background-dark);
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-weight: 400;
}

/* Enlace de descarga del certificado */
.enlace-certificado {
    color: #007bff !important;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.enlace-certificado:hover {
    color: #0056b3 !important;
}

/* Icono de PDF o descarga */
.enlace-certificado .fas {
    margin-left: 5px;
}

/* ================================================= */
/* ESTILO PARA EL MENSAJE DE CONTACTO EN CERTIFICADOS */
/* ================================================= */
.mensaje-contacto {
    margin-top: 25px;
    padding: 15px;
    border: 1px dashed var(--background-dark);
    border-radius: 5px;
    font-size: 0.95em;
    color: var(--text-color);
    text-align: center;
    background-color: #f9f9f9;
}

.mensaje-contacto a {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* ================================================= */
/* ESTILOS PARA ENLACE DE VALIDACIÓN EN CERTIFICADOS */
/* ================================================= */
.header-consulta-actions {
    display: flex; /* Permite que los elementos se alineen */
    flex-direction: column; /* Apila el título y el enlace */
    align-items: center; /* Centra todo */
    gap: 15px; /* Espacio entre el título y el enlace */
    margin-bottom: 30px;
}

.validation-link-wrapper {
    /* Contenedor del botón, centrado */
    text-align: center; 
}

.button-validation {
    /* Estilo del botón de validación */
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--secondary-color); /* Color secundario */
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: 1px solid var(--secondary-color);
}

.button-validation:hover {
    background-color: var(--primary-color); /* Cambia de color al pasar el mouse */
    border-color: var(--primary-color);
}

.button-validation i {
    margin-right: 5px;
}