/* 
============================
HEADER STICKY (FIXED) - Conserva ancho y alto
============================
*/
.header-negro {
  position: fixed;              /* Fijo en la parte superior */
  top: 0;
  left: 0;
  width: 100vw;                 /* 100% del viewport (evita estrecharse) */
  margin: 0;
  padding: 15px 0;
  background-color: #000;
  color: white;
  text-align: center;
  font-family: Arial, sans-serif;
  z-index: 1000;
  box-sizing: border-box;
  height: 80px;                 /* Altura fija (ajusta según necesites) */
}

/* 
============================
Ajuste del margen superior del body
============================
*/
body {
  margin-top: 80px;             /* Igual a la altura del header + su padding */
  margin-left: 150px;
  margin-bottom: 90px;
  margin-right: 150px;
  font-family: Arial, sans-serif;
  background-color: white;
}
.logo {
  width: 100%;
  max-width: 200px;
  display: block;
  margin-left: 20px; 
  border-radius: 8px;
  transition: all 0.3s ease;
}

.logo-T {
  width: 100%;
  max-width: 200px;
  display: block;
  margin-right: 10px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  transition: all 0.3s ease;
  background-color: #fff; /* Fondo blanco */
  padding: 7px; /* Espaciado interno */
}

/* Fondo blanco para .logo-T en modo oscuro */
body.dark-mode .logo-T {
  background-color: white !important;
}

@media only screen and (max-width: 767px) {
  .logo {
    margin-left: 10px !important;
    max-width: 200px !important;
  }
}

/*
============================
Boton modo oscuro
============================
*/


.boton-modo-oscuro {
  position: fixed;
  top: 90px;
  left: 10px;
  z-index: 2000;
  padding: 6px 5px;
  font-size: 16px;
  cursor: pointer;
}

/* 
============================
Botón Modo Oscuro (Móvil) - Parte inferior izquierda
============================
*/
@media only screen and (max-width: 767px) {
  .boton-modo-oscuro {
    top: auto;                  /* Anula la posición superior */
    bottom: 60px;               /* Lo coloca cerca del borde inferior */
    left: 20px;                 /* Lo coloca cerca del borde izquierdo */
    right: auto;                /* Evita conflictos con right */
    padding: 10px 15px;         /* Más grande para móviles */
    font-size: 18px;            /* Texto más legible */
    background-color: #e5e5e5;  /* Color distintivo */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Sombra para mejor visibilidad */
  }
}


/*
============================
TABLA ESTILOS
============================
*/
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 5px;
  overflow: hidden;
  border: 4px solid #2196f3;
  background-color: white;
  transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
  box-shadow: 0 0 5px #2196f3;
}

table:hover {
  transform: scale(1.005);
  border-color: black;
  background-color: #f8f8f8;
  box-shadow: 0 0 8px black;
}

table:hover td,
table:hover th {
  border-color: black;
}

th {
  background-color: #006da3;
  color: white;
  padding: 10px;
  text-align: left;
  border: 1px solid #2196f3;
  transition: border-color 0.3s ease-in-out;
}

td {
  padding: 10px;
  border: 1px solid #2196f3;
  transition: border-color 0.3s ease-in-out;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

table:hover td,
table:hover th,
table:hover {
  border-color: black !important;
}

tr:hover {
  background-color: #e0e0e0;
  transition: background-color 0.3s ease-in-out;
}

/*
============================
BOTONES FLOTANTES
============================
*/
.zoom-buttons {
  position: fixed;
  top: 80px; /* Quedan debajo del header */
  right: 10px;
  z-index: 999;
}

.zoom-buttons button {
  margin: 2px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
}

/*
============================
MODO OSCURO
============================
*/
body.dark-mode {
  background-color: #000000;
}

body.dark-mode h1 {
  color: #ffffff;
}







/* ============================
   Estilos originales del botón y contenedor 
   (copiados tal cual del HTML proporcionado)
============================ */
.custom-button {
  display: inline-block;
  border-radius: 8px;
  background-color: #000;
  color: #fff !important;
  font-size: 20px;
  padding: 5px 10px;
  text-decoration: none;
  margin: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer, auto;
  border: 1px solid transparent;
}

.custom-button:link {
  color: #fff !important;
}

.custom-button:visited {
  color: #fff !important;
}

.custom-button:hover {
  background: #cc0028;
  border-color: white;
}

.custom-button:active {
  background-color: #cc0028;
  color: black;
  box-shadow: none;
  transform: translateY(2px);
  border-color: white;
}

.custom-button:active {
  color: #fff !important;
}

.title-shadow {
  color: black;
  text-shadow: 2px 2px 4px white, -2px -2px 4px white, 2px -2px 4px white, -2px 2px 4px white;
  font-size: 26px;
}

.custom-container {
  margin-top: 30px;
  margin-bottom: 0px;
  background: #00aaff;
  border-top: 2px;
  border-bottom: 2px;
  border-style: solid;
  border-color: #565f62;
  padding: 5px 5px 10px 5px;
  border-radius: 4px;
  text-align: center;
}






















/*
============================
FOOTER DEL SITIO
============================
*/
.footer-site {
  position: fixed;        /* Fijo abajo */
  bottom: 0;
  left: 0;
  width: 100%;            /* Todo el ancho */
  background-color: #000;
  color: white;
  padding: 15px 20px;
  font-size: 1.1rem;
  text-align: center;
  box-sizing: border-box;
  z-index: 1000;          /* Por encima de otros elementos */
}


/*
============================
ENLACE PIE DE PÁGINA
============================
*/
.enlace-blanco {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.enlace-blanco:hover {
  color: #b3d9ff; /* Azul claro */
  text-decoration: underline;
  cursor: url('/imagenes/iconos/Gavel-toogle-button-red-scroll-2.png'), auto;
}

/*
============================
MARCA REGISTRO
============================
*/
.marca-reg {
  font-size: 0.8em;
  color: #000;
  background-color: #c1e7f7;
  border-radius: 50%;
  padding: 1px 3px;
  margin-left: 2px;
}


#scrollTopBtn {
  position: fixed;
  bottom: 100px;   /* Altura correcta para que no tape footer */
  right: 16px;
  width: 54px;
  height: 54px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
}

#scrollTopBtn:hover {
  background-color: #005a89;
}

body.dark-mode div[style*="text-align: justify"] {
  color: white;
}

/* 
============================
AJUSTES RESPONSIVE BODY Y CONTENIDO
============================
*/
@media only screen and (max-width: 767px) {
  body {
    margin: 90px 10px 90px 10px;  /* Reduce márgenes laterales en móvil */
    font-size: 1rem;              /* Tamaño de texto más legible */
  }

  table {
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;               /* Permite scroll horizontal si es necesario */
  }

  th, td {
    padding: 8px;
  }

  .custom-container {
    padding: 10px;
    margin-top: 20px;
  }

  .custom-button {
    font-size: 1rem;
    padding: 6px 12px;
    display: inline-block;
  }

  .zoom-buttons {
    top: auto;
    bottom: 130px;
    right: 10px;
  }

  #scrollTopBtn {
    bottom: 80px;   /* Ajusta para no tapar botones en móvil */
    right: 10px;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .title-shadow {
    font-size: 1.4rem;
  }
}

@media only screen and (max-width: 767px) {
  .header-negro {
    left: 0;
    right: 0;
    width: auto;
  }
}

/* 
============================
oculta botonera ZOOM
============================
*/

@media only screen and (max-width: 767px) {
  /* Oculta botones de zoom */
  .zoom-buttons {
    display: none !important;
  }

  /* Si tienes botones de captura PNG, asumiendo una clase .capture-png */
  .capture-png {
    display: none !important;
  }

  /* Si tienes botón de generación de PDF, asumiendo una clase .generate-pdf */
  .generate-pdf {
    display: none !important;
  }
}
