.imagen-captura-mapa {
    transition: all 0.2s ease-in-out; /* Suaviza todos los cambios con una duración más corta */
}


/* Cuando no hay imagen, desactivar el hover */
.imagen-captura-mapa.no-hover {
    pointer-events: none; /* Desactiva todo tipo de interacción con la imagen */
}

/* Estilo de hover, solo aplicado si no tiene la clase no-hover */
.avatar:hover .imagen-captura-mapa:not(.no-hover) {
    position: fixed;
    left: 21.95em;
    top: 2em;
    background: white;
    width: 60%;
    height: 40em;
    z-index: 100000;
    border-radius: 0;
}
a.hover-primary {
        cursor: pointer; /* Cambia el cursor a estilo de enlace */
    }

#chat-circle.glow-effect {
        box-shadow: 0 0 20px #f0ad4e, 0 0 30px #f0ad4e, 0 0 40px #f0ad4e !important;
        transform: scale(1.05) !important;
        transition: all 0.3s ease !important;
    }
    
    #chat-circle {
        transition: all 0.3s ease !important;
    }
    
    #static-chat-circle {
        transition: all 0.3s ease !important;
    }
    
    
/* INICIO RANER */

.content-wrapper
{
	border-radius: 0;

}
.contenedor-general {
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 15% 1fr 40%;
    grid-template-areas: 
        "header header header"
        "sidebar-left content-center sidebar-right"  
        "graficos-container graficos-container graficos-container";
    margin: 0;
    padding: 0;
}


.sidebar-right, .content-center {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 0.33em;
    border-radius: 1.1em;
}



.content-center {
    grid-area: content-center;
    background-color: black;
}

.sidebar-right {
    grid-area: sidebar-right;
    padding-top:0,22em;
}

.graficos-container {
    grid-area: graficos-container;
    background-color: darkblue;
    height: 22vh;
    display: flex;
	align-items: center;
}



/* Para visualizar mejor el contenido */
.header, .graficos-container {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin:0.33em;
    border-radius:1.1em;
}
.header {
    grid-area: header;
    background-color: #2f3478;
    height: 8vh;
    margin: 0 0 0.33em 0;
    border-radius:0;
    width: 100%
    
}

.sidebar-left, .sidebar-right, .content-center {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 0.33em;
    border-radius: 1.1em;
}

/* Columna izquierda mensajes de alerta  */

.sidebar-left {
    flex-direction: column !important; 
    padding: 0.5em;
    gap: 0.5em; 
    border-radius: 1em;
    overflow-y: auto;
    margin: 0.33em;
    justify-content: flex-start !important; 
    align-items: stretch !important;
}


.box-sidevarLeft {
    flex-shrink: 0; 
    padding: 1em;
    text-align: left;
    background-color: white;
    border-radius: 0.8em;
    color: #2f3478;
    font-size: 0.9em;
    width: 100%;
    min-height: 125px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    border-left: 6px solid transparent; /* línea lateral por defecto */
}

/* Colores por categoría de l alerta */
.box-embalses {
    border-left-color: blue !important; 
}

.box-incendios {
    border-left-color: red !important; 
}

.box-contaminacion {
    border-left-color: green !important;
}

.box-muertes {
    border-left-color: yellow !important;
}

.box-sismos{
    border-left-color: orange !important;
}


.text-sidevarLeft {
    color: #2f3478;
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 0.5em;
}

/* Contenedor principal de la leyenda */
.leyenda-general {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    gap: 4px;
    width: 100%;
    max-width: 320px;   
    margin: 10px auto;  
    padding: 12px;
    border-radius: 8px;
    background-color: white;
    border-radius: 0.8em;
    width: 100%;
    min-height: 125px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  /* Cada celda de la leyenda */
.leyenda-celda {
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-start; 
}
  
.swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex: 0 0 14px;
}

.leyenda-titulo {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: bold;
    margin-bottom: 4px;
    color: #2f3478;
    font-size: 0.9em;
  }
  
.leyenda-text {
    font-size: 1.1em;
    color: #2f3478;
    white-space: nowrap;
    font-weight: normal;
}
  
  .swatch.embalses      { background: blue; }
  .swatch.contaminacion { background: green; }  
  .swatch.incendios     { background: red; } 
  .swatch.muertes       { background: yellow; }  
  .swatch.sismos        { background: orange; }


/* Bordes de colores para los mapas */

#chj_id_Zona21,
#chebro_id_Zona21,
#embalsesesp_id_Zona21,
#chtajo_id_Zona21 {
    border-left: 5px solid blue;
}

#firms_100_id_Zona21  {
    border-left: 5px solid red;
}
#terremotos_200_id_Zona21{
    border-left: 5px solid orange;
}

#contaminacionglobal_id_Zona21 {
    border-left: 5px solid green;
}

/* Mapa de muertes color amarillo 

#terremotos_200_id_Zona2 {
    border-left: 5px solid yellow;
}
    */

/* IMPORTANTE: Modificar sidebar-right para layout vertical */
.sidebar-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* Los hijos ocupan todo el ancho */
    justify-content: flex-start !important; /* Empieza desde arriba */
    overflow-y: auto; /* Scroll si hay muchos elementos */
}
/* CSS para el graficos-container carrusel */
.graficos-container {
    position: relative;
    background: #ff6b35; /* Color llamativo temporal para ajustes */
    min-height: 120px;
}

.graficos-container-carousel-container {
    display: flex;
    align-items: stretch; /* Para que todos los elementos ocupen toda la altura */
    width: 100%;
    position: relative;
    height: 100%;
}

/* Columnas de controles */
.graficos-container-left-controls,
.graficos-container-right-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 50px;
}

.graficos-container-left-controls {
    margin-right: 15px;
}

.graficos-container-right-controls {
    margin-left: 15px;
}

/* Botón de eliminar (SOLO en la izquierda) */
.graficos-container-remove-btn {
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.graficos-container-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Botón de añadir (SOLO en la derecha) */
.graficos-container-add-btn {
	margin-left:auto;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #28a745;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.graficos-container-add-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

/* Botones de deslizar */
.graficos-container-slide-btn {
    width: 50px;
    flex: 1; /* Ocupa el espacio restante en la columna */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #007bff;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.graficos-container-slide-btn:hover {
    background: #007bff;
}

.graficos-container-slide-btn:hover .slide-arrow {
    color: white;
}

.slide-arrow {
    font-size: 18px;
    color: #007bff;
    transition: color 0.3s ease;
}

.graficos-container-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%; /* Ocupa toda la altura disponible */
}

.graficos-container-items-wrapper {
    display: flex;
    transition: transform 0.3s ease-in-out;
    height: 100%; /* Ocupa toda la altura del contenedor */
    
}

.graficos-container-item {
    flex: 0 0 30em;
    text-align: center;
    padding: 10px;
    background: white;
    height: 100%;
    margin: 0 5px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: flex 0.7s ease, transform 0.5s ease, box-shadow 0.5s ease;
    box-sizing: border-box;
}

.graficos-container-item:hover {
    
    flex: 0 0 60em;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}




/* Estados deshabilitados */
.graficos-container-slide-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(126, 123, 123, 0.5);
}



.graficos-container-add-btn.disabled,
.graficos-container-remove-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .graficos-container-item {
        flex: 0 0 150px;
    }
    
    .graficos-container-left-controls,
    .graficos-container-right-controls {
        width: 40px;
    }
    
    .graficos-container-left-controls {
        margin-right: 10px;
    }
    
    .graficos-container-right-controls {
        margin-left: 10px;
    }
    
    .graficos-container-add-btn,
    .graficos-container-remove-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .graficos-container-slide-btn {
        width: 40px;
    }
    
    .slide-arrow {
        font-size: 16px;
    }
}


/* Cabecera del sidebar - se mantiene en la parte superior */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5% 2%;
    border-bottom: 1px solid #ddd;
    border-radius: 1.1em 1.1em 0 0; /* Bordes redondeados solo arriba */
    flex-shrink: 0; /* No se comprime */
}

/* Título de la cabecera */
.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* Modificar tu .sidebar-content existente */
.sidebar-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    flex: 1;
    padding: 0.8em;
    column-gap: 2.2em;
    row-gap: 1em; /* AÑADIR: Espacio entre filas */
    grid-auto-rows: minmax(20.2em, auto); /* AÑADIR: Altura automática de filas */
    transition: all 0.6s ease; /* AÑADIR: Transición suave del grid */
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.header-center h3 {
    margin: 0;
}


/* AÑADIR todo esto */
.sidebar-item {
    min-height: 60px;
    height: 20.2em;
    border-radius: 1.1em;
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
    position: relative;
    margin: '.$m_item_inf.'%;
}

/* Botones de la cabecera - más compactos */
.btn-header {
    border-radius: 50%; /* Botones circulares */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background:none;
}


/* Botón añadir */
.btn-add i {
    color: #218838;
}

.btn-add:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-remove i {
    color: #c82333;
}

.btn-remove:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-add:hover i {
    color:white;
}


.btn-remove:hover i {
    color:white;
}

/* Iconos dentro de los botones */
.btn-header i {
    font-style: normal;
    font-weight: bold;
    font-size: 2.2em;
}

.btn-zoom i {
    color: #007bff;
}

/* SECTION DIV PRINCIPAL */

/* Contenedor principal - modificado para no centrar */
.content-center {
    display: flex;
    flex-direction: column;
    height: 500px;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    margin: 0;
    position: relative;
}

/* Contenedor de la barra de pestañas */
.tabs-container {
    background-color: #e8e8e8;
    border-bottom: 1px solid #ccc;
    padding: 0;
    display: flex;
    align-items: stretch;
    height: 40px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width:100%;
    border-radius: 1.1em 0 0 ;
}

/* Botones de navegación lateral */
.nav-button {
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
    border: none;
    border-right: 1px solid #ccc;
    width: 32px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.nav-button:hover {
    background: linear-gradient(180deg, #e8e8e8 0%, #d8d8d8 100%);
}

.nav-button:active {
    background: linear-gradient(180deg, #d0d0d0 0%, #c0c0c0 100%);
}

/* Container de scroll para pestañas */
.tabs-scroll-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Wrapper de pestañas */
.tabs-wrapper {
    display: flex;
    height: 40px;
    transition: transform 0.3s ease;
}

/* Estilo individual de cada pestaña */
.tab {
    background: linear-gradient(180deg, #d8d8d8 0%, #c8c8c8 100%);
    border-right: 1px solid #aaa;
    min-width: 160px;
    max-width: 220px;
    height: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 0 12px;
    transition: all 0.2s ease;
    border-top: 2px solid transparent;
    flex-shrink: 0;
}

.tab:hover {
    background: linear-gradient(180deg, #e0e0e0 0%, #d0d0d0 100%);
}

.tab.active {
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
    border-top: 2px solid #4285f4;
    z-index: 1;
}

/* Favicon de la pestaña */
.tab-favicon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background: #666;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Título de la pestaña */
.tab-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: #333;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Botón cerrar pestaña */
.tab-close {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
    flex-shrink: 0;
}

.tab-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Botón nueva pestaña */
.new-tab-button {
    background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
    border: none;
    border-left: 1px solid #ccc;
    width: 32px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.new-tab-button:hover {
    background: linear-gradient(180deg, #e8e8e8 0%, #d8d8d8 100%);
}

.new-tab-button:active {
    background: linear-gradient(180deg, #d0d0d0 0%, #c0c0c0 100%);
}

/* Contenido del mapa */
.map-content {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    background-color: #f9f9f9;
}

/* Animaciones */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-5px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.tab {
    animation: fadeIn 0.2s ease;
}

/* Ocultar scrollbars para mejor aspecto */
.tabs-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 768px) {
    .tab {
        min-width: 120px;
        max-width: 180px;
    }
    
    .tab-title {
        font-size: 12px;
    }
}

sidebar-right::-webkit-scrollbar {
    width: 30px; /* O incluso 24px si la quieres muy grande */
}

.sidebar-right::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px; /* Ajustar proporcionalmente */
}

.sidebar-right::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px; /* Ajustar proporcionalmente */
    border: 3px solid #f1f1f1; /* Borde más grueso para barras muy anchas */
}

/* Contenedor principal de tabs */
.tabs-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Contenedor con scroll */
.tabs-scroll-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Wrapper de tabs - DEBE estar en horizontal */
.tabs-wrapper {
    width: 100%;
    overflow: hidden;
}

/* Nav tabs - configuración horizontal */
.nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    transition: transform 0.3s ease;
    margin-bottom: 0;
    border-bottom: 1px solid #dee2e6;
}

/* Items de navegación */
.nav-tabs .nav-item {
    flex-shrink: 0;
    margin-bottom: -1px;
}

/* Links de navegación */
.nav-tabs .nav-link {
    white-space: nowrap;
    border: 1px solid transparent;
    border-bottom-color: transparent;
    padding: 0.5rem 1rem;
}

/* Botones de navegación */
.nav-button {
    display: none; /* Ocultos por defecto */
    flex-shrink: 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

.nav-button:hover {
    background: #e9ecef;
}

.nav-button:first-of-type {
    border-right: none;
}

.nav-button:last-of-type {
    border-left: none;
}

/* Botón de nueva pestaña */
.new-tab-button {
    flex-shrink: 0;
    background: #007bff;
    color: white;
    border: 1px solid #007bff;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    margin-left: 0.25rem;
}

.new-tab-button:hover {
    background: #0056b3;
}

h4{

text-align:center;
color:#2f3478;
}
h3{

color:#2f3478;
}

/* Pestañas superiores */
#tabs-mapas-bloques {
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
}

#tabs-mapas-bloques .nav-item:not(.dropdown) {
    flex: 1;
}

#tabs-mapas-bloques .nav-item.dropdown {
    display: flex;
    align-items: stretch;
}

#tabs-mapas-bloques .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tabs-mapas-bloques .nav-link:hover {
    background: #e9ecef;
    color: #495057;
    border-bottom-color: #adb5bd;
}

#tabs-mapas-bloques .nav-link.active {

    color:#2f3478;
    border-bottom-color: #2f3478;

}

#tabs-mapas-bloques .dropdown .nav-link {
    border-left: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    min-width: 60px;
}

#tabs-mapas-bloques .dropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
}

#tabs-mapas-bloques .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0;
}

#tabs-mapas-bloques .dropdown-item {
    padding: 0.5rem 1.5rem;
    color: #495057;
    transition: all 0.2s ease;
}

#tabs-mapas-bloques .dropdown-item:hover {
    background: #f8f9fa;
    color:#2f3478;
}

#tabs-mapas-bloques .dropdown-item i {
    width: 20px;
    text-align: center;
}

#tabs-mapas-bloques .dropdown-divider {
    margin: 0.5rem 0;
}

.sidebar-header {
    padding: 1rem;
    color: white;
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    #tabs-mapas-bloques .nav-link {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    #tabs-mapas-bloques .dropdown .nav-link {
        padding: 0.75rem 0.75rem;
        min-width: 50px;
    }
}

/*       FIN RANER */
        
