/* ============================
   ESTILOS GENERALES
   ============================ */
   body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f6fc;
    color: #001a33;
    margin: 0;
    padding: 0;
}

/* ============================
   ENCABEZADO
   ============================ */
   .header-election {
    background-color: #001a33;
    color: whitesmoke;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centra todo el contenido */
    flex-direction: column; /* Coloca el logo encima del texto en pantallas pequeñas */
    text-align: center; /* Centra el texto de manera predeterminada */
}

.header-election .logo-container {
    margin-bottom: 10px; /* Separa el logo del texto en pantallas pequeñas */
}

.header-election .logo {
    max-height: 50px;
    margin-right: 20px;
}

.header-election .text-container {
    text-align: center; /* Alinea el texto al centro en pantallas pequeñas */
    margin-right: 20px;
}

@media (min-width: 768px) {
    .header-election {
        flex-direction: row; /* En pantallas grandes, logo y texto en fila */
        justify-content: space-between; /* El logo se va a la izquierda y el texto se mantiene centrado */
        text-align: center; /* Alinea el texto a la izquierda en pantallas grandes */
        max-width: 1200px; /* Define un ancho máximo para que no se estire demasiado */
        margin: 0 auto; /* Centra el contenedor en la pantalla */
    }

    .header-election .text-container {
        text-align: center ; /* Alinea el texto a la izquierda en pantallas grandes */
        padding-right: 25%; /* Añade un poco de espacio al lado izquierdo en pantallas grandes */
    }

    .header-election .logo-container {
        margin-bottom: 0; /* Elimina el margen inferior para la vista en pantallas grandes */
    }
}

/* ============================
   CONTENEDORES GENERALES
   ============================ */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* ============================
   TARJETAS DE EVENTOS
   ============================ */
.card-election {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.15);
    padding: 16px;
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.card-election h2 {
    margin-bottom: 15px;
}

/* ============================
   BOTONES
   ============================ */
button {
    background-color: #c70039;
    color: whitesmoke;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #a5002f;
}

/* ============================
   BOTÓN FLOTANTE
   ============================ */
.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0044cc;
    color: whitesmoke;
    padding: 12px 18px;
    border-radius: 50%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
}

.floating-button:hover {
    background: #b44866;
}

/* ============================
   CARRUSEL
   ============================ */
#calendario-section {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.carousel-inner {
    padding: 20px;
}

.carousel-item {
    text-align: center;
}

/* ============================
   CARRUSEL: CONTROLES
   ============================ */
.carousel-control-prev,
.carousel-control-next {
       width: 30px;
       height: 30px;
       background-color: rgba(0, 0, 0, 0.3);
       border-radius: 50%;
       opacity: 0.8;
       transition: opacity 0.3s ease;
       margin-top: 20px; /* Ajustado para bajar los controles */
       margin-bottom: 0;
   }

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

/* ============================
   TARJETAS DE EVENTOS
   ============================ */
   .card-election {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    width: 100%;
    max-width: 320px;
    border-left: 5px solid #0044cc; /* Borde lateral azul para resaltar */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-election:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

.card-election h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #001a33;
}

.card-election h3 {
    font-size: 1.5em;
    color: #555;
    margin-bottom: 8px;
}

.card-election h4 {
    font-size: 1.2em;
    color: #777;
}

.card-election p {
    font-size: 1em;
    color: #333;
}


/* ============================
   TOOLTIP DE EVENTOS
   ============================ */
.evento-card .tooltip {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    z-index: 1000;
    white-space: nowrap;
}

.evento-card:hover .tooltip {
    display: block;
}

/* ============================
   PIE DE PÁGINA
   ============================ */
footer {
    background-color: #001a33;
    color: whitesmoke;
    text-align: center;
    padding: 20px;
}

footer a {
    color: #c70039;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================
   MEDIA QUERIES: RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .card-election {
        max-width: 100%;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 25px;
        height: 25px;
        margin-top: 0;
        margin-bottom: 0;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .header-election {
        padding: 15px;
    }

    .header-election .logo {
        margin-bottom: 10px; /* Asegura que el logo quede sobre el título */
    }

    .header-election h1 {
        font-size: 1.5em;
    }

    .header-election p {
        font-size: 1em;
    }

    .floating-button {
        padding: 10px 14px;
    }
}
