:root {
    --azul-cielo: #0047BA;
    --gris-oscuro-texto: #333333;
    --blanco-puro: #FFFFFF;
    --fuente-titulos: 'Museo Sans Rounded 500', sans-serif;
    --fuente-panel: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

.video-background-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.video-background-container video { width: 100%; height: 100%; object-fit: cover; }
.video-background-container::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* === INICIO DE LA CORRECCIÓN PRINCIPAL === */
body.votacion-body {
    font-family: var(--fuente-panel);
    /* Ya no forzamos la altura, permitimos que crezca */
    min-height: 100vh; /* Asegura que al menos ocupe toda la pantalla */
    overflow-y: auto; /* PERMITE EL SCROLL SIEMPRE */
}

.votacion-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh; /* Hacemos que el contenedor principal también ocupe la altura */
}

.votacion-main {
    flex-grow: 1; /* El contenido principal seguirá intentando ocupar el espacio */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}
/* === FIN DE LA CORRECCIÓN PRINCIPAL === */

.votacion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
}
.logo-miss-ecuador { height: 50px; }
.logo-cielo { height: 80px; transition: height 0.3s ease; }

.votacion-intro-text { text-align: center; margin-bottom: 1rem; }
.votacion-title { color: var(--azul-cielo); font-family: var(--fuente-titulos); font-size: clamp(2rem, 5vw, 2.8rem); text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.votacion-subtitle { font-size: clamp(1rem, 3vw, 1.2rem); color: var(--gris-oscuro-texto); margin-top: 0.5rem; }

.votacion-login-link { text-decoration: none; color: inherit; }
.votacion-login-link .votacion-subtitle { display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: color 0.3s ease; }
.votacion-login-link:hover .votacion-subtitle { color: var(--azul-cielo); }
.instagram-icon-wrapper { display: inline-flex; background-color: var(--azul-cielo); color: var(--blanco-puro); border-radius: 50%; padding: 5px; transition: transform 0.3s ease; }
.votacion-login-link:hover .instagram-icon-wrapper { transform: scale(1.1); }

.candidate-swiper { width: 100%; padding: 20px 0; max-height: 500px; }
.candidate-slide {
    width: 300px; height: 450px; border-radius: 20px;
    background-size: cover; background-position: center top;
    position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease;
}
.candidate-slide:hover { transform: scale(1.03); }

.candidate-slide-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.candidate-slide-content {
    position: absolute; bottom: 0; left: 0;
    width: 100%; z-index: 2; padding: 1.5rem; text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: var(--blanco-puro);
}
.candidate-name { font-family: var(--fuente-titulos); font-size: 1.8rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); margin: 0; }
.candidate-city { font-size: 1rem; opacity: 0.9; margin-top: 0.25rem; }

.vote-button {
    font-family: var(--fuente-titulos);
    background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: var(--blanco-puro); border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px; padding: 0.8rem 0; font-size: 1rem; font-weight: bold;
    text-transform: uppercase; text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    cursor: pointer; width: 80%; max-width: 220px; transition: all 0.3s ease;
    margin-top: 1.5rem; position: relative; overflow: hidden;
}
.vote-button:hover { background: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.5); transform: scale(1.05); }

.votacion-footer { text-align: center; padding-top: 2rem; color: var(--gris-oscuro-texto); opacity: 0.7; flex-shrink: 0; }

.ripple {
    position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.7);
    transform: scale(0); animation: ripple-animation 0.6s linear;
}
@keyframes ripple-animation { to { transform: scale(4); opacity: 0; } }

.votacion-cta-area {
    margin-top: 1.5rem;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.cta-button, .login-cta-button {
    display: inline-block; background-color: var(--azul-cielo); color: var(--blanco-puro);
    padding: 0.9rem 2.5rem; border-radius: 50px; text-decoration: none;
    font-family: var(--fuente-titulos); font-weight: 500; font-size: 1.1rem;
    border: none; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 71, 186, 0.3);
    transition: all 0.3s ease;
}
.cta-button:hover, .login-cta-button:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0, 71, 186, 0.4); }
.cta-button:disabled { background-color: #6c757d; cursor: not-allowed; transform: none; box-shadow: none; }
.follow-step-wrapper { display: flex; gap: 1rem; }
.continue-button { background-color: #28a745; box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3); }
.continue-button:hover { background-color: #218838; box-shadow: 0 12px 25px rgba(40, 167, 69, 0.4); }

@media (min-width: 1024px) {
    .logo-miss-ecuador { height: 80px; }
    .logo-cielo { height: 90px; }
}

/* Eliminamos la media query para móvil horizontal porque ahora el comportamiento de scroll es global */