/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
    text-align: center;
    line-height: 1.6;
}

/* HEADER */
header {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(270deg, #0f0f0f, #1a1a1a, #ff1e00, #ff7b00);
    background-size: 600% 600%;
    animation: gradientMove 12s ease infinite;
    color: white;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    /* Fuente futurista */
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #37ff00, #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

header nav {
    margin-top: 10px;
}

header nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease;
}

header nav a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #ff3c00;
    transition: width 0.3s ease;
}

header nav a:hover {
    color: #ffb300;
}

header nav a:hover::after {
    width: 100%;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

img {
    max-width: 100%;
    height: auto;
}



.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffcc00;
}

/* Botón login distinto */
.btn-login {
    background: #000000;
    color: #d61800;
    padding: 8px 7px;
    border-radius: 6px;
    transition: background 0.3s, transform 0.2s;
}

.btn-login:hover {
    background: #000000;
    transform: scale(1.05);
}

/* Menú móvil */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        position: absolute;
        top: 60px;
        right: 0;
        background: #d61800;
        width: 200px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        border-radius: 0 0 0 10px;
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .menu-toggle {
        display: block;
    }
}


.btn-animado {
    background-color: #0055cc;
    color: white;
    border: none;
    padding: 10px 16px;
    margin-top: 10px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-animado:hover {
    background-color: #003d99;
    transform: scale(1.1);
}

/* Animación para cambio de carrera */
.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.botones-carrusel {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.btn-carrusel {
    background: linear-gradient(135deg, #000000, #00ff04);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.3s;
    min-width: 120px;
}

.btn-carrusel:hover {
    background: linear-gradient(135deg, #000000, #00ff73);
    transform: scale(1.05);
}

@media (max-width: 600px) {
    .btn-carrusel {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        width: 100%;
        max-width: 200px;
    }
}


nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffcc00;
}


section {
    padding: 40px 15px;
    border-bottom: 1px solid #333;
    max-width: 1200px;
    margin: 0 auto;
}

#home {
    position: relative;
    background: url('./imagenes/Home.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    /* efecto parallax */
    padding: 120px 15px;
    color: #fff;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

/* Overlay oscuro con transparencia */
#home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

/* Contenido por encima del overlay */
#home h2,
#proxima-carrera {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease forwards;
}

/* Animación del fade-in */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación de resplandor para el título */
@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 20px #ffcc00, 0 0 30px #ffcc00, 0 0 40px #ff9900;
    }

    50% {
        text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffcc00, 0 0 40px #ffcc00, 0 0 50px #ff9900;
    }
}

#home h2 {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.2;
    color: #ffff00;
    text-transform: uppercase;
    text-shadow: 2px 2px 18px rgba(0, 0, 0, 0.95);
    margin-bottom: 35px;
    font-family: 'Oswald', sans-serif;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Caja de próxima carrera mejorada */
#proxima-carrera {
    background: rgba(0, 0, 0, 0.55);
    padding: 30px;
    border-radius: 15px;
    margin-top: 25px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    animation: fadeIn 1.5s ease forwards;
}

#proxima-carrera h3 {
    font-size: 30px;
    font-weight: 800;
    color: #00ff73;
    /* Verde llamativo */
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.85);
    margin-bottom: 18px;
    font-family: 'Roboto', sans-serif;
}

#proxima-carrera p {
    font-size: 21px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.75);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


#calendar {
    text-align: center;
    background: linear-gradient(135deg, #1c1c1c, #2e3c50);
    padding: 40px 15px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#calendar:hover {
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

#calendar h2 {
    font-size: 36px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
    margin-bottom: 30px;
    font-family: 'Oswald', sans-serif;
}

/* Carrera actual */
.carrera-container {
    padding: 25px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
    max-width: 600px;
    margin: 0 auto 25px auto;
    transition: transform 0.6s ease-in-out, box-shadow 0.8s ease-in-out, background 0.8s ease-in-out;
}

.carrera-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(255, 255, 255, 0.25);
}

/* Resaltar carrera actual */
.destacar {
    border: 2px solid #ffcc00;
    animation: glowCarrera 1.5s infinite alternate;
}

@keyframes glowCarrera {
    from {
        box-shadow: 0 0 10px #ffcc00;
    }

    to {
        box-shadow: 0 0 25px #ff9900;
    }
}

.carrera-container h3 {
    font-size: 28px;
    font-weight: 700;
    color: #00ff73;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
}

.carrera-container p {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    margin: 5px 0;
}

/* Imagen del circuito */
.imagen-circuito {
    width: 100%;
    max-width: 500px;
    /* Limita el ancho máximo */
    height: 300px;
    /* Altura fija para que todas tengan la misma proporción */
    object-fit: cover;
    /* Recorta sin deformar */
    border-radius: 12px;
    opacity: 0;
    transform: scale(1);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    animation: zoomLento 15s ease-in-out infinite alternate;
}

.imagen-circuito.mostrar {
    opacity: 1;
}

@keyframes zoomLento {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Botones del carrusel */
.botones-carrusel {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-carrusel {
    background: linear-gradient(135deg, #000000, #00ff04);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, background 0.3s, box-shadow 0.3s;
    min-width: 140px;
}

.btn-carrusel:hover {
    background: linear-gradient(135deg, #000000, #00ff73);
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .btn-carrusel {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
        width: 100%;
        max-width: 200px;
    }
}


.btn-votar {
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn-votar:hover {
    transform: scale(1.05);
    background: #ff4444;
}


.votaciones-section {
    background: #111;
    color: #eee;
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    margin: auto;
    box-shadow: 0 0 30px #c40000;
    font-family: 'Segoe UI', sans-serif;
}

.votaciones-section h2 {
    color: #ff2b2b;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.votaciones-section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #ccc;
}

.votacion-form .form-group {
    margin-bottom: 1rem;
}

.votacion-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #fff;
}

.votacion-form input,
.votacion-form select {
    width: 100%;
    padding: 0.6rem;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
}

.podio-selects {
    display: flex;
    gap: 0.5rem;
}

.podio-selects select {
    flex: 1;
}

.btn-enviar {
    background: #ff2b2b;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

.btn-enviar:hover {
    background: #cc0000;
}

.resultado {
    margin-top: 2rem;
    background: #1a1a1a;
    padding: 1rem;
    border-left: 4px solid #ff2b2b;
    border-radius: 8px;
    color: #fff;
}

/* Botón Votar animado y profesional */
#mostrar-formulario {
    background: linear-gradient(270deg, #ff1e00, #ff9900, #ff1e00);
    background-size: 600% 600%;
    color: #fff;
    font-weight: bold;
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 30, 0, 0.4);
    animation: gradientAnim 5s ease infinite;
}

/* Hover y efecto presionado */
#mostrar-formulario:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 50, 0, 0.6);
}

#mostrar-formulario:active {
    transform: scale(0.98);
}

/* Animación de degradado en movimiento */
@keyframes gradientAnim {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


button {
    background: linear-gradient(90deg, #ff1e00, #d61800);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 30, 0, 0.5);
}

#contacto {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    margin: 30px auto;
}

#contacto h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffcc00;
}

#contacto form input,
#contacto form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    background: #2e2e2e;
    color: white;
    font-size: 14px;
}

#contacto form button {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

footer {
    background-color: #111;
    padding: 15px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #home {
        padding: 60px 10px;
    }

    #home h2 {
        font-size: 24px;
    }

    #home p {
        font-size: 16px;
    }

    .imagen-circuito {
        height: auto;
    }

    button {
        width: 100%;
        padding: 12px;
        font-size: 18px;
    }
}

/* 🔧 OPTIMIZACIONES PARA MOVIL */
@media (max-width: 768px) {
    /* Evitar parallax en móviles */
    #home {
        background-attachment: scroll;
    }

    /* Quitar animaciones pesadas en mobile */
    header {
        animation: none;
        background: #1a1a1a; /* más liviano */
    }

    #mostrar-formulario,
    .btn-carrusel {
        animation: none;
    }

    .imagen-circuito {
        animation: none;
        transform: none;
    }

    /* Sombras más suaves */
    #proxima-carrera,
    .carrera-container {
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    #home h2 {
        animation: none;
        text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
    }
}
