/* ======================== */
/* VARIABLES Y ESTILOS BASE */
/* ======================== */
:root {
    --primary-color: #0064cf;
    --primary-light: #00bfff;
    --secondary-color: #eeff00;
    --dark-bg: #000000;
    --darker-bg: #151a1f;
    --card-bg: #1e2830;
    --card-bg-alt: #1a2229;
    --text-light: #ffffff;
    --text-secondary: #f0f0f0;
    --border-color: rgba(0, 123, 255, 0.3);
    --success-color: rgba(40, 167, 69, 0.3);
    --danger-color: rgba(211, 34, 52, 0.4);
    --shadow-primary: 0 0 25px rgba(0, 123, 255, 0.3);
    --shadow-hover: 0 15px 30px rgba(214, 214, 214, 0.466);
}

/* ESTILOS GENERALES */
body.portada-page {
    background: radial-gradient(circle at center, #1f1f1f, var(--dark-bg));
    padding-top: 70px;
    color: var(--text-light);
}

.text-white { color: var(--text-light) !important; }
.text-light { color: var(--text-secondary) !important; }
.bg-dark-darker { background-color: var(--darker-bg) !important; }

/* =================== */
/* COMPONENTE: NAVBAR */
/* =================== */
.navbar {
    background-color: #151a1f;
    transition: box-shadow 0.3s ease;
}

/* Efecto de zoom en el logo sobre el menu superior */
.navbar-brand {
    padding: 10px 20px;                     /* Espaciado interno */
    transition: transform 0.3s ease;        /* Transición suave para el hover */
}
.navbar-brand:hover {
    transform: scale(1.10);                /* Efecto de agrandar en hover */
}
/* ========================== */
.portada-nav-link-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border-radius: 12px;
    padding: 8px 12px;
    margin: 0 5px;
}

.portada-nav-link-animated::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.4s ease;
}

.portada-nav-link-animated:hover {
    background-color: rgba(32, 156, 32, 0.8) !important;
    transform: scale(1.05);
}

.portada-nav-link-animated:hover::before {
    left: 0;
}

/* ====================== */
/* SECCIÓN: JUMBOTRON/CTA */
/* ====================== */
.jumbotron {
    background-color: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #001a33, #003366, #004d99, #0066cc, #009999, #00cccc, #33ffff, #009999, #004d99, #001a33);
    background-size: 400%;
    z-index: -1;
    border-radius: 15px;
    animation: portada-neon-border 20s linear infinite;
}

@keyframes portada-neon-border {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* Texto animado */
.portada-animated-text {
    display: inline-block;
    animation: portada-zoomInOut 8s ease-in-out infinite;
    transform-origin: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes portada-zoomInOut {
    0%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.3); 
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

/* Texto con efecto de tipeo */
.portada-typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--text-light);
    animation: 
        portada-typing 20s steps(40, end) infinite, 
        portada-blink-caret .85s step-end infinite;
    max-width: 47%;
    width: 0;
}

@keyframes portada-typing {
    0% { width: 0; }
    20% { width: 100%; }
    80% { width: 100%; }
    100% { width: 0; }
}

@keyframes portada-blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--text-light); }
}

/* Botones */
.portada-btn-animated {
    position: relative;
    overflow: hidden;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    z-index: 1;
}

.portada-btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--primary-color));
    background-size: 200%;
    z-index: -1;
    transition: all 0.5s;
}

.portada-btn-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.8);
}

.portada-btn-animated:hover::before {
    background-position: 100% 0;
}

/* ======================= */
/* SECCIÓN: MÓDULOS (CURSOS) */
/* ======================= */
.portada-module-card {
    background: linear-gradient(145deg, var(--card-bg), var(--card-bg-alt));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.portada-module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover) !important;
}

.portada-module-icon {
    background: rgba(0, 123, 255, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.portada-module-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.portada-module-topics {
    list-style: none;
    padding-left: 0;
}

.portada-module-topics li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.portada-module-topics li:before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* ========================= */
/* SECCIÓN: BENEFICIOS CLAVE */
/* ========================= */
.portada-benefit-card {
    background: rgba(30, 40, 50, 0.7);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.portada-benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 91, 187, 0.3);
}

.portada-benefit-icon i {
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2rem;
}

/* ======================== */
/* SECCIÓN: QUIÉNES SOMOS */
/* ======================== */
.portada-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.portada-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), transparent);
}

/* =================================== */
/* SECCIÓN: ESTADÍSTICAS QUIÉNES SOMOS */
/* =================================== */
.portada-stats-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.portada-stat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(30, 40, 50, 0.7);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portada-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(105, 126, 148, 0.473);
}

.portada-stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, 0.1);
    flex-shrink: 0;
}

.portada-stat-content {
    flex-grow: 1;
}

.portada-stat-label {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--text-secondary);
}
/* Contenedor de Resultados */
.portada-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    animation: portadaBlink 1.8s infinite;
    margin-left: 10px; /* Espacio entre etiqueta y valor */
    min-width: 80px; /* Ancho mínimo para mantener consistencia */
    text-align: center; /* Centrar el número */
}

.portada-stat-value::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    animation: portadaPulse 2s infinite;
}

.portada-stat-value span {
    position: relative;
    z-index: 2;
}

.portada-static-addition {
    font-size: 1rem;
    margin-left: 10px;
    opacity: 0.7;
    position: relative;
    display: inline-block;
    animation: portadaFloat 3s infinite ease-in-out;
}

/* Animaciones específicas para estadísticas */
@keyframes portadaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes portadaFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ======================== */
/* SECCIÓN: TESTIMONIOS */
/* ======================== */
.portada-testimonial {
    background: rgba(30, 40, 50, 0.7);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.portada-testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    color: var(--text-secondary);
}

.portada-testimonial-content p:before,
.portada-testimonial-content p:after {
    content: '"';
    color: #fbff00;
    font-size: 2rem;
    position: absolute;
}

.portada-testimonial-content p:before {
    top: -15px;
    left: -15px;
}

.portada-testimonial-content p:after {
    bottom: -25px;
    right: -15px;
}

.portada-testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.portada-testimonial-author img {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    object-fit: cover;
    border-radius: 50%;
}

/* ======================== */
/* SECCIÓN: CONTACTO */
/* ======================== */
.portada-contact-card {
    background: rgba(30, 40, 50, 0.7);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 91, 187, 0.2);
}

.portada-contact-card label {
    color: var(--text-light) !important;
}

.portada-contact-card .form-control {
    background-color: rgba(30, 40, 50, 0.5);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.portada-contact-card .form-control::placeholder {
    color: #cccccc;
}

/* ======================== */
/* COMPONENTE: FOOTER */
/* ======================== */
.footer {
    background-color: #1c2125 !important;
    padding: 1rem 0;
}

/* ======================== */
/* COMPONENTES ADICIONALES */
/* ======================== */
/* Mensajes del formulario de contacto */
#formMessage {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

#formMessage.text-success {
    background-color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

#formMessage.text-danger {
    background-color: var(--danger-color);
    border: 1px solid rgba(211, 34, 52, 0.397);
}

/* Spinner de carga */
.spinner-border {
    vertical-align: text-top;
    margin-left: 5px;
}

/* ======================== */
/* RESPONSIVE DESIGN */
/* ======================== */
@media (max-width: 768px) {
    .portada-typing-text {
        max-width: 100%;
    }
    
    .portada-module-card,
    .portada-benefit-card {
        margin-bottom: 30px;
    }
    
    .portada-testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .portada-testimonial-author img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* Ajustes específicos para el botón de navegación */
    .navbar .portada-nav-link-animated {
        padding: 6px 10px;
        font-size: 0.9rem;
        margin: 5px auto;
        display: block;
        width: 80%;
        text-align: center;
    }
    
    /* Ajustar logo en móviles */
    .navbar-brand img {
        width: 200px;
        height: auto;
    }
    
    /* Ajustar contenedor del menú */
    #navbarNav {
        padding: 10px 0;
    }
    /* Ajustar el tamaño de los íconos de los módulos */
    /* Ajustes específicos para el botón de navegación */
    .navbar .portada-nav-link-animated {
        padding: 6px 10px;
        font-size: 0.9rem;
        margin: 5px auto;
        display: block;
        width: 80%;
        text-align: center;
    }
    
    /* Ajustar logo en móviles */
    .navbar-brand img {
        width: 200px;
        height: auto;
    }
    
    /* Ajustar contenedor del menú */
    #navbarNav {
        padding: 10px 0;
    }
}

/* Animación de scroll para navbar */
@media (min-width: 992px) {
    .navbar {
        box-shadow: none;
    }
}

/* Parpadeo */
.portada-blink {
    animation: portadaBlink 1.2s infinite;
}

@keyframes portadaBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}