/* Estilos generales del cuerpo */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}
.pulsating-icon {
  width: 1.5rem; height: 1.5rem;
  background: rgba(40, 200, 70, 0.65);
  border-radius: 50%;
  box-shadow: 0 0 14px #19d146, 0 0 34px #86f995;
  opacity: 1; /* el JS lo pone en 0 temporalmente */
}

.pulsating-icon::before {
  content: '';
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  position: absolute; top: 0; left: 0;
  background: rgba(75, 255, 110, 0.45);
  animation: pulsate 1.2s infinite;
  transform-origin: center center;
}
@keyframes pulsate {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.4); opacity: 0.3; }
  100% { transform: scale(1); opacity: 1;}
}

  #loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
  }

  .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  #loader p {
    font-family: sans-serif;
    font-size: 18px;
    color: #333;
  }

/* Contenedor para el botón en la esquina superior izquierda */
#btn-inicio-container {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1100;
}

/* Estilo refinado del botón */
#btn-inicio {
    display: inline-block;
    background-color: #dc2626;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#btn-inicio:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}


#btn-inicio:hover {
    background-color: rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

#tooltip-name {
    position: absolute;
    background-color: #222;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    pointer-events: none;
    font-size: 14px;
    display: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
/* Estilos generales para el mapa */
#map {
    height: 100vh;
}

#map {
    filter: brightness(0.9) contrast(1.1); /* valores ajustables */
}

.hovered-zone {
    fill-opacity: 0.1;
    fill: #00ffff ;
    transition: fill-opacity 0.1s ease;
}

.panel-estadisticas {
    margin-top: 20px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    font-family: sans-serif;
}

.panel-estadisticas h3 {
    margin-top: 0;
    color: #333;
}

/* Responsividad: Ajuste para pantallas pequeñas */
@media screen and (max-width: 768px) {
    #estadisticas {
        width: 80%;
        bottom: 20px;
        right: 10%;
        border-radius: 8px;
        transform: translateY(0); /* Cambié el valor de translateY para que el contenedor sea visible */
        opacity: 0.8; /* Asegura que el contenedor esté visible */
    }

    #estadisticas h3 {
        font-size: 18px;
        color: #dc2626 !important;
    }
}

/* Estilos del contenedor de estadísticas */
#estadisticas {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    color: white;
    padding: 20px;
    font-size: 16px;
    box-sizing: border-box;
    z-index: 1000;
    border-radius: 12px;
    transform: translateX(100%); /* Oculto inicialmente fuera de la pantalla */
    transition: transform 0.3s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
}

/* Estilos para vista móvil */
@media (max-width: 768px) {
    #estadisticas {
        top: 0;
        left: 10px;
        right: 10px;
        width: auto;
        height: 280px;
        overflow-y: auto;
        font-size: 14px;
        padding: 10px;
        transform: translateY(0);
        opacity: 0.8;
        border-radius: 0 0 10px 10px;
    }
}

    /* Centramos los datos dentro del contenedor */
    #estadisticas h3, #estadisticas p {
        text-align: center;
    }

    /* Para hacer el texto de las estadísticas más grande en pantallas pequeñas */
    #estadisticas h3 {
        font-size: 18px;
        color: #007BFF;
    }

    #estadisticas p {
        font-size: 14px;
        color: #007BFF;
    }


/* Estilos para vista de escritorio */
@media (min-width: 769px) {
    #estadisticas {
        right: 20px;
        top: 20px;
        width: 400px;
        height: auto;
        padding: 20px;
        font-size: 16px;
        transform: translateX(0);
        opacity: 0.8;
    }
}

/* Animación cuando los datos cambian */
#estadisticas h3, #estadisticas p {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    color: #dc2626;
}

#estadisticas h3.show, #estadisticas p.show {
    opacity: 1;
    transform: translateY(0);
}

#estadisticas h3.hide, #estadisticas p.hide {
    opacity: 0;
    transform: translateY(-20px);
}

    #estadisticas {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    #estadisticas h3 {

        font-weight: 700;
        margin-bottom: 15px;
        text-align: center;
    }
    .stats-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 10px;
    }
    .stat-card {
        background: #f8f9fa;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        width: 200px;
        padding: 20px;
        display: flex;
        align-items: center;
        transition: transform 0.2s ease;
    }
    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }
    .stat-icon {
        font-size: 36px;
        margin-right: 15px;
        color: #2980b9;
        flex-shrink: 0;
    }
    .stat-info h4 {
        margin: 0;
        font-size: 16px;
        color: #34495e;
        font-weight: 600;
    }
    .stat-info p {
        margin: 5px 0 0 0;
        font-size: 24px;
        color: #27ae60;
        font-weight: 700;
    }
    p[style*="color: red"] {
        text-align: center;
        font-size: 18px;
    }

    /* Media Queries para responsividad */
    @media (max-width: 768px) {
        .stat-card {
            width: 45%;
        }
    }

    @media (max-width: 480px) {
        .stat-card {
            width: 95%;
            margin: 0 auto;
        }
    }

   .stats-card {
    background-color: #f9f9f9;
    border-left: 6px solid #dc2626;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 16px 20px;
    border-radius: 8px;
    max-width: 400px;
    font-family: 'Segoe UI', sans-serif;
}

.stats-card h3 {
    margin-top: 0;
    color: #dc2626;
    font-size: 1.2em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.stats-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #ddd;
    font-size: 0.95em;
}

.stats-table td:first-child {
    color: #333;
}

.stats-table td:last-child {
    text-align: right;
    color: #dc2626;
    font-weight: bold;
}
.leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar {
    box-shadow: none;
    display: none;
}




#menu-resultados {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 3000;
    padding: 5px 0 2px 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}
#barra-filtro-mes {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 16px 7px 0;
    background: transparent;
}
#selector-mes {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    color: #dc2626;
    border: None;
    border-radius: 24px;
    font-size: 1em;
    padding: 5px 30px 5px 14px;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(50,50,50,.06);
    outline: none;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='17' viewBox='0 0 24 24' width='17' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}
#selector-mes:focus {
    border: 1.5px solid #0277fa;
    box-shadow: 0 0 0 3px #0277fa22;
}

.carrusel-controles {
    display: flex; align-items: center; gap: 7px; padding-bottom: 4px;
}
.carrusel-flecha {
    background: #dc2626; border: none; color: #fff; border-radius: 8px;
    font-size: 1.28em; width: 30px; height: 56px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; margin: 0 2px; opacity: 0.5;
}
.carrusel-flecha:hover { background: #8e2222; opacity: 1; }
#resultados-dias-scroll {
    overflow-x: auto;
    display: flex;
    flex-direction: row;
    gap: 11px;
    padding: 0 7px 0 6px;
    scroll-behavior: smooth;
    flex: 1 1 auto; min-width: 0; max-width: 100vw;
}
/* Oculta la barra de scroll para todos los navegadores */
#resultados-dias-scroll {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
}
#resultados-dias-scroll::-webkit-scrollbar {
    display: none; /* Chrome y Safari */
}
/* Cartas... (ídem versión anterior) */
.card-resumen-dia {
    min-width: 95px; max-width: 120px;
    background: #fff; color: #232323;
    border-radius: 13px;
    box-shadow: 0 3px 10px rgba(42,42,42,0.12);
    padding: 8px 3px 7px 3px;
    font-size: 0.97em;
    margin-bottom: 2px;
    flex-shrink: 0;
    border-left: 4px solid #dc2626;
    display: flex; flex-direction: column; align-items: center;
    opacity: 1;
    transition: box-shadow 0.2s, opacity 0.2s;
    position: relative;
    cursor: pointer;
}

.card-dia-fecha {
    font-size: 1.14em;
    color: #232323;
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: 0.1px;
}

.card-resumen-dia-row {
    display: flex;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-bottom: 2px;
}

.card-dia-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 30px;
    margin: 0 1px;
}

.card-dia-icon {
    font-size: 1.29em;
    margin-bottom: -4px;
    margin-top: 1px;
}

.card-dia-label {
    margin: 0 0 1px 0;
    color: #7a7a7a;
    font-size: 0.75em;
    letter-spacing: .01em;
}

.card-dia-valor {
    color: #dc2626;
    font-size: 1.05em;
    font-weight: 600;
    margin-top: 0;
}

.card-dia-futuro, .card-dia-futuro .card-dia-fecha { color: #bbb!important; }
.card-dia-futuro { background: #f7f7f7; border-left: 4px dashed #ddd;}
.card-dia-vacio .card-dia-label, .card-dia-vacio .card-dia-valor { color: #c7c7c7!important; }
.card-dia-vacio { background: #fafafa; color: #bbb; border-left: 4px solid #ccc;}
.card-dia-actual, .card-dia-actual .card-dia-fecha { border-color: #dc2626 !important; color: #dc2626 !important; }
.card-dia-seleccionada { outline: 2px solid #dc2626; border-color: #dc2626 !important; box-shadow: 0 0 0 2px #dc262665; z-index:2; }
.card-dia-actual.card-dia-seleccionada { outline: 2.5px solid #0277fa; border-color: #0277fa !important; box-shadow: 0 0 0 3px #36abff99; }
.card-resumen-dia:active:not(.card-dia-futuro):not(.card-dia-vacio),
.card-resumen-dia:hover:not(.card-dia-futuro):not(.card-dia-vacio) { 
    box-shadow: 0 0 0 2px #dc2626cc; border-color: #aaa;
}

@media (max-width: 600px) {
    .card-resumen-dia { min-width: 62px; max-width: 84px; font-size: 0.86em; }
    #barra-filtro-mes { padding: 0 7px 6px 0; }
    #selector-mes { font-size: 0.97em; padding: 5px 29px 5px 10px;}
}

.card-dia-seleccionada {
    outline: 2.5px solid #dc2626;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px #dc26266c;
    z-index: 2;
}
.card-dia-actual.card-dia-seleccionada {
    outline: 2.5px solid #dc2626;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px #dc2626;
}

