/* --- Variables Globales (Tu Nueva Paleta) --- */
:root {
    /* Colores extraídos de tu imagen */
    --color-naranja: #E8723C;
    --color-amarillo: #F2C94C;
    --color-cafe: #4B4035;

    /* Colores neutros para el diseño */
    --color-fondo: #FFFFFF;
    --color-fondo-claro: #F9F7F4;
    --color-texto: #4B4035;
    --color-texto-claro: #8C847B;

    /* Tipografías */
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-cuerpo: 'DM Sans', sans-serif;
}

/* --- Reseteo Básico y Estilos Globales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, .logo-text {
    font-family: var(--fuente-titulos);
    color: var(--color-cafe);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.5rem; }

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }

ul { list-style: none; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding { padding: 6rem 0; }
.bg-light { background-color: var(--color-fondo-claro); }
.text-center { text-align: center; }
.text-muted { color: var(--color-texto-claro); }

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--fuente-cuerpo);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-naranja);
    color: #FFF;
}

.btn-primary:hover {
    background-color: #d16332;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(232, 114, 60, 0.2);
}

.btn-outline {
    border-color: var(--color-cafe);
    color: var(--color-cafe);
    padding: 0.8rem 1.5rem;
}

.btn-outline:hover {
    background-color: var(--color-cafe);
    color: #FFF;
}

.btn-text {
    color: var(--color-naranja);
    padding: 1rem;
    background: none;
}
.btn-text:hover { text-decoration: underline; }

/* --- HEADER --- */
.site-header {
    padding: 1.5rem 0;
    background-color: var(--color-fondo);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text { font-size: 1.8rem; }

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    font-weight: 500;
    font-size: 1rem;
}

.main-nav a:not(.btn):hover {
    color: var(--color-naranja);
}

/* --- HERO SECTION --- */
.hero-section { padding: 8rem 0; }

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text { flex: 1; }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-texto-claro);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Carrusel de Imágenes Hero */
.hero-image-container {
    flex: 1;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    position: relative;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

.hero-image-container img.fade-out { opacity: 0; }

/* --- SECCIÓN CURSOS --- */
.section-header {
    max-width: 700px;
    margin: 0 auto 4rem;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* --- Tarjeta de Curso --- */
.curso-card {
    background-color: #FFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.curso-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.curso-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.curso-card .card-content { padding: 2rem; }

.curso-card .curso-categoria {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-naranja);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.curso-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-cafe);
}

.curso-card p {
    color: var(--color-texto-claro);
    font-size: 1rem;
}

.curso-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.curso-card .profesor {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-cafe);
}

.curso-card .btn-card {
    color: var(--color-naranja);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.curso-card .btn-card:hover { gap: 0.8rem; }

/* --- PROFESORES --- */
.profesores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: center;
}

.profesor-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-amarillo);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profesor-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profesor-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.profesor-card .cargo {
    display: block;
    color: var(--color-naranja);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: var(--fuente-cuerpo);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- FAQ (Preguntas Frecuentes) --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

details {
    background-color: #FFF;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #eee;
}

summary {
    padding: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    position: relative;
    font-family: var(--fuente-titulos);
    color: var(--color-cafe);
    font-size: 1.1rem;
}

summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    color: var(--color-naranja);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
}

details[open] summary::after { content: '-'; }

details p {
    padding: 0 1.5rem 1.5rem;
    margin-bottom: 0;
    color: var(--color-texto);
    border-top: 1px solid #f9f9f9;
    padding-top: 1rem;
}

/* --- FOOTER --- */
.site-footer {
    background-color: var(--color-cafe);
    color: #FFF;
    text-align: center;
}

.site-footer .logo-text { color: #FFF; font-size: 2.5rem; }

.copyright {
    margin-top: 3rem;
    font-size: 0.9rem;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

/* =========================================
   ESTILOS RESPONSIVE Y MENÚ MÓVIL
   ========================================= */

/* Botón Hamburguesa (Oculto en escritorio) */
.menu-toggle {
    display: none; /* Por defecto no se ve */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-cafe);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Tablets (hasta 900px) */
@media (max-width: 900px) {
    .hero-content { flex-direction: column; text-align: center; }
    .hero-buttons { justify-content: center; }
    h1 { font-size: 2.8rem; }
    
    .hero-image-container {
        width: 100%;
        height: 350px;
        margin-top: 2rem;
    }
}

/* Móviles (hasta 768px) - Aquí activamos el menú */
@media (max-width: 768px) {
    .cursos-grid { grid-template-columns: 1fr; }

    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex;
        z-index: 200; /* Asegura que quede encima del menú desplegado */
    }

    /* Animación del botón a 'X' */
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Menú desplegable */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #FFF;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%); /* Oculto arriba */
        transition: transform 0.4s ease-in-out;
        z-index: 100;
        display: flex; /* Aseguramos que sea flex para centrar contenido */
    }

    /* Clase que añade JS para mostrar el menú */
    .main-nav.active {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .main-nav a {
        font-size: 1.5rem;
    }
}

/* --- SECCIÓN NOSOTROS --- */
.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.valor-card {
    background-color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f9f9f9;
}

.valor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.valor-icon {
    font-size: 2.5rem;
    color: var(--color-naranja);
    margin-bottom: 1.5rem;
}

.valor-card h3 {
    font-size: 1.25rem;
    color: var(--color-cafe);
    margin-bottom: 1rem;
    font-weight: 700;
}

.valor-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}
/* --- SECCIÓN CONTACTO --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 4rem;
    align-items: center;
}

/* Columna Izquierda */
.contact-info h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-texto-claro);
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item .label {
    display: block;
    font-weight: 700;
    color: var(--color-naranja);
    margin-bottom: 0.5rem;
    font-family: var(--fuente-cuerpo);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.contact-link {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-cafe);
    border-bottom: 2px solid rgba(75, 64, 53, 0.2);
}

.contact-link:hover {
    color: var(--color-naranja);
    border-color: var(--color-naranja);
}

/* Columna Derecha (Formulario) */
.contact-form {
    background-color: var(--color-fondo-claro);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-cafe);
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: var(--fuente-cuerpo);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FFF;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-naranja);
    box-shadow: 0 0 0 4px rgba(232, 114, 60, 0.1);
}

.contact-form button {
    width: 100%; /* Botón ancho completo */
    border: none;
}

/* Responsive Contacto */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* Una columna en móvil */
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
}