/* --- Variables de Color y Tipografía --- */
:root {
    --primary-color: #0d2a4a; /* Azul Marino Cemautool */
    --primary-dark: #071626;  /* Fondo profundo para sección módulos */
    --accent-color: #f7b914;  /* Amarillo/Naranja Cemautool */
    --text-color: #333;
    --text-color-light: #fff;
    --text-muted: #b0c4de;
    --bg-color-cards: rgba(255, 255, 255, 0.05); /* Glassmorphism */
    --bg-color-section: #f5f5f5;
    --main-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Estilos Globales --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--main-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.text-center {
    text-align: center;
}

/* --- Imágenes --- */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --- Botones --- */
.btn-yellow {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-yellow:hover {
    background-color: #f3a812;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(247, 185, 20, 0.4);
}

.btn-outline {
    display: inline-block;
    padding: 10px 25px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* --- Header / Menú --- */
header {
    background-color: rgba(13, 42, 74, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color-light);
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.5rem;
    font-weight: 900;
}

.main-nav ul {
    display: flex; /* Cambiamos a flex siempre */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(13, 42, 74, 0.98);
    backdrop-filter: blur(15px); /* Efecto elegante */
    padding: 0; /* Reset para manejarlo con los enlaces */
    gap: 0; 
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    
    /* Animación de cortina */
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.main-nav ul.active {
    max-height: 500px; /* Suficiente para todos los links */
    opacity: 1;
    padding: 20px 0;
}
/* Estilo de los enlaces en el menú desplegable */
.main-nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-nav ul li a {
    display: block;
    padding: 15px 0;
    font-size: 1.1rem;
    color: var(--text-color-light);
    width: 100%;
}

.main-nav ul li a:hover {
    background-color: rgba(247, 185, 20, 0.1);
    color: var(--accent-color);
}

/* Ajuste de los botones dentro del menú */
.nav-btn-mobile {
    display: block;
    margin: 20px auto 10px; /* Separación superior */
    width: 85%; /* No tan ancho como el fondo */
    max-width: 300px;
}

/* Animación del botón hamburguesa (Opcional) */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
.mobile-menu-toggle span {
    transition: all 0.3s ease;
}

/* Botón de escritorio */
.nav-btn-desktop {
    display: none !important;
}

/* Ajuste de Botón de Acceso en Móvil (Dentro del Header) */
.nav-btn-mobile {
    display: block; /* Visible dentro del menú desplegable */
    margin-top: 10px;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 15px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-light);
    border-radius: 2px;
}

/* Contenedor de acciones en Header móvil */
.header-actions-mobile {
    display: flex;
    align-items: center;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(13, 42, 74, 0.85), rgba(13, 42, 74, 0.85)), 
                      url('../img/landingpage/kia_sportage_clean.png');
    background-size: cover;
    background-position: center;
    color: var(--text-color-light);
    padding: 80px 20px;
    margin-top: 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--text-color-light);
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

/* Contenedor de botones en el Hero para ordenarlos */
.hero-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* --- Módulos Cemautool --- */
.modulos {
    padding: 80px 0;
    background-color: var(--primary-dark);
    background-image: radial-gradient(circle at top right, #1a3a5a, var(--primary-dark));
}

.modulos .section-title {
    margin-bottom: 60px;
    font-size: 2.2rem;
    color: var(--text-color-light);
    text-align: center;
}

.modulos-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1100px; 
    margin: 0 auto;
}

.modulo-card {
    background-color: var(--bg-color-cards);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.modulo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(247, 185, 20, 0.3);
}

.modulo-img-container {
    width: 100%;
    height: 250px;
    padding: 15px;
}

.modulo-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.modulo-info {
    padding: 30px;
}

.modulo-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.modulo-card p {
    font-size: 1rem;
    color: var(--text-muted);
}

.featured-card {
    background: rgba(247, 185, 20, 0.05);
    border: 1px solid rgba(247, 185, 20, 0.4);
}

/* --- Registro / Formulario --- */
.registro {
    padding: 60px 0;
    background-color: #fff;
}

.form-container {
    max-width: 650px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 40px 0;
    text-align: center;
}

/* =========================================================
    MEDIA QUERIES - ESCRITORIO (Cerrando brecha móvil)
   ========================================================= */
@media (min-width: 992px) {
    .nav-btn-mobile { display: none !important; } /* Oculto en PC */
    .nav-btn-desktop { display: inline-block !important; } /* Visible en PC */
    
    .main-nav ul {
        display: flex; /* Siempre visible en PC */
        position: static; /* Quita el posicionamiento absoluto del móvil */
        flex-direction: row; /* Links a la par */
        background: none;
        padding: 0;
    }
    .hero-btns {
        flex-direction: row;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .modulo-card {
        flex-direction: row;
        align-items: center;
        min-height: 480px;
    }

    .modulo-card:nth-child(even) {
        flex-direction: row-reverse;
    }

    .modulo-img-container {
        width: 50%;
        height: 100%;
        padding: 30px;
    }

    .modulo-info {
        width: 50%;
        padding: 60px;
    }

    .modulo-card h3 {
        font-size: 2.3rem;
    }
}