/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CONFIGURACIÓN GENERAL */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: #222;
}

html, body {
  overflow-x: hidden;
}

/* CONTENEDOR GLOBAL */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ENLACES GENERALES */
a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

/* ACCESIBILIDAD */
.accessibility-toggle {
  position: fixed;
  left: 24px;
  bottom: 112px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 0;
  background: #5b67c8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  z-index: 1300;
  transition: transform 0.25s ease, background 0.25s ease;
}

.accessibility-toggle:hover {
  background: #4f5bc0;
  transform: translateY(-2px);
}

.accessibility-toggle__svg {
  width: 24px;
  height: 24px;
  display: block;
}

.accessibility-panel {
  position: fixed;
  left: 96px;
  bottom: 112px;
  width: 340px;
  max-width: calc(100vw - 120px);
  background: #ffffff;
  border: 2px solid #5b67c8;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  padding: 18px;
  z-index: 1401;
}

.accessibility-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.accessibility-panel__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 800;
  color: #000000;
}

.accessibility-modal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.accessibility-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.accessibility-panel__close {
  border: none;
  background: transparent;
  color: #111111;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.accessibility-panel__actions {
  display: grid;
  gap: 10px;
}

.accessibility-action {
  width: 100%;
  min-height: 54px;
  border: 2px solid #d7d7d7;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.accessibility-action:hover {
  transform: translateY(-1px);
  border-color: #b8b8b8;
  background: #fafafa;
}

.accessibility-action.is-active {
  border-color: #5b67c8;
  background: #f3f4ff;
}

.accessibility-action__icon {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
}

.accessibility-action__text {
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 700;
  color: #000000;
}

html.accessibility-grayscale {
  filter: grayscale(1);
}

html.accessibility-contrast {
  filter: contrast(1.22) brightness(0.96);
}

html.accessibility-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 2px !important;
}

html.accessibility-links a:hover {
  text-decoration: underline !important;
}

html.accessibility-high-visibility *:focus {
  outline: 3px solid #ffbf00 !important;
  outline-offset: 2px !important;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .accessibility-toggle {
    left: 16px;
    bottom: 90px;
    width: 54px;
    height: 54px;
  }

  .accessibility-toggle__svg {
    width: 22px;
    height: 22px;
  }

  .accessibility-panel {
    left: 16px;
    bottom: 158px;
    width: calc(100vw - 32px);
    max-width: 340px;
    padding: 14px;
  }

  .accessibility-panel__title {
    font-size: 0.95rem;
  }

  .accessibility-action {
    min-height: 48px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 14px;
  }

  .accessibility-action__icon {
    min-width: 30px;
    font-size: 1rem;
  }

  .accessibility-action__text {
    font-size: 0.86rem;
  }
}