/* =========================================
   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;
}

/* ======================================================
   BOTON FLOTANTE
====================================================== */

.btn-flotante{

position:fixed;

bottom:40px;

/* alineado al layout de 600px */
left:calc(50% + 300px - 60px);

width:55px;
height:55px;

background:rgba(255,255,255,0.35);

border-radius:50%;

display:flex;
align-items:center;
justify-content:center;

opacity:0;
transform:translateY(20px);

transition:all .4s ease;

z-index:999;

box-shadow:
0 0 6px rgba(120,170,255,.4),
0 0 12px rgba(170,120,255,.3);

}

.btn-flotante.visible{

opacity:.8;
transform:translateY(0);

}

.btn-flotante img{

width:34px;
opacity:.7;

}

.btn-flotante:hover{

transform:scale(1.1);

filter:hue-rotate(15deg);

background:rgba(255,255,255,.6);

box-shadow:
0 0 14px rgba(120,170,255,.9),
0 0 24px rgba(170,120,255,.7);

}


/* ======================================================
   ONDA FRACTAL INFERIOR
====================================================== */

#onda-fractal{

position:fixed;
bottom:0;

left:calc(50% - 300px);

width:600px;
height:4px;

transform-origin:center;

will-change:transform, opacity;

pointer-events:none;

opacity:0;

}

#onda-fractal::before{

content:"";

position:absolute;

left:0;
top:-1px;

width:80px;
height:6px;

opacity:0;

background:linear-gradient(
90deg,
rgba(120,170,255,0),
rgba(120,170,255,1),
rgba(200,140,255,1),
rgba(120,170,255,0)
);

filter:blur(1px);

}


#onda-fractal.activa{

animation:onda-neuronal 1.6s ease-out;

}

@keyframes onda-neuronal{

0%{
opacity:0;
transform:scaleX(.3);
}

40%{
opacity:1;
}

100%{
opacity:0;
transform:scaleX(1.3);
}

}


#onda-fractal.activa::before{

animation:pulso-fractal 1.8s linear;

}

@keyframes pulso-fractal{

0%{
left:-80px;
opacity:0;
}

10%{
opacity:1;
}

90%{
opacity:1;
}

100%{
left:600px;
opacity:0;
}

}
