/* 1. CONFIGURACIÓN GENERAL */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; color: #333; line-height: 1.6; background-color: #f4f7f6; }
.section-title { text-align: center; margin-top: 40px; color: #0056b3; }

/* 2. NAVEGACIÓN UNIFICADA (PC Y MÓVIL) */
.main-nav {
    background: #fff;
    height: 75px;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0056b3;
    text-decoration: none;
    margin-right: 40px;
    z-index: 10001;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover, .nav-links a.active { color: #ff7e5f; }

.menu-toggle, .hamburger-icon { display: none; }

/* 3. HERO SECTION */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(42, 40, 40, 0.5), rgba(135, 114, 114, 0.5)), url(img/Portada.png);
    /*background: linear-gradient(rgba(167, 151, 151, 0.099), rgba(135, 125, 114, 0.285)), url(img/Anfiteatro.png);*/
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 { 
    font-size: 2.5rem; 
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

/* 4. TARJETAS Y CONTENIDO */
.container-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; padding: 40px 5%; }
.card-rally { background: white; width: 100%; max-width: 300px; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: 0.3s; }
.card-rally img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; text-align: center; }
/* Esto centrará la tarjeta del examen/rally en la pantalla */
.rally-access { 
    padding: 40px 5%; 
    display: flex; 
    justify-content: center; /* Centra horizontalmente */
    align-items: flex-start; /* Alinea al inicio arriba */
    min-height: 80vh; 
}

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px; /* Ancho máximo de la tarjeta */
    margin: 0 auto; /* Margen automático a los lados */
}
.card input[type="text"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
}

.card label {
    display: block;
    text-align: left;
    font-weight: 700;
    color: #0056b3;
    margin-top: 10px;
}
header {
    background: #0056b3;
    color: white;
    padding: 15px 5%;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    color: white;
    font-size: 1.1rem;
}


/* 5. RESPONSIVE MÓVIL */
@media (max-width: 992px) {
    .nav-container { justify-content: space-between; }
    .nav-logo { margin-right: 0; }
    
    .hamburger-icon {
        display: block;
        position: relative;
        width: 30px; height: 20px;
        cursor: pointer;
        z-index: 10001;
    }

    .hamburger-icon span {
        display: block; position: absolute;
        height: 3px; width: 100%;
        background: #333; border-radius: 3px;
        transition: .25s;
    }
    .hamburger-icon span:nth-child(1) { top: 0; }
    .hamburger-icon span:nth-child(2) { top: 8px; }
    .hamburger-icon span:nth-child(3) { top: 16px; }

    .menu-toggle:checked ~ .hamburger-icon span:nth-child(1) { transform: rotate(45deg); top: 8px; }
    .menu-toggle:checked ~ .hamburger-icon span:nth-child(2) { opacity: 0; }
    .menu-toggle:checked ~ .hamburger-icon span:nth-child(3) { transform: rotate(-45deg); top: 8px; }

    .nav-links {
        position: fixed;
        top: 0; left: -100%;
        flex-direction: column;
        background: #fff;
        width: 280px;
        height: 100vh;
        padding: 100px 30px;
        transition: 0.4s;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    .menu-toggle:checked ~ .nav-links { left: 0; }
    
    .hero h1 { font-size: 1.8rem; }
}

/* 6. BOTONES Y EXTRAS */
.btn-submit, .btn-rally {
    background: #ff7e5f; color: white; border: none;
    padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; width: 100%;
}
.nav-admin { font-weight: bold; color: #0056b3; }
footer { background: #333; color: white; text-align: center; padding: 20px; }
/* Estilo para el recuadro de puntuación final */
.animate__bounceIn {
    animation-duration: 1.2s;
}
/* Ocultar el contador del header al cargar la página */
header #step-counter { 
    display: none; 
}