/* =================================
   1. VARIABLES Y ESTILOS BASE
   ================================= */
:root {
    --bg-color: #fff;
    --color-principal: #9E1834; /* Enlaces, Títulos, Tabla TH */
    --color-secundario: #2472db;/*#457E76; /* Botones, Gráficos */
    --color-claro: #ffffff;
    --color-texto: #000000; /* Texto BODY */
    --color-sombra: rgba(0, 0, 0, 0.1);
    --color-grafico: #0c4680;
    --color-boton-agregar: #e2be52;
    --color-boton-secundario: #e9c89e;
    --color-boton-borrar: #cc0000;
    --border-gray: #949494;
    --color-err: rgba(225,25,25,0.2);
    --color-dark: #333;
    --color-modal-header: #c8dcf5;
}

body                                { font-family: Arial, Helvetica, sans-serif; font-size: 1rem; background-color: var(--color-claro); color: var(--color-texto); margin: 0; padding: 0; line-height: 1.5; position: relative; }
body.nocab::after                   { content: ""; background: url(/menus/Sites/explica/img/explica.svg) right bottom no-repeat; background-size: contain; background-size: auto 48px; width: 100%; height: 48px; position: absolute; bottom: 0; right: 0; }

body > footer                       { text-decoration: none; font-size: 1rem; background: var(--color1-100); color: var(--bg-color); padding: 1rem; outline: none; margin: auto 0 0 0; position: relative; clear: both; text-align: center; }
body > footer a                     { display: inline-block;}
body > footer a:active,
body > footer a:focus,
body > footer a:hover,
body > footer a:link,
body > footer a:visited             { text-decoration: none; color: var(--bg-color); position: relative; }
body > footer ul                    { list-style-type: none; margin-top: 5px; margin-bottom: 5px; display: flex; gap: 0; flex-flow: row wrap; justify-content: center; align-items: center; }
body > footer ul li                 { border-left: 1px solid rgba(0,0,0,0.1); padding: 0 8px; }
body > footer li + li               { border-right: 1px solid rgba(255,255,255,0.1); }
body > footer li:first-child        { border-left: 0 none; border-right: 1px solid rgba(255,255,255,0.1); }
body > footer li:last-child         { border-right: 0 none; }
body > footer a                     { min-height: 36px; line-height: 36px; }
body > footer .ii                   { color: var(--bg-color); font-size: 26px; position: relative; top: 6px; }
body > footer .copyright            { flex: 100%; text-align: center; }
body > footer .copyright p          { margin: 0; }
body > footer .copyright a          { min-height: 44px; line-height: 44px; margin: 0; padding: 0; }

@media screen and (max-height: 650px) {
	body > footer { margin-top: 4rem;}
}

.container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Estilo de la clase .box (contenedores principales) */
.box {
    background: var(--color-claro);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--color-sombra);
}

.success {
    background: rgb(0 255 90 / 20%) !important;
    color: var(--text-color);
    padding: 5px;
    border-radius: 5px;
    position: relative;
}

.err {
    background: rgba(255,0,0,0.2) !important;
    color: var(--text-color);
    padding: 5px 24px 5px 5px;
    border-radius: 5px;
    position: relative;
}

.err span {
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    text-align: center;
    cursor: pointer;
}

.err span:hover, .err span:focus {
    box-shadow: 0 0 0 2px var(--text-color);
    outline: none !important;
    border-radius: 5px;
    border-color: transparent;
}

/* =================================
   2. ENCABEZADO Y TÍTULOS
   ================================= */
header                      { position: sticky; background-color: var(--color-grafico); height: 40px; line-height: 1.5; top: 0; z-index: 999; }
header span.title           { display: block; text-align: right; font-weight: 600; font-size: 1.2rem; color: var(--bg-color); height: auto; line-height: 1.5; margin: 0; padding: 5px; position: fixed; left: auto; right: 0; width: 100%; }

h1                          { position: relative; display: flex; flex-flow: row wrap; justify-content: space-between; font-size: 1.5rem; padding: 10px; margin: 0; }
h1 > .help                  { display: none; color: var(--text-color); line-height: 18px; height: 24px; width: 24px; font-size: 22px; padding: 0; margin: 0 8px; box-shadow: none !important; max-width: 24px; align-self: flex-end; margin-left: auto; text-align: center; position: relative; top: -2px; }
h1 > .help > i              { padding: 5px; pointer-events: none; font-size: 10px !important; }
h1 > .help > i:hover,
h1 > .help > i:focus        { background: var(--bg-color); color: var(--text-color);  }
header + h1 > button        { cursor: pointer; padding: 0; border: 0; margin: 0; outline: 0 none !important; box-shadow: none; background: transparent; width: 24px; height: 24px; line-height: 18px; }
header + h1 > button > i    { font-size: 20px; color: var(--text-color); min-width: 24px; line-height: 1.5 !important; pointer-events: none; margin-top: -2px; margin-left: 1px; }
header + h1 > button:hover,
header + h1 > button:focus  { background: var(--bg-color); color: var(--text-color); text-decoration: none !Important; border-color: var(--bg-color) !Important; box-shadow: 0 0 0 3px var(--bg-color), 0 0 0 4px var(--border-gray)!Important; border-radius: 3px !Important; }
header + h1 > button:first-child { margin-left: auto; }

@media screen and (max-width: 480px) {
    h1 > .help              { top: 1px; }
}

body > footer           { background-color: var(--color-dark); padding: 0; margin-top: auto; }
body > footer .copyright{ padding: 0; margin: 0; }
body > footer .ii       { top: 0; padding: 0 2px 0 2px; }

.modal .ii-exclamation-triangle { font-size: 64px; display: block; color: var(--color-boton-borrar); }

input
input::placeholder,
textarea::placeholder   { color: var(--text-color); background: var(--bg-color);}

.titulo                 { color: var(--text-color); font-size: 1.3rem; border-bottom: 2px solid #ddd; padding-bottom: 10px; margin: 0 0 20px; }
h3.titulo               { font-size: 1.15rem; color: var(--color-grafico); }
.subtitulo              { font-size: 0.9em; color: #666; margin-bottom: 15px; }
.subtitulo2             { font-size: 0.9em; color: var(--color2-text); margin-bottom: 15px; font-size: 1rem; border: 1px solid var(--color2-icon); padding: 5px; margin: 0 10px 15px; border-radius: 6px; }
.subtitulo2 strong.note { color: var(--text-color); }

/* =================================
   3. LAYOUT (Grid)
   ================================= */
.layout {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
}

.sidebar {
    flex: 1 1 33%; /* Ancho fijo para la barra lateral */
    flex-shrink: 0;
    margin-left: 10px;
}

.main-content {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
    gap: 20px;
    padding: 0 2px 0 10px;
    margin-right: 10px;
}

fieldset { border: 0 none; padding: 0; }

.full-width {
    grid-column: span 2; /* Para que un box ocupe todo el ancho */
}

/* =================================
   4. FORMULARIOS Y BOTONES
   ================================= */

.input-group                    { margin-bottom: 15px; display: flex; align-items: center; justify-content: flex-start; }
.input-group label              { display: block; font-weight: bold; margin-bottom: 5px; color: var(--color-texto); flex: 0 0 calc(100% - 100px); height: 1.6rem; line-height: 2rem; }
.input-group label > span       { float: right; padding: 0 5px 0 0; color: var(--color-grafico); margin-left: 5px; pointer-events: none; }
.input-group label > span > span{ color: var(--color-principal); }
.input-group input[type="number"],
.input-group select,
textarea                        { width: 100%; min-width: 100px; padding: 10px; border: 1px solid var(--border-gray); border-radius: 6px; box-sizing: border-box; font-size: 1em; }

table tbody td textarea{
    margin: 0 0 -5px 0;
}

@media screen and (max-width: 480px) {
    .input-group { display: block; }
}

/* Estilo para las tablas de entrada */
#datos_frecuencia_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

#datos_frecuencia_table th, #datos_frecuencia_table td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

#datos_frecuencia_table th {
    background-color: var(--color-grafico);
    color: var(--color-claro);
    font-weight: 700;
    font-size: 0.9em;
}

/* Inputs dentro de la tabla de entrada */
#datos_frecuencia_table input[type="number"] {
    width: 100%;
    border: 1px solid var(--border-gray);
    text-align: center;
    padding: 5px;
    margin: 0;
}

.btn-custom {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background-color: var(--color-secundario);
    color: var(--color-claro);
    outline: 0 none !important;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
}

.btn-custom:hover,
.btn-custom:focus {
    background-color: var(--color-texto); /* Tono más oscuro de verde secundario */
}

.btn-custom:active {
    transform: translateY(1px);
}

.btn-add-row {
    background-color: var(--color-boton-agregar);
    color: var(--text-color);
    border: 1px solid var(--border-gray);
    margin-top: 10px;
}

.btn-add-row:hover, .btn-secondary-custom:hover,
.btn-add-row:focus, .btn-secondary-custom:focus {
    background-color: var(--color-texto);
    color: var(--bg-color);
}

.btn-secondary-custom {
    /* Usa el color secundario: #4E7D36 (Dark Green) */
    background-color: var(--color-boton-secundario);
    color: var(--text-color);
	margin-bottom: 15px; 
}

/* Estilo para el botón de eliminar (pequeño y en rojo) */
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--color2-icon); /* Color principal para el ícono */
    padding: 0;
    line-height: 28px;
    width: 28px;
    height: 28px; 
}

.btn-delete-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--bg-color);
    padding: 0;
    line-height: 28px;
    width: 28px;
    height: 28px;
    filter: brightness(10);
}

.btn-delete:hover, 
.btn-delete:focus       { outline: 0 none; color: var(--color-boton-borrar); box-shadow: 0 0 0 2px var(--color-boton-borrar); border: 0 none; }
.btn-delete-all:hover, 
.btn-delete-all:focus   { outline: 0 none; color: var(--bg-color); border: 0 none; box-shadow: 0 0 0 3px var(--bg-color); }

/* =================================
   5. GRÁFICOS Y ESTADÍSTICAS

/* Área de estadísticas (PRE) */
#estadisticas {
    border-radius: 8px;
    /*font-family: monospace;*/
    /*white-space: pre-wrap;*/
    word-break: break-word;
}

/* =================================
   6. ESTILOS DE TABLA DE RESULTADOS
   ================================= */

/* Contenedor que permite el desplazamiento horizontal en móviles */
.table-container {
    overflow-x: auto; 
    margin: 15px 0;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px; /* Ajuste menor */
}

/* Estilo de celdas y encabezados (TH y TD) */
.styled-table th, .styled-table td {
    border: 1px solid #ddd; /* Borde gris suave */
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

/* Estilo de los encabezados (TH) */
.styled-table thead th {
    background-color: var(--color-grafico);
    color: var(--color-claro);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Rayado de filas para mejor legibilidad */
.styled-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.1); /* Un gris muy claro para las filas pares */
}

/* Estilo CRUCIAL para la fila de totales (Debe llamarse 'total-row') */
.styled-table .total-row td {
    font-weight: 900; /* Negrita más gruesa */
    background-color: #f0f0f0; /* Fondo gris para distinguirla */
    border-top: 2px double var(--text-color); /* Doble borde distintivo */
    font-size: 1.1em;
}
.table-container-input .styled-table { margin-top: 0; }

/* =================================
   7. ESTILOS DE PICTOGRAMA (Ojos)
   ================================= */
.pictogram-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.pictogram-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-gray);
}

.color-label {
    min-width: 100px; /* Para alinear etiquetas */
    font-weight: bold;
    text-align: left;
    margin-right: 15px;
    color: var(--color-texto);
}

.pictogram-icons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* Espacio entre los iconos */
}

.color-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

.color-icon:hover {
    transform: scale(1.15);
}

/* =================================
   8. ESTILOS DE DOT PLOT (Comidas)
   ================================= */
.dot-plot-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end; /* Alinear los puntos a la parte inferior (eje X) */
    padding-top: 20px;
    gap: 10px;
    overflow-x: auto; /* Permitir scroll horizontal si hay muchas comidas */
}

.dot-plot-container.has-border {
    border-bottom: 2px solid #333; /* Eje X */
}

.dot-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.dot-point {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--color-grafico); /* Verde oscuro */
    margin-bottom: 5px; /* Espacio entre puntos */
    transition: transform 0.1s;
}

.dot-point:hover {
    transform: scale(1.2);
}

.dot-label {
    margin-top: 10px;
    font-weight: bold;
    font-size: 0.85em;
    text-align: center;
    min-width: 50px;
}

/* =================================
   9. ESTILOS DE TABLA (DATA-INPUT-TABLE)
   ================================= */
.flex-container         { display: flex; justify-content: flex-start; }

.table-overflow { overflow-x: auto; }
.table-overflow + .results-container { margin-top: 1.5rem; }
.data-input-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.95em; }
.results-container + .regresion-tabla { flex: 1 1 50%; min-width: 300px; width: calc(100% - 10px); margin: 0 0 0 10px; }
.results-container + .regresion-tabla .data-input-table { width: calc(100% - 10px); margin: 0 0 0 10px; }

@media screen and (max-width: 767px) {
    .flex-container { display: block; }
    .results-container + .regresion-tabla { margin: 0; flex: none; width: 100%; }
    .results-container + .regresion-tabla .data-input-table { margin: 0; width: 100%; }
}

/* Estilo para las cabeceras (TH) */
.data-input-table thead th {
    background-color: var(--color-grafico);
    color: var(--color-claro);
    padding: 5px;
    border: 1px solid var(--color-grafico);
    text-align: center;
}

/* Estilo para las celdas de datos (TD) */
.data-input-table tbody td, 
.data-input-table tfoot td {
    padding: 8px;
    border: 1px solid #ddd; /* Borde gris claro */
    text-align: center;
}

/* Estilo de la fila de totales (TFOOT) */
.data-input-table tfoot tr {
    background-color: #f0f0f0; /* Fondo gris claro para totales */
    font-weight: bold;
    color: var(--color-texto);
}

/* Efecto de cebra para las filas */
.data-input-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; 
}

/* Efecto al pasar el ratón */
.data-input-table tbody tr:hover {
    background-color: #f0f8ff; /* Azul claro al pasar el ratón */
}

/* Estilo para los inputs dentro de la tabla (para tablas de entrada) */
.data-input-table input[type="number"] {
    width: 100%;
    padding: 6px;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    text-align: center; 
    transition: border-color 0.2s;
}

.data-input-table input[type="number"]:focus {
    border-color: var(--color-secundario); /* Borde de color secundario al enfocar */
    outline: none;
}


/* =================================
   10. RESPONSIVIDAD 
   ================================= */
@media (max-width: 1200px) {
    /* En pantallas medianas, todos los elementos se vuelven a 1 columna */
    .layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        flex: 1 1 100%; /* La barra lateral ocupa todo el ancho */
    }

    
}

/* Ajuste para móviles (pantallas muy pequeñas) */
@media (max-width: 500px) {
    header span.title {
        padding-right: 5px;
    }

    .sidebar {
        margin: 10px;
        padding: 10px;
    }

    .main-content {
        display: flex;
        flex-flow: column nowrap;
        margin: 10px;
        padding: 0;
        width: calc(100% - 20px);
    }
}

/* Estilo para la fila separadora en la tabla de frecuencias */
.separator-row {
    height: 10px; /* Un poco de altura extra */
    border-bottom: 2px solid var(--color-principal); /* Línea gruesa para separar visualmente */
    background-color: var(--color-claro); /* Fondo ligeramente diferente si es necesario */
}

/* Asegurar que las celdas de la fila separadora no tengan bordes normales de tabla */
.separator-row td {
    border: none !important;
    padding: 0 !important;
}

/* =================================
   11. CORRECCIÓN DE TAMAÑO DE INPUTS EN TABLAS
   ================================= */

/* Selector específico para los inputs de la tabla de notas */
#input_notas_table input[type="number"] {
    width: 100%;
    height: 28px; 
    font-size: 1em; 
    text-align: center;
    padding: 1px;
    border: 1px solid var(--border-gray);
    border-radius: 4px; 
}

/* Opcional: Asegura que el contenido de la celda esté centrado */
#input_notas_table td {
    text-align: center;
    vertical-align: middle;
}

/* =================================
   12. CONTENEDOR DE TABLA DE ENTRADA (TEMPERATURA)
   ================================= */

#input_data_table td    { padding: 5px; }
#input_data_table input { margin: 0; width: 100%; min-width: 100px; padding: 10px; border: 1px solid var(--border-gray); border-radius: 6px; box-sizing: border-box; font-size: 1em; text-align: left; }

/* Limita el tamaño de la tabla de entrada y añade scroll vertical */
.table-container-input {
    max-height: 400px; /* Altura máxima visible de la tabla */
    overflow-y: auto; /* Habilita la barra de desplazamiento vertical */
    /*border: 1px solid var(--border-gray);*/ /* Añade un borde sutil para enmarcar el área con scroll */
    border-radius: 0;
    margin-bottom: 15px; /* Espacio inferior para separación */
}

/* Asegura que la cabecera (<thead>) de la tabla sea visible incluso con scroll */
.table-container-input table thead th {
    position: sticky; /* Fija la cabecera al hacer scroll */
    top: 0; /* La cabecera se pega a la parte superior del contenedor con scroll */
    background-color: var(--color-grafico); /* Utiliza el color principal como fondo */
    color: var(--color-claro);
    z-index: 10;
}

/* =================================
   14. ESTILOS DE SELECTOR DE MAPA (TOGGLE BUTTONS)
   ================================= */

.map_type_selector_container {
    display: flex; /* Alinear los botones en una fila */
    gap: 10px; /* Espacio entre los botones */
    margin: 20px;
}

.map_type_selector_container input[type="radio"] {
    /* Ocultar el input de radio nativo */
    display: none;
}

.map_type_selector_container .radio-label {
    flex-grow: 1; /* Para que cada opción ocupe la mitad del espacio */
    text-align: center;
    padding: 10px;
    border: 2px solid var(--color-grafico);
    border-radius: 8px; /* Bordes redondeados */
    cursor: pointer;
    font-weight: bold;
    color: var(--color-grafico); /* Color de texto por defecto (el principal) */
    background-color: var(--color-claro); /* Fondo claro */
    transition: background-color 0.3s, color 0.3s, border 0.3s;
    user-select: none; /* Evita que el texto se marque */
}

/* Efecto hover */
.map_type_selector_container .radio-label:hover {
    background-color: #f0f0f0; /* Fondo más claro al pasar el ratón */
}

/* Estilo para el botón seleccionado (Usamos el selector de hermano adyacente +) */
.map_type_selector_container input[type="radio"]:checked + .radio-label {
    background-color: var(--color-grafico); /* Fondo del color principal */
    color: var(--color-claro); /* Texto blanco */
    border-color: var(--color-grafico);
    border: 1px solid rgba(0, 0, 0, 0.1); /* Sombra ligera para destacarlo */
}

/* =================================
   14. ESTILOS DE DOTPLOT (MASCOTAS)
   ================================= */

.dot-plot-container-MAS {
	padding: 20px;
}
.dot-plot-wrapper-MAS {
	display: flex;
	justify-content: center; /* Centrar las columnas en el espacio disponible */
	align-items: flex-end; /* Alinear las etiquetas en la parte inferior */
	min-height: 200px; /* Altura mínima para mostrar los puntos */
	border-bottom: 2px solid var(--color-texto);
}
.dot-column-MAS {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 10px;
}
.dot-stack-MAS {
	display: flex;
	flex-direction: column-reverse; /* Apilar los puntos de abajo hacia arriba */
	align-items: center;
	min-height: 100px; /* Asegura espacio para la pila */
}
.dot-MAS {
	width: 15px;
	height: 15px;
	background-color: var(--color-principal); /* Usar color principal */
	border-radius: 50%;
	margin: 2px 0;
	flex-shrink: 0; /* Evitar que los puntos se achiquen */
}
.dot-label-MAS {
	margin-top: 10px;
	font-weight: bold;
	font-size: 0.9em;
	text-align: center;
	min-width: 20px;
}

/* =================================
   15. ESTILOS DE TABLA RESULTADOS
   ================================= */

/* 1. Contenedor Principal (Para los títulos y tablas) */
.results-container {
    color: var(--color-texto);
    /* La sombra y el redondeado se aplican al contenedor si quieres agrupar visualmente */
    /*border-radius: 6px;*/
    /*border: 1px solid rgba(0, 0, 0, 0.1); */
    /*padding: 10px;*/
    background-color: #fff;
}

/* 2. Estilo de Títulos (Simulan los encabezados de sección) */
.results-container .titulo {
    background-color: var(--color-secundario); /* Azul para destacar el título */
    color: white;
    padding: 8px 10px;
    margin: 15px 0 0; /* Espacio superior para separar bloques */
    font-size: 1.1em;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

/* 3. Estilo de la Tabla */
.results-container .results-table {
    width: 100%;
    border-collapse: collapse; /* CLAVE: Elimina el espacio entre celdas/bordes */
    margin-bottom: 15px; /* Espacio debajo de la tabla */
    font-size: 0.9em;
}

/* 4. Encabezados de Tabla (Thead) */
.results-container .results-table thead tr {
    background-color: var(--color-grafico); 
    color: #fff;
    border-bottom: 2px solid #ddd;
}

.results-container .results-table th {    
    padding: 6px 10px; /* REDUCIDO: Poco padding */
    font-weight: 700;
}

/* Alinea la PRIMERA columna a la izquierda */
.results-container .results-table th:first-child {
    text-align: left;
}

/* Alinea la ÚLTIMA columna a la derecha */
.results-container .results-table th:last-child {
    text-align: right;
}

/* 5. Filas de Cuerpo (Tbody) - Compacidad y Líneas */
.results-container .results-table tbody tr {
    border-bottom: 1px solid #eee; /* Separador delgado entre filas */
    transition: background-color 0.2s ease;
}

/* Interacción: Resaltado de fila al pasar el ratón */
.results-container .results-table tbody tr:hover {
    background-color: #E9EFF3;
}

/* CLAVE: Espaciado de Celdas - Máxima Compacidad */
.results-container .results-table td {
    padding: 4px 10px; /* MÍNIMO: Muy poco padding vertical */
}

/* Estilo para la columna de valor (derecha) */
.results-container .results-table td:last-child {
    text-align: right;
    font-weight: 600;
}

/* Quitar la línea inferior si es la última fila y no hay necesidad de más separación */
.results-container .results-table:last-child tbody tr:last-child {
    border-bottom: none;
}

.results-container .results-table .section-header-row th,
.results-container .results-table .section-header-row td {
    /* Fondo con la variable de color principal (como el título original) */
    background-color: var(--color-grafico) !important; 
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    text-align: center; /* Centrar el texto del título */
    
    /* Eliminar el borde delgado y el padding vertical innecesario */
    border-bottom: none !important;
    padding: 10px; 
    
    /* Margen visual para separar la sección anterior */
    margin-top: 15px; /* Esto no funciona en <td>/<tr> pero ayuda visualmente */
}

/* Regla para simular el margen superior y el borde redondeado */
.results-container .results-table tbody tr.section-header-row:not(:first-child) th,
.results-container .results-table tbody tr.section-header-row:not(:first-child) td {
    /* Crea un espacio visible antes del nuevo título (simula el margin-top) */
    padding-top: 15px; 
}

/* Evitar el hover en las filas de título */
.results-container .results-table .section-header-row:hover {
    background-color: var(--color-secundario) !important;
}

/* Asegurar que las filas de datos debajo de un título no tengan un borde superior grueso */
.results-container .results-table .section-header-row + tr {
    border-top: none;
}


#grafico_mapa .plotly .user-select-none{ margin: 0 auto !important; }

/* =================================
   16. ESTILOS DE LOGO
   ================================= */
/*
 * 1. Estilos Base y Posicionamiento
 * --------------------------------
 * Posición Superior Derecha.
 */
.modern-corner-icon                 { position: fixed; top: 5px; left: 5px; width: auto; height: 28px; z-index: 1000; opacity: 1; transform: none; }
.modern-corner-icon-explica         { position: fixed; width: auto; height: 38px; top: -2px; right: 78px; left: auto; z-index: 1000; opacity: 1; transform: none; }

.js-plotly-plot .plotly .modebar                        { top: -10px; right: 15px; }
.js-plotly-plot .plotly .modebar-btn                    { overflow: visible; font-size: 20px; height: 24px; }
.js-plotly-plot .plotly .modebar-btn:hover              { box-shadow: 0 0 0 1px var(--text-color) !important; }
.js-plotly-plot .plotly .modebar-btn[data-title]::before,
.js-plotly-plot .plotly .modebar-btn[data-title]::after { background: var(--bg-color); color: var(--text-color); border: 1px solid var(--border-gray); top: 25px; right: 17px; }
.js-plotly-plot .plotly .modebar-btn svg path           { fill: var(--text-color) !important; }
.js-plotly-plot .plotly .modebar-btn:hover svg path,
.js-plotly-plot .plotly .modebar-btn:focus svg path     { fill: var(--color2-icon) !important; }
.js-plotly-plot .plotly .modebar-btn--logo              { display: none !important; }

.modal .modal-header                    { background: var(--color-modal-header) !important; border-color: rgba(0,0,0,0.2); }
.modal .modal-body button               { background: var(--color-secundario); border: 0 none; height: 32px; outline: none; padding: 4px 8px; font-size: 0.9rem; font-weight: 600; line-height: 1.5rem; }
.modal .modal-footer button:first-child { background: var(--color-secundario); }
.modal.mini .modal-header               { background: var(--color-claro) !important; border-bottom: 0 none; }
.modal.mini .modal-footer               { border: 0 none; background: var(--bg-color); }
.modal.mini .modal-body .success        { color: white; font-size: 72px; background: green; width: 100px; height: 100px; border-radius: 100px; line-height: 100px; margin: 0 auto 1.5rem; }
.modal.mini .modal-body .error          { color: white; font-size: 72px; background: var(--color-boton-borrar); width: 100px; height: 100px; border-radius: 100px; line-height: 100px; margin: 0 auto 1.5rem; }
.modal.mini footer button               { font-size: 1rem; box-shadow: none !important; background: var(--text-color); color: var(--bg-color); outline: none; border: 1px solid var(--text-color); border-radius: 8px; text-align: center; margin: 8px auto; position: relative; display: block; }
.modal .modal-body button:hover:not(.main-menu *):not([tabindex="-1"]),
.modal .modal-body button:focus:not(.main-menu *):not([tabindex="-1"]),
.modal footer button:hover:not(.main-menu *):not([tabindex="-1"]),
.modal footer button:focus:not(.main-menu *):not([tabindex="-1"]),
.modal .close:hover:not(.main-menu *):not([tabindex="-1"]),
.modal .close:focus:not(.main-menu *):not([tabindex="-1"]),
.modal-footer button:hover:not(.main-menu *):not([tabindex="-1"]), 
.modal-footer button:focus:not(.main-menu *):not([tabindex="-1"])              { background: var(--text-color); color: var(--bg-color); text-decoration: none !important; outline: 0 none; box-shadow: -1px 0px 0 2px var(--text-color); }
.modal .modal-body button:hover:not(.main-menu *):not([tabindex="-1"]) *,
.modal .modal-body button:focus:not(.main-menu *):not([tabindex="-1"]) *,
.modal footer button:hover:not(.main-menu *):not([tabindex="-1"]) *,
.modal footer button:focus:not(.main-menu *):not([tabindex="-1"]) *,
.modal .close:hover:not(.main-menu *):not([tabindex="-1"]) *,
.modal .close:focus:not(.main-menu *):not([tabindex="-1"]) *,
.modal-footer button:hover:not(.main-menu *):not([tabindex="-1"]) *, 
.modal-footer button:focus:not(.main-menu *):not([tabindex="-1"]) *            { color: var(--bg-color); text-decoration: none !important; }

/* =================================
   17. ESTILOS DE PIE PAGINA
   ================================= */

/*
 * 1. Estilo General del Pie de Página (.homePie)
 * ----------------------------------------------------
 */
.copyright {
    /* Dimensiones y Posicionamiento */
    width: 100%;
    margin: 10px;    
    /* Tipografía y Alineación */
    text-align: center;
    font-size: 0.85em; /* Tamaño de letra sutil */
    font-weight: 600; /* Lo hacemos más notorio */
    letter-spacing: 0.5px; /* Pequeña separación para un look limpio */
    transition: color 0.3s ease;
}


@media screen and (max-width: 480px) {
    #game-main-content      { margin: 10px -10px; width: calc(100% + 20px); }
    h1 + .box, 
    h1 + .layout .box       { border-radius: 0; }
    .true-false-game-content{ padding: 10px; }

    .sidebar                { margin: 0; padding: 10px; }
}