/* Reseteo básico para diseño limpio */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif; /* Fuente limpia y moderna */
}

/* === DESPLAZAMIENTO SUAVE === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Evita que el menú fijo tape el título al dar clic */
}

body {
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

/* === BARRA DE NAVEGACIÓN (GLASSMORPHISM & STICKY) === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background-color: rgba(255, 255, 255, 0.85); /* Fondo semitransparente */
    backdrop-filter: blur(12px); /* Efecto vidrio esmerilado */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(234, 234, 234, 0.8);
    transition: all 0.3s ease;
}

/* Cambio sutil al hacer scroll */
.navbar.scrolled {
    padding: 10px 8%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* Animación de la línea en hover (solo enlaces normales) */
.nav-links a:not(.btn-outline)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #000000;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:not(.btn-outline):hover::after {
    width: 100%;
    left: 0;
}

/* === BOTONES === */
.btn-outline {
    border: 1.5px solid #000000;
    padding: 8px 20px !important;
    border-radius: 6px;
    transition: all 0.3s ease !important;
}

.btn-outline:hover {
    background-color: #000000;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-solid {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 20px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-solid:hover {
    background-color: #333333;
    transform: translateY(-2px); /* Pequeña animación hacia arriba */
}

/* === BOTÓN HAMBURGUESA (MÓVIL) === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .bar {
    width: 100%;
    height: 2px;
    background-color: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Transformación de Hamburguesa a X cuando está activo */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === SECCIÓN HERO (Principal) === */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content h1 span {
    font-weight: 600; /* Resalta la palabra "Ingenia" */
}

.hero-content p {
    font-size: 1.2rem;
    color: #555555;
    margin-bottom: 30px;
    font-weight: 300;
}

/* === SECCIÓN BENEFICIOS === */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 80px 10%;
    background-color: #fafafa;
}

/* Estado base y oculto de la tarjeta (para la animación de scroll) */
.feature-box {
    background: #ffffff;
    color: #000000;
    padding: 40px 30px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    text-align: left;
    
    /* Configuración de la animación de scroll: oculto y desplazado hacia abajo */
    opacity: 0;
    transform: translateY(40px);
    
    /* Transiciones suaves para todos los cambios (color, fondo, posición) */
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.6s ease-out, opacity 0.6s ease-out, box-shadow 0.4s ease;
}

/* Clase que se agregará mágicamente con JavaScript al hacer scroll */
.feature-box.visible {
    opacity: 1;
    transform: translateY(0); /* Vuelve a su posición original */
}

/* Efecto al pasar el mouse (SOLO cuando ya es visible) */
.feature-box.visible:hover {
    background-color: #000000; /* Se pinta de negro */
    color: #ffffff; /* Texto blanco */
    transform: translateY(-8px); /* Sube un poco */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.feature-box p {
    color: #555555;
    font-size: 1rem;
    line-height: 1.7;
    transition: color 0.4s ease; /* Transición suave para el texto */
}

/* Cambiar el color del texto secundario (p) al hacer hover para que resalte en negro */
.feature-box.visible:hover p {
    color: #cccccc; /* Gris muy claro, más fácil de leer en fondo negro */
}

/* === SECCIÓN DE CURSOS === */
.courses-section {
    padding: 100px 10%;
    background-color: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-title p {
    color: #555555;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.course-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden; /* Mantiene la imagen dentro de los bordes redondeados */
    background-color: #ffffff;
    
    /* Configuración de la animación de scroll: oculto y desplazado hacia abajo */
    opacity: 0;
    transform: translateY(40px);
    
    /* Transiciones suaves */
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, box-shadow 0.4s ease;
}

/* Clase que agregará el JavaScript */
.course-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover de la tarjeta completa (SOLO cuando es visible) */
.course-card.visible:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px); /* Se eleva igual que los beneficios */
}

/* Espacio temporal para las portadas de los cursos */
.placeholder-img {
    width: 100%;
    height: 200px;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaaaaa;
    font-size: 0.9rem;
    border-bottom: 1px solid #eaeaea;
    
    /* Transición para el zoom de la imagen */
    transition: transform 0.5s ease;
}

/* Efecto de zoom sutil en la imagen al pasar el mouse por la tarjeta */
.course-card.visible:hover .placeholder-img {
    transform: scale(1.05);
}

/* === ESTILOS INTERNOS DE LAS TARJETAS DE CURSOS === */
.course-content {
    padding: 30px;
}

.tag {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.course-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.course-content p {
    color: #555555;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Ajuste para el botón dentro de la tarjeta */
.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    display: inline-block;
    text-decoration: none;
    color: #000000;
}

/* === SECCIÓN COMUNIDAD === */
.community-section {
    padding: 80px 10%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
}

/* Caja negra elegante con animación */
.community-box {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 800px;
    width: 100%;
    
    /* Configuración de la animación de scroll */
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, box-shadow 0.4s ease;
}

/* Clase visible para JavaScript */
.community-box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efecto al pasar el mouse por la caja */
.community-box.visible:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.community-box h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.community-box p {
    color: #cccccc;
    font-size: 1.1rem;
    margin-bottom: 35px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botón especial invertido (Fondo blanco, texto negro) */
.btn-white {
    display: inline-block;
    background-color: #ffffff;
    color: #000000;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-white:hover {
    background-color: #eaeaea;
    transform: translateY(-2px);
}

/* === FOOTER (PIE DE PÁGINA) === */
.site-footer {
    background-color: #000000;
    color: #ffffff;
    padding: 80px 10% 20px; /* Mucho espacio arriba, poco abajo */
    
    /* Configuración de la animación de scroll */
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Clase que agregará el JavaScript para que aparezca */
.site-footer.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.footer-col p {
    color: #aaaaaa;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 0.95rem;
    /* Transición suave para el color y el movimiento */
    transition: color 0.3s ease, padding-left 0.3s ease;
}

/* Efecto al pasar el mouse sobre los enlaces del footer */
.footer-col ul a:hover {
    color: #ffffff;
    padding-left: 8px; /* Desplazamiento elegante a la derecha */
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333333; /* Línea separadora sutil y oscura */
    padding-top: 20px;
}

.footer-bottom p {
    color: #777777;
    font-size: 0.85rem;
}

/* === ADAPTACIÓN RESPONSIVA (CELULARES) === */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Oculto a la derecha */
        width: 75%;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .nav-links.active {
        right: 0; /* Desliza desde la derecha */
    }

    .nav-links a {
        font-size: 1.2rem;
    }
}
/* === PÁGINA DE CURSO INDIVIDUAL === */
.course-header {
    padding: 100px 20px 60px;
    display: flex;
    justify-content: center;
    text-align: center;
    background-color: #fafafa;
    border-bottom: 1px solid #eaeaea;
}

/* === ACORDEÓN DE TEMARIO === */
.syllabus-section {
    padding: 80px 10%;
    background-color: #ffffff;
}

.accordion-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid #eaeaea;
}

/* Botón principal del módulo */
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 25px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #555555;
}

/* Ícono de + que se convierte en x */
.accordion-header .icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.4s ease;
}

/* Contenedor oculto de los temas */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out; /* Animación súper fluida */
}

/* Lista de temas */
.topic-list {
    list-style: none;
    padding: 0 0 25px 15px;
}

.topic-list li {
    color: #555555;
    font-size: 1.05rem;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}

/* Flechita minimalista para cada tema */
.topic-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #000000;
    font-weight: 600;
}
/* Corrección de color para el botón en la barra de navegación */
.nav-links .btn-solid {
    color: #ffffff !important;
    padding: 8px 18px;
    margin-top: 0;
    border-radius: 6px;
}

/* Animaciones de scroll para la página de curso */
.course-header, 
.accordion-item {
    opacity: 0;
    transform: translateY(35px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.course-header.visible, 
.accordion-item.visible {
    opacity: 1;
    transform: translateY(0);
}