/* ==========================================================================
   AleLeo Tours – accesibilidad.css
   Botón flotante de accesibilidad y panel de ajustes.
   Paleta "Océano & Atardecer": navy #0C2A4D, azul #1994D7, teal #0EA5A0,
   coral #FF5A3C y ámbar #F5A524. Colores de texto verificados a ≥ 4.5:1.
   El botón se coloca a la izquierda para no tapar el chatbot.
   ========================================================================== */

/* ─── BOTÓN FLOTANTE ─── */
.a11y-toggle-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  /* Mismo degradado azul del chatbot, con navy para subir el contraste */
  background: linear-gradient(135deg, #0C2A4D 0%, #0F5C96 100%);
  color: #ffffff;              /* 14.44:1 y 7.02:1 sobre el degradado */
  border: 2px solid #ffffff;
  box-shadow: 0 10px 26px rgba(7, 27, 51, .38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;             /* icono: 3:1 mínimo exigido, cumplido */
  z-index: 9998;
  transition: transform .28s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow .28s;
}
.a11y-toggle-btn i {
  color: #ffffff;
}
.a11y-toggle-btn:hover {
  transform: scale(1.07) translateY(-3px);
  box-shadow: 0 14px 32px rgba(7, 27, 51, .55);
}
.a11y-toggle-btn.activo {
  /* Teal oscurecido: blanco sobre #0B6E6A = 6.08:1 */
  background: linear-gradient(135deg, #0B6E6A 0%, #0C2A4D 100%);
}
/* ─── PANEL ─── */
.a11y-panel {
  position: fixed;
  bottom: 98px;
  left: 24px;
  width: 352px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 22px 54px rgba(7, 27, 51, .24);
  border: 1px solid rgba(25, 148, 215, .2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.96);
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-base, 'Outfit', system-ui, sans-serif);
}
.a11y-panel.abierto {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.a11y-header {
  background: linear-gradient(140deg, #071B33 0%, #0C2A4D 60%, #10416E 100%);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.a11y-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
.a11y-header p {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: .8rem;
  opacity: .95;                /* texto pequeño legible sobre navy */
}
.a11y-close-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
}
.a11y-close-btn:hover {
  background: rgba(255, 255, 255, .24);
}

.a11y-body {
  padding: 14px 18px 18px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}
.a11y-grupo {
  margin-bottom: 15px;
}
.a11y-grupo:last-child {
  margin-bottom: 0;
}
.a11y-grupo h3 {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0C2A4D;              /* 14.44:1 sobre blanco */
}
.a11y-tamano {
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-tamano button {
  flex: 1;
  min-height: 38px;
  border: 1.5px solid #1994D7;
  border-radius: 10px;
  background: #ffffff;
  color: #0C2A4D;
  font-weight: 700;
  cursor: pointer;
}
.a11y-tamano button:hover {
  background: #EAF6FD;         /* 13.14:1 con el texto navy */
}
.a11y-tamano button:first-child {
  font-size: 1rem;
}
.a11y-tamano button:last-child {
  font-size: 1.35rem;
}
.a11y-nivel {
  min-width: 52px;
  text-align: center;
  font-weight: 800;
  font-size: .9rem;
  color: #0B6E6A;              /* 6.08:1, antes 3.04:1 */
}

.a11y-opcion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #EAEAE9;
}
.a11y-opcion span {
  font-size: .88rem;
  color: #2A2A2A;              /* 14.6:1 aproximado sobre blanco */
}
.a11y-switch {
  flex: 0 0 auto;
  min-width: 64px;
  height: 32px;
  border-radius: 18px;
  border: 2px solid #52606D;
  background: #EEF2F5;
  color: #0C2A4D;              /* 14.44:1 sobre el fondo gris claro */
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.a11y-switch[aria-pressed="true"] {
  background: #0B6E6A;         /* blanco sobre teal oscuro = 6.08:1 */
  border-color: #0B6E6A;
  color: #ffffff;
}

.a11y-accion {
  width: 100%;
  min-height: 38px;
  margin-top: 9px;
  border: 1.5px solid #0C2A4D;
  border-radius: 10px;
  background: #ffffff;
  color: #0C2A4D;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.a11y-accion:hover {
  background: #EAF6FD;
}
.a11y-accion.secundaria {
  border-color: #52606D;
  color: #52606D;              /* 6.46:1 sobre blanco */
}

.a11y-panel :focus-visible {
  outline: 3px solid #0B6E6A;
  outline-offset: 2px;
}
.a11y-pista {
  margin: 10px 0 0;
  font-size: .74rem;
  color: #52606D;              /* 6.46:1 */
  line-height: 1.4;
}

/* ─── AJUSTES APLICADOS A LA PÁGINA ─── */

/* Alto contraste sin filter: no rompe la posición fija de los widgets */
html.a11y-contraste body,
html.a11y-contraste .card,
html.a11y-contraste .destino-card,
html.a11y-contraste .franja,
html.a11y-contraste .modal-content {
  background-color: #ffffff !important;
  color: #000000 !important;
}
html.a11y-contraste p,
html.a11y-contraste span,
html.a11y-contraste h1,
html.a11y-contraste h2,
html.a11y-contraste h3,
html.a11y-contraste h4,
html.a11y-contraste h5,
html.a11y-contraste h6,
html.a11y-contraste li,
html.a11y-contraste td,
html.a11y-contraste th,
html.a11y-contraste label {
  color: #000000 !important;
}
html.a11y-contraste a {
  color: #003B8E !important;
  text-decoration: underline !important;
}
html.a11y-contraste button,
html.a11y-contraste .btn {
  border: 2px solid #000000 !important;
}
/* La cabecera del panel va sobre navy: se exceptúa del texto negro forzado */
html.a11y-contraste .a11y-header,
html.a11y-contraste .a11y-header h2,
html.a11y-contraste .a11y-header p,
html.a11y-contraste .a11y-close-btn {
  color: #ffffff !important;
}
html.a11y-contraste .a11y-close-btn {
  border-color: #ffffff !important;
}

/* Enlaces resaltados y enlaces subrayados son ajustes independientes */
html.a11y-enlaces a {
  background: #FFF2A8 !important;
  color: #000000 !important;   /* 12.74:1 sobre el amarillo */
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px solid #F5A524 !important;
  outline-offset: 2px;
}
html.a11y-subrayar a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

/* Más espacio entre líneas, palabras y párrafos */
html.a11y-espaciado p,
html.a11y-espaciado li,
html.a11y-espaciado td,
html.a11y-espaciado th,
html.a11y-espaciado blockquote {
  line-height: 1.9 !important;
  letter-spacing: .03em !important;
  word-spacing: .12em !important;
  margin-bottom: 1em !important;
}

/* Escala de grises (se aplica al raíz para no desanclar los fijos) */
html.a11y-grises {
  filter: grayscale(100%);
}

/* Cursor grande: flecha navy con borde blanco */
html.a11y-cursor-grande * {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%3E%3Cpath%20d='M4%202L4%2028L11%2021L16%2033L21%2031L16%2019L26%2019Z'%20fill='%230C2A4D'%20stroke='%23ffffff'%20stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Ocultar imágenes decorativas */
html.a11y-sin-imagenes img {
  display: none !important;
}

/* Modo lectura: columna cómoda de lectura */
html.a11y-lectura main {
  max-width: 70ch !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html.a11y-lectura main p {
  line-height: 1.8 !important;
}

/* Sin animaciones ni transiciones */
html.a11y-sin-movimiento,
html.a11y-sin-movimiento *,
html.a11y-sin-movimiento *::before,
html.a11y-sin-movimiento *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Foco del destino del enlace "Ir al contenido" */
#contenido-principal:focus {
  outline: 3px solid #0B6E6A;
  outline-offset: 4px;
}

@media (max-width: 576px) {
  .a11y-toggle-btn {
    left: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
  .a11y-panel {
    left: 16px;
    bottom: 84px;
    width: calc(100vw - 32px);
  }
}
