/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #222;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: #FF6B00;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #222;
}

.logo span {
  font-size: 0.6em;
  margin-left: 4px;
  color: #222;
}

header .logo .logo-v16 {
  font-size: 1.4em;
  color: #FF6B00;
  font-weight: bold;
}

header .logo .logo-info {
  font-size: 1.2em;
  color: #222;
  font-weight: normal;
}

header .logo .logo-ext {
  font-size: 1em;
  color: #888;
  margin-left: 5px;
  vertical-align: baseline;
}

/* Menu navegación */
nav ul.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul.menu li a {
  padding: 8px 0;
  display: block;
  font-weight: 600;
  position: relative;
  transition: color 0.3s;
}

nav ul.menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: #FFA800;
  transition: width 0.3s;
}

nav ul.menu li a:hover {
  color: #FFA800;
}

nav ul.menu li a:hover::after {
  width: 100%;
}

/* Menu hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: #FFA800;
  margin: 4px 0;
  transition: 0.3s;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu-toggle span {
  transition: transform 0.3s, opacity 0.3s;
}

/* Hero */
.hero {
  width: 100%;
  background-color: #FFD78A;
  padding: 30px 30px;
  text-align: center;
}

.hero .hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  text-align: left;
}

.hero-left { flex: 1; }
.hero-right { flex: 1; display: flex; justify-content: center; }

.hero-right img {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.hero h1 {
  font-size: 2.8em;
  color: #222;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.4em;
  color: #333;
  margin-bottom: 30px;
}

/* Botones CTA */
.cta-button,
.cta-button2 {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.cta-button {
  background-color: #FF6B00;
  color: #fff;
  font-weight: bold;
  font-size: 1.3rem;
}

.cta-button:hover,
.cta-button2:hover {
  background-color: #E69500;
  color: #fff;
}

.cta-button2 {
  font-size: 1.2rem;
  color: #333;
  border: 2px solid #666;
  margin-left: 30px;
}

/* Hero benefits */
.baliza-card p { margin-bottom: 20px; }

.hero-benefits {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 30px;
}

.hero-benefits div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-benefits p {
  margin: 0;
  font-weight: bold;
  color: #222;
}

.hero-benefits ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.hero-benefits li {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

/* Contenido */
main { padding: 40px 0; }
section { margin-bottom: 50px; }

h2, h3, h4 { color: #222; margin-bottom: 15px; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }
ul { margin: 15px 0 15px 20px; }

/* Tarjetas */
.baliza-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.baliza-card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex: 1 1 300px;            /* ancho flexible mínimo */
  max-width: 350px;           /* límite máximo */
  margin: 0 auto;             /* 👉 asegura que se centren si quedan solas */
  min-width: 250px;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.baliza-card img { max-width: 100%; height: auto; border-radius: 5px; }
.baliza-card h4 { font-size: 1.5rem; margin-top: 10px; }

.baliza-card:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  transform: scale(1.02);
}

/* Footer */
footer {
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 20px 0;
  text-align: center;
}

.footer-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.footer-menu li a { color: #222; font-weight: 600; }

.footer-disclaimer {
  font-size: 0.85em;
  color: #666;
  max-width: 900px;
  margin: 10px auto 20px;
  line-height: 1.4;
  text-align: center;
}

/* Hover global */
main a, footer a { position: relative; }

main a::after, footer a::after, nav ul.menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #FFA800;
  transition: width 0.3s;
}

main a::after, footer a::after { bottom: -2px; }

/* Breadcrumb */
.breadcrumb-wrapper {
  background: #f5f5f5;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
}

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.breadcrumb li { color: #555; }
.breadcrumb a { color: #FFA800; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb li::after { content: "›"; margin: 0 5px; color: #999; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb li.active { font-weight: bold; color: #222; }

/* Baliza hero visual */
.baliza-wrapper { display: flex; justify-content: center; align-items: center; width: 100%; }
.baliza-light { position: relative; display: block; overflow: visible; }

.baliza-light img {
  display: block;
  z-index: 2;
  width: auto;
  height: auto;
  max-width: 350px;
  max-height: 350px;
}

/* Halos */
.baliza-light::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 220px; height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,107,0,0.9) 0%, rgba(255,107,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: v16-flicker 4s infinite;
  filter: blur(10px);
}

.baliza-light::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 400px; height: 400px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,107,0,0.3) 0%, rgba(255,107,0,0) 80%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: v16-diffuse 6s infinite;
  filter: blur(20px);
}

/* Animaciones */
@keyframes v16-flicker {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  10% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
  25% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.6; }
  40% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.5; }
  70% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
  85% { transform: translate(-50%, -50%) scale(1.02); opacity: 0.6; }
}

@keyframes v16-diffuse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  20% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.35; }
  40% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.25; }
  60% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.3; }
  80% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.2; }
}

/* Flicker effect en enlaces (sutil) */
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow:
      0 0 2px #fff,
      0 0 60px #fff,
      0 0 10px #fff,
      0 0 20px #FFA800,
      0 0 30px #FFA800;
  }
  20%, 24%, 55% { text-shadow: none; }
}

a:hover { color: #FFA800; animation: flicker 2s infinite; }

/* Contenedor de cards horizontales */
.cards-v16info-horizontal {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.cards-v16info-horizontal-full {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 2rem auto;
}

/* Card horizontal */
.card-h {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.6rem 2rem;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  border: 1px solid #f1f1f1;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card-h:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }

.card-h-content { flex: 1; }

.card-h h3 { font-size: 1.3rem; margin-bottom: .7rem; color: #1e293b; font-weight: 700; }
.card-h p { font-size: 1rem; line-height: 1.55; color: #475569; margin-bottom: 1rem; }

.card-h-link { text-decoration: none; font-weight: 600; color: #FF6B00; }
.card-h-link:hover { opacity: .8; }

.card-h.destacado { border-left: 6px solid #FF6B00; background: #FFF8F0; }

.cta-h { background: #f6f8ff; border-left: 4px solid #FF6B00; }
.btn-h-cta {
  display: inline-block;
  padding: .75rem 1.3rem;
  background: #FF6B00;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease;
}
.btn-h-cta:hover { background: #FFA800; color:#FFF; }

/* Sección Balizas V16: tabla en card */
#balizas-v16 { margin: 20px 0; }

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin: 20px 0;
  background: #fff;
  overflow: hidden;
  max-width: 100%;
}

.card-header {
  text-align: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.card-header h2 { font-size: 1.6rem; }
.fecha_actualizacion { color: #555; }

/* Buscador */
#buscador {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Contenedor tabla */
.card-body { padding: 16px; }

/* Tabla (escritorio) */
#tabla-balizas { width: 100%; border-collapse: collapse; }
#tabla-balizas th, #tabla-balizas td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
  font-size: 14px;
}
#tabla-balizas tr:nth-child(even) { background: #f7f7f7; }

.no-results {
  font-style: italic;
  color: #cc3300; /* rojo/naranja para destacar */
  margin: 1rem 0;
  font-size: 1.6rem;
}


/* Contenedor principal */
#faq-v16 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Grid de dos columnas */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Estilo de cada card */
.faq-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Títulos de las preguntas */
.faq-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: #333;
}

/* Texto de las respuestas */
.faq-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}


#balizas-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* 👉 centra horizontalmente */
  gap: 1rem;                 /* espacio entre cards */
}
/* Responsive: en pantallas pequeñas se verá en una sola columna */
@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #faq-v16{padding: 0}
  .faq-card {
    max-width: 100%;
    border-radius: 0; /* opcional: quitar bordes redondeados para estilo full-width */
  }
}
@media (max-width: 768px) {
  .baliza-card {
    flex: 1 1 95%;   /* 👉 casi todo el ancho */
    max-width: 95%;
  }
}


/* Responsive */
@media (max-width: 900px) {
nav ul.menu {
    display: none;
    flex-direction: column;
    background: #fff;
    position: fixed;   /* ocupa toda la pantalla */
    top: 0;
    left: 0;
    width: 100%;       /* ancho completo */
    height: 100%;      /* alto completo */
    padding: 40px 20px;
    gap: 20px;
    z-index: 9999;     /* por encima de todo */
    overflow-y: auto;  /* scroll si hay muchos enlaces */
  }

  nav ul.menu.show {
    display: flex;
  }

  nav ul.menu li a {
    font-size: 1.4rem;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 10000; /* que quede por encima del menú */
  }

  .hero .hero-content { flex-direction: column; text-align: center; }
  .hero-left { text-align: center; }
  .hero-right img { max-width: 260px; }
  .hero h1 { font-size: 1.5em; }
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;              /* oculto por defecto */
  background-color:#FFD78A;   /* fondo naranja */
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 9999;              /* asegura que esté por encima de todo */
  transition: opacity 0.3s ease;
  padding: 0;
}

#back-to-top svg {
  fill: #fff;                 /* color de la flecha */
  width: 24px;
  height: 24px;
  margin-top: 12px;           /* centra verticalmente */
}

#back-to-top:hover {
  opacity: 0.8;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 768px) {
  #back-to-top {
    bottom: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
  }
  #back-to-top svg {
    width: 20px;
    height: 20px;
    margin-top: 11px;
  }
}



@media (max-width: 680px) {
  .card-h { flex-direction: column; text-align: left; padding: 1.4rem; }
  #tabla-balizas th, #tabla-balizas td { font-size: 12px; padding: 6px; }
  .card-header h2 { font-size: 1.3rem; }
  .fecha_actualizacion { font-size: 0.95rem; }
  
.cta-button2 {
  font-size: 1.2rem;
  color: #333;
  border: 2px solid #666;
  margin-top:30px;
  margin-left:0;
}
}

/* Transformar tabla en cards en móvil */
@media (max-width: 600px) {
  #tabla-balizas thead { display: none; }
  #tabla-balizas { border: 0; }
  #tabla-balizas tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  #tabla-balizas tbody td {
    display: block;
    text-align: left;
    border: none;
    padding: 8px 10px;
    font-size: 14px;
  }
  #tabla-balizas tbody td:last-child { border-bottom: 0; }
  #tabla-balizas tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: #555;
  }
}

@media (max-width: 600px) {
  #tabla-balizas thead { display: none; }
  #tabla-balizas { border: 0; }

  #tabla-balizas tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }

  #tabla-balizas tbody td {
    display: flex;              /* alineamos label + valor */
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 8px 0;
    font-size: 14px;
  }

  #tabla-balizas tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
    flex: 1;                    /* ocupa espacio a la izquierda */
    margin-right: 10px;
  }

  #tabla-balizas tbody td a {
    word-break: break-word;     /* evita que enlaces largos rompan diseño */
  }
}


/* Últimos ajustes visuales */
#balizas-v16 td { text-align: center; }

/* Fin */
