/* =========================================
   RESET BÁSICO
========================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #1a1a1a url("../images/bg_grid.png") repeat;
  color: #ddd;
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
}

/* =========================================
   CONTENEDOR GENERAL
========================================= */
center {
  display: block;
}

table {
  border-collapse: collapse;
}

.page,
table[width="600"] {
  width: 600px;
  margin: 0 auto;
  background: #333;
}

/* =========================================
   HEADER
========================================= */
#headerbox {
  background: #111;
  padding: 6px 12px;
  text-align: left;
}

.cyberfractal {
  font-family: "Papyrus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 38px;
  color: #e6d08a;
  margin: 0;
  padding-left: 8px;
}

.cyberfractal .texto em {
  font-style: normal;
}

/* =========================================
   MENÚ SUPERIOR
========================================= */
table a {
  color: #ff9900;
  text-decoration: none;
  font-weight: bold;
}

table a:hover {
  text-decoration: underline;
}

/* =========================================
   MENÚ FRACTAL (NAV)
========================================= */
#header {
  margin: 10px auto;
}

.nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav > li {
  display: inline-block;
  position: relative;
  background: #222;
}

.nav > li > a {
  display: block;
  padding: 6px 10px;
  color: #ff9900;
}

.nav li ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #111;
  padding: 0;
  z-index: 1000;
}

.nav li:hover ul {
  display: block;
}

.nav li ul li {
  width: 220px;
}

.nav li ul li a {
  display: block;
  padding: 6px 8px;
  color: #ccc;
}

/* =========================================
   CONTENIDO
========================================= */
h2 {
  font-family: Papyrus, fantasy;
  color: #bfa23a;
}

p {
  text-align: justify;
  line-height: 1.45;
}

.resaltar-rojo {
  color: #ff6666;
}

.derecha {
  float: right;
}

/* =========================================
   IMÁGENES
========================================= */
img {
  max-width: 100%;
  height: auto;
  border: 0;
}

.menu-table {
  margin: 10px auto;
}

figure {
  margin: 20px auto;
  text-align: center;
}

/* =========================================
   BOTÓN FLOTANTE
========================================= */

.btn-flotante {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;

  width: 60px;
  height: 60px;

  background: rgba(255,255,255,0.7);
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-flotante img {
  width: 40px;
  height: 40px;
}


/* =========================================
   TÍTULOS SOLO IMPRESIÓN
========================================= */
.print-only-title {
  display: none;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

.print-only-title::before {
  content: attr(data-title);
}

/* =========================================
   IMPRESIÓN
========================================= */
@media print {

  body {
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* ocultar navegación y botones */
  .nav,
  .btn-flotante,
  img[alt="Volver"],
  img[alt="Imprimir"],
  img[title="Imprimir"],
  nav,
  footer img {
    display: none !important;
  }

  /* mostrar títulos de impresión */
  .print-only-title {
    display: block;
  }

  /* evitar páginas en blanco */
  table, tr, td {
    page-break-inside: avoid;
  }

  body, table {
    width: 100% !important;
  }
}

/* MENÚS — volver a fuente clásica */
nav,
nav a,
.menu,
.menu a,
#menu,
#menu a {
  font-family: "Times New Roman", Georgia, serif !important;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.3px;
}
/* ================================
   FUENTE CLÁSICA PARA TODOS LOS MENÚS
   ================================ */

/* menú superior por tablas */
table a {
  font-family: "Times New Roman", Georgia, serif !important;
  font-weight: normal !important;
  font-size: 14px;
}

/* menú fractal desplegable */
.nav > li > a,
.nav li ul li a {
  font-family: "Times New Roman", Georgia, serif !important;
  font-weight: normal !important;
  font-size: 14px;
  letter-spacing: 0.3px;
}
/* =========================================
   MENÚS — FUENTE ARIAL (FORZADO)
========================================= */

/* menú superior horizontal */
table a {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: normal !important;
}

/* menú desplegable fractal */
#header,
#header ul,
#header li,
#header a {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: normal !important;
  letter-spacing: 0.2px !important;
}

.site-footer {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #eee;           /* texto claro para fondo oscuro */
  margin: 10px 0 5px;
}

.site-footer img {
  display: block;
  margin: 0 auto 6px;
}

.site-footer a {
  color: #fff;           /* links visibles */
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
