/**
 * COACCM — Correcciones de Accesibilidad CSS (WCAG 2.1 AA) v2
 * Fecha: 13/04/2026
 */

/* =============================================
 * 1. FOCO VISIBLE — WCAG 2.4.7
 * ============================================= */
*:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(0, 95, 204, 0.3) !important;
}

*:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

/* =============================================
 * 2. CLASE SR-ONLY — Texto solo para lectores de pantalla
 * ============================================= */
.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =============================================
 * 3. SKIP LINK — WCAG 2.4.1
 * ============================================= */
.skip-link:focus,
a.skip-link:focus,
a[href="#primary"]:focus {
  display: block !important;
  position: fixed !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 999999 !important;
  padding: 15px 25px !important;
  background: #005fcc !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: bold !important;
  text-decoration: none !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
}

/* =============================================
 * 4. CONTRASTE MEJORADO — WCAG 1.4.3
 * ============================================= */
footer a,
.site-footer a,
.footer-widget a {
  text-decoration: underline;
}

footer a:hover,
.site-footer a:hover,
.footer-widget a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* =============================================
 * 5. PREFERS-REDUCED-MOTION — WCAG 2.3.3
 *    Desactiva animaciones para usuarios que las rechazan
 * ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .n2-ss-slider,
  [class*="smart-slider"],
  [class*="soliloquy"],
  .owl-carousel {
    animation: none !important;
    transition: none !important;
  }

  .n2-ss-slide {
    transition: none !important;
  }
}

/* =============================================
 * 6. TOUCH TARGET MÍNIMO 44x44px — WCAG 2.5.5
 * ============================================= */
a,
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.menu-item > a,
.go-to-top-link,
.meanmenu-reveal {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
}

/* Excepciones: enlaces dentro de párrafos (inline text) */
p a,
li a:not(.menu-item > a),
td a,
.entry-content a {
  min-height: auto;
  min-width: auto;
  display: inline;
}

/* =============================================
 * 7. TEXT SPACING OVERRIDE — WCAG 1.4.12
 *    Asegura que el contenido no se trunca al forzar
 *    mayor interlineado desde el navegador
 * ============================================= */
body {
  line-height: 1.5;
  letter-spacing: normal;
  word-spacing: normal;
}

p, li, dd, dt, th, td, label, input, textarea, select {
  line-height: inherit;
  max-height: none !important;
  overflow: visible;
}

/* No truncar texto con overflow:hidden si el usuario fuerza spacing */
.entry-content,
.widget,
.comment-body,
.site-content {
  overflow: visible;
}

/* =============================================
 * 8. CONTRASTE EN ELEMENTOS INTERACTIVOS
 * ============================================= */
.main-navigation a:focus,
.main-navigation a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-information a:focus,
.contact-information a:hover {
  text-decoration: underline;
}

/* =============================================
 * 9. MODAL/POPUP: estilos de foco dentro de modales
 * ============================================= */
[role="dialog"] *:focus-visible {
  outline: 3px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.5) !important;
}

/* =============================================
 * 10. MOBILE MENU (MeanMenu) accesible
 * ============================================= */
.meanmenu-reveal:focus {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}

.mean-nav a:focus {
  background-color: rgba(0, 95, 204, 0.15);
  outline: 2px solid #005fcc;
}

/* =============================================
 * 11. CORRECCIONES DE CONTRASTE (Lighthouse)
 *     WCAG 1.4.3 — Ratio mínimo 4.5:1
 * ============================================= */

/* Tarjetas de cuotas: texto "/ trimestre" y subtextos */
.coaccm-sub,
.coaccm-card .coaccm-sub,
.coaccm-card p {
  color: #3d3d3d !important;
}

/* Badges de cuotas: "CUOTA BASE", "CUOTA JOVEN", etc. */
.coaccm-badge {
  color: #ffffff !important;
  background-color: #2a6496 !important;
}

/* Tarjetas de precio: asegurar contraste en headers */
.coaccm-card h3,
.coaccm-card h4,
.coaccm-card .coaccm-price {
  color: #1a1a1a !important;
}

/* Tab del centenario y labels */
#centenario-tab,
div#centenario-tab,
#centenario-tab span.label,
.centenario-tab span.label {
  color: #ffffff !important;
  background-color: #1a6b3c !important;
}

/* Enlace "Descubrir el centenario" — sobre fondo verde */
#centenario-tab a,
#centenario-tab a:link,
#centenario-tab a:visited,
a[href*="centenario.coaccm"],
a[href*="centenario.coaccm"]:link,
a[href*="centenario.coaccm"]:visited {
  color: #ffffff !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

#centenario-tab a:hover,
#centenario-tab a:focus,
a[href*="centenario.coaccm"]:hover,
a[href*="centenario.coaccm"]:focus {
  color: #ffffff !important;
  text-decoration-thickness: 2px !important;
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

/* Slider: texto sobre imagen — refuerzo de sombra */
.n2-ss-slide h2,
.n2-ss-slide h1,
.n2-ss-slide p,
.n2-ss-slide a {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5) !important;
}



