/* static/css/base.css */

/* 1. PALETA DE COLORES */
:root {
    --color-primario: #27348b;
    /* AZUL NUEVO */
    --color-secundario: #202b70;
    /* Azul un poco más oscuro o variante */
    --color-verde: #36aa49;
    /* VERDE NUEVO */
    --color-amarillo: #feed00;
    /* AMARILLO NUEVO */
    --color-texto: #212529;
    --color-fondo: #f4f6f9;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 2. BARRA DE NOTICIAS (TICKER) - CORREGIDO */
.news-ticker-container {
    background-color: var(--color-secundario) !important;
    /* Azul Corporativo */
    width: 100%;
    height: 40px;
    overflow: hidden;
    /* Esconde lo que se sale */
    white-space: nowrap;
    /* Obliga a una sola línea */
    position: relative;
    box-sizing: border-box;
    z-index: 1001;
    /* Asegura que esté encima */
}

.news-ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    /* Empieza fuera de la pantalla a la derecha */
    /* Animación: Nombre | Duración | Curva | Infinito */
    animation: ticker-move 35s linear infinite;
}

/* Estilo de cada mensaje individual */
.news-ticker-content span {
    display: inline-block;
    padding-right: 80px;
    /* ESPACIO GARANTIZADO entre mensajes */
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    vertical-align: middle;
    line-height: 40px;
    /* Centrado vertical */
}

/* Definición del movimiento */
@keyframes ticker-move {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Pausar si el usuario pone el mouse encima (opcional, buena práctica) */
.news-ticker-container:hover .news-ticker-content {
    animation-play-state: paused;
}

/* 3. NAVBAR PRINCIPAL */
.navbar {
    background-color: var(--color-primario) !important;
}

.navbar-brand {
    background-color: transparent !important;
    padding: 0;
    margin-right: 2rem;
}

.nav-link {
    color: var(--color-primario) !important;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--color-amarillo) !important;
}

/* 4. BOTÓN DE ACCIÓN (SOLUCIÓN DEFINITIVA) */
/* Usamos a.btn para ser más específicos que Bootstrap */
a.btn-header-action {
    background-color: var(--color-primario) !important;
    color: #ffffff !important;
    /* BLANCO FORZADO */
    font-weight: 800;
    border: 1px solid var(--color-primario) !important;
    box-shadow: 0 4px 0px #1a235e;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    /* Sombra al texto para leerlo mejor */
}

a.btn-header-action:hover {
    background-color: var(--color-secundario) !important;
    /* FONDO AZUL OSCURO AL PASAR MOUSE */
    border-color: var(--color-secundario) !important;
    color: #ffffff !important;
    /* Mantiene el blanco */
    transform: translateY(2px);
    box-shadow: 0 2px 0px #0f143a;
}

/* 5. FOOTER */
footer {
    background-color: var(--color-primario);
    border-top: 5px solid var(--color-amarillo);
}

/* Utilidades */
.shadow-float {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* --- BUSCADOR DE ALIADOS --- */

/* Input de búsqueda activo */
#buscador-aliados:focus {
    border-color: var(--color-amarillo);
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}

/* Tarjeta de Aliado */
.aliado-card {
    background: white;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
    height: 100%;
}

.aliado-card:hover {
    border-color: var(--color-primario);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
    /* Se mueve un poquito a la derecha */
}

/* Iconos de colores */
.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    /* Evita que el icono se aplaste */
}

.aliado-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* 6. NOTIFICACIONES ESTILO BANNER (TIPO COOKIES) - PREMIUM LOOK */
.notification-banner-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 13000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notification-banner {
    background: rgba(39, 52, 139, 0.98);
    /* var(--color-primario) con leve transparencia */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 18px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin-bottom: 12px;
    transform: translateY(150%);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 6px solid var(--color-amarillo);
}

.notification-banner.show {
    transform: translateY(0);
}

.banner-content {
    flex-grow: 1;
    margin-right: 25px;
}

.banner-title {
    font-weight: 800;
    color: var(--color-amarillo);
    margin-right: 10px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.banner-text {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: #f0f0f0;
}

.btn-close-banner {
    background-color: var(--color-amarillo);
    color: #27348b;
    border: none;
    padding: 8px 22px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 0 4px 0px #d4ac0d;
}

.btn-close-banner:hover {
    background-color: #ffffff;
    color: var(--color-primario);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-close-banner:active {
    transform: translateY(0);
    box-shadow: 0 2px 0px #d4ac0d;
}

@media (max-width: 768px) {
    .notification-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .banner-content {
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* Ajuste de botón WhatsApp en móviles */
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        /* Mantener a la izquierda */
        right: auto;
        /* Asegurar que no se estire */
        width: 60px;
        /* Ancho fijo */
        height: 60px;
        /* Alto fijo */
        padding: 0;
        /* Sin padding lateral */
        border-radius: 50%;
        /* Bolita perfecta */
        justify-content: center;
        /* Centrar icono */
        display: flex;
        align-items: center;
    }

    .whatsapp-float span {
        display: none;
        /* Solo icono en móviles pequeños si es necesario, o mantener texto */
    }

    .whatsapp-float i {
        margin-right: 0;
    }
}

/* 7. BOTÓN FLOTANTE WHATSAPP PREMIUM */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    z-index: 12000;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
}

.whatsapp-float i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1) translateY(-5px);
    color: white;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* Animación de pulso suave */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background-color: #25d366;
    z-index: -1;
    animation: pulse-whatsapp 2s infinite;
    opacity: 0.6;
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}