/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    /* Previene el desbordamiento horizontal */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Paleta de Colores de la Bandera Alemana */
:root {
    --germany-black: #000000;
    --germany-red: #DD0000;
    --germany-gold: #FFCC00;
    --light-gray: #f8f9fa;
    --transition: all 0.3s ease;
}

/* --- Header Temático --- */
header {
    background: linear-gradient(135deg, var(--germany-black) 0%, var(--germany-red) 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo i {
    color: var(--germany-red);
    margin-right: 10px;
    font-size: 1.8rem;
}

.logo span {
    color: var(--germany-gold);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--germany-red);
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--germany-gold);
}

nav a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

#user-info span {
    color: #e0e0e0;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    background-image: url('../assets/cochem-town-germany.webp');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 20px;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    margin-top: 2rem;
}

/* --- Botones --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    margin: 5px;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--germany-red);
    border-color: var(--germany-red);
    color: white;
}

.btn-primary:hover {
    background-color: #a70000;
    border-color: #a70000;
    transform: translateY(-2px);
}

.btn-outline {
    color: var(--germany-gold);
    border-color: var(--germany-gold) !important;
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--germany-gold);
    color: var(--germany-black);
}

/* --- Secciones Generales --- */
.features,
.methodology,
.lessons {
    padding: 80px 20px;
}

.methodology {
    background-color: var(--light-gray);
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--germany-black);
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
}

/* --- Tarjetas (Features, Methodology, Lessons) --- */
.features-grid,
.methodology-grid,
.lessons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card,
.method-card,
.lesson-card {
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover,
.method-card:hover,
.lesson-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-card {
    text-align: center;
    padding: 30px;
    border: 1px solid #ddd;
}

.feature-icon i {
    font-size: 3rem;
    color: var(--germany-red);
    margin-bottom: 20px;
}

.method-card {
    background-color: #fff;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.method-icon i {
    font-size: 2.5rem;
    color: var(--germany-red);
    margin-bottom: 15px;
}

.method-benefits {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.method-benefits h4 {
    color: var(--germany-red);
}

.method-benefits ul {
    list-style-type: none;
    padding-left: 0;
}

.method-benefits li {
    margin-top: 8px;
    position: relative;
    padding-left: 20px;
}

.method-benefits li::before {
    content: '✓';
    color: var(--germany-red);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.lesson-card {
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.lesson-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.personalized-badge {
    background-color: var(--germany-gold);
    color: var(--germany-black);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
}

.lesson-header {
    background-color: var(--germany-black);
    color: white;
    padding: 10px 20px;
    font-weight: 600;
}

.lesson-body {
    padding: 20px;
}

.lesson-body h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.lesson-meta {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 0.9rem;
}

.view-more-container {
    text-align: center;
    margin-top: 40px;
}


/*
        ==================================================
        --- INICIO: ESTILOS RESPONSIVOS (MEDIA QUERIES) ---
        ==================================================
        */

@media (max-width: 768px) {

    /* --- Menú Hamburguesa --- */
    .hamburger {
        display: block;
        /* Muestra el botón de hamburguesa */
        z-index: 10;
        /* Se asegura que esté sobre otros elementos */
    }

    nav {
        display: none;
        /* Oculta la navegación por defecto */
        position: absolute;
        top: 70px;
        /* Justo debajo del header */
        left: 0;
        width: 100%;
        background: var(--germany-black);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    }

    nav.active {
        display: block;
        /* Muestra el menú cuando tiene la clase 'active' */
    }

    nav ul {
        flex-direction: column;
        /* Apila los links verticalmente */
        width: 100%;
        align-items: center;
        padding: 20px 0;
    }

    nav ul li {
        margin-bottom: 20px;
        width: 100%;
        text-align: center;
    }

    nav a {
        font-size: 1.2rem;
    }

    .auth-buttons {
        display: none !important;
        /* Oculta la información de usuario en la barra */
    }

    /* --- Ajustes de Secciones --- */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .features,
    .methodology,
    .lessons {
        padding: 60px 20px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* --- Ajustes del Footer --- */
    .footer-content {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .features-grid,
    .methodology-grid,
    .lessons-container {
        grid-template-columns: 1fr;
        /* Una sola columna en móviles pequeños */
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Modal de Login con nuevos colores */
/* --- Modal de Login Corregido --- */
.login-modal {
    /* Propiedades añadidas para posicionamiento y visibilidad */
    position: fixed;
    /* Lo fija en la ventana para que cubra todo, incluso con scroll */
    top: 0;
    left: 0;
    width: 100%;
    /* Ocupa el ancho completo */
    height: 100%;
    /* Ocupa el alto completo */
    z-index: 2000;
    /* Se asegura de que esté por encima de todo el contenido */

    /* Propiedades añadidas para centrar el contenedor del login */
    display: flex;
    align-items: center;
    /* Centra verticalmente */
    justify-content: center;
    /* Centra horizontalmente */

    /* Tu estilo de fondo original */
    background: linear-gradient(135deg, var(--germany-black) 0%, var(--germany-red) 100%);
}

/* El resto de tus estilos para .login-container, .btn-google, etc., están bien */
.login-container {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    /* Mantiene su posición relativa al modal */
    z-index: 2;
    /* Se asegura de que esté sobre las partículas del canvas */
    animation: fadeIn 0.5s ease-out;
}

.login-container h1 {
    color: var(--germany-black);
    /* Cambiado a negro para mejor contraste sobre blanco */
    font-size: 1.8rem;
}

.btn-google {
    background-color: var(--germany-black);
    color: var(--germany-gold);
    border: 1px solid var(--germany-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin: 1rem 0;
}

.btn-google:hover {
    background-color: var(--germany-gold);
    color: var(--germany-black);
}

.btn-google:hover svg path {
    fill: var(--germany-black);
}

.btn-google svg {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.login-container {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.5s ease-out;
}

.auth-message {
    min-height: 20px;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #ef4444;
}

.btn-google svg path {
    fill: var(--germany-gold);
    transition: fill 0.3s;
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #64748b;
}

#login-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- ESTILOS PARA EL MENÚ RESPONSIVO --- */

/* Botón de hamburguesa: oculto en escritorio por defecto */
.mobile-menu-toggle {
    display: none;
    /* Oculto en pantallas grandes */
    font-size: 1.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Asegura que esté por encima de otros elementos */
}

/* Estilos para pantallas móviles (max-width: 768px) */
@media (max-width: 768px) {
    .header-content {
        justify-content: space-between;
    }

    /* Ocultamos el menú de escritorio y mostramos el botón de hamburguesa */
    #main-nav {
        display: none;
        /* Oculto por defecto en móvil */
        position: absolute;
        top: 60px;
        /* Ajusta esto a la altura de tu header */
        left: 0;
        right: 0;
        background-color: #1a2a4c;
        /* Un color de fondo oscuro */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    /* Estilo para cuando el menú está abierto */
    #main-nav.is-open {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        /* Apilamos los enlaces verticalmente */
        padding: 1rem 0;
    }

    #main-nav ul li a {
        display: block;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #2a3a5c;
    }

    #main-nav ul li:last-child a {
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: block;
        /* Mostramos el botón en móvil */
    }

    /* Opcional: Ocultamos los botones de usuario para dar más espacio */
    .header-content .auth-buttons {
        display: none;
    }
}