/*
 * Mejoras de uso sobre el calco de Elementor (14-nov-2026). Va después de sitio.css y del CSS de cada página.
 * 1. Barra fija de contacto en celular.  2. Menú más legible.  3. Utilidades (H1 solo para lectores de pantalla).
 */

/* ---------- 1. Barra fija de contacto (solo celular) ---------- */
.barra-contacto {
  display: none;
}
@media (max-width: 767px) {
  .barra-contacto {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9990;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.18);
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .barra-contacto__boton {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    background: #171d34;
    color: #fff !important;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
  }
  .barra-contacto__boton svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  .barra-contacto__boton--whatsapp {
    background: #ffcc3e;
    color: #171d34 !important; /* amarillo de la marca con texto noche (contraste 11:1) */
  }
  .barra-contacto__boton:focus-visible {
    outline: 3px solid #ffcc3e;
    outline-offset: -3px;
  }
  /* Que la barra no tape el final de la página ni el pie. */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  /* En celular, la barra reemplaza al botón flotante de WhatsApp. */
  .joinchat {
    display: none !important;
  }
}

/* ---------- 2. Menú más legible ---------- */
/* Escritorio: el submenú de Elementor salía cerca de 12 px y muy apretado. */
.elementor-716 .elementor-nav-menu--main .elementor-nav-menu--dropdown {
  min-width: 270px !important;
}
.elementor-716 .elementor-nav-menu--main .elementor-nav-menu--dropdown a.elementor-sub-item,
.elementor-716 .elementor-nav-menu--main .elementor-nav-menu--dropdown a.elementor-item {
  font-size: 15px !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  padding: 11px 20px !important;
  white-space: normal;
}
/* Celular: menú deslizante (Premium Addons) con letra y zonas de toque más grandes. */
@media (max-width: 1024px) {
  .premium-mobile-menu-container .premium-menu-link,
  .premium-mobile-menu-container .premium-sub-menu-link {
    font-size: 16px !important;
    line-height: 1.35 !important;
    min-height: 44px;
    display: flex !important;
    align-items: center;
  }
}

/* ---------- 3. Utilidades ---------- */
/* H1 que solo leen Google y los lectores de pantalla, en páginas cuyo diseño no tiene un título visible apropiado. */
.solo-lectores {
  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;
}

/* ---------- 4. Tarjetas de información del trámite (/protocolo/) ----------
 * Antes eran cajas giratorias de Elementor: la respuesta solo aparecía al pasar el mouse (en celular casi nunca),
 * con letra oscura sobre fondo oscuro. Ahora pregunta y respuesta se ven juntas, en tarjetas claras con su ícono.
 */
.elementor-1797 .elementor-widget-flip-box,
.elementor-1797 .elementor-widget-flip-box > .elementor-widget-container {
  height: 100%;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box {
  height: 100% !important;
  min-height: 0 !important;
  perspective: none !important;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e3e9ed;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 41, 64, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box:hover,
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box:focus-within {
  transform: translateY(-2px);
  border-color: #ffcc3e;
  box-shadow: 0 14px 32px -14px rgba(0, 41, 64, 0.22);
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  backface-visibility: visible !important;
  transition: none !important;
  background: none !important;
  border-radius: 0 !important;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer__overlay {
  display: block !important;
  min-height: 0 !important;
  background: none !important;
  border-radius: 0 !important;
  text-align: left !important;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__front .elementor-flip-box__layer__overlay {
  padding: 28px 28px 10px !important;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__back {
  flex: 1;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__back .elementor-flip-box__layer__overlay {
  padding: 0 28px 28px !important;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer__title {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 !important;
  color: #171d34 !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer__title::before {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffcc3e center / 24px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(23, 29, 52, 0.08);
}
.elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer__description {
  margin: 0 !important;
  color: #51616c !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  text-align: left !important;
}
/* Íconos (Material Icons, en noche #171D34 sobre el chip amarillo), uno por tarjeta. */
.elementor-1797 .elementor-element-c7f1721 .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7z'/%3E%3C/svg%3E");
}
.elementor-1797 .elementor-element-74fbe6d .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z'/%3E%3C/svg%3E");
}
.elementor-1797 .elementor-element-c523597 .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10L22 5.18zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44A9.9 9.9 0 0 0 12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39l-1.61 1.61z'/%3E%3C/svg%3E");
}
.elementor-1797 .elementor-element-ef14b72 .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z'/%3E%3C/svg%3E");
}
.elementor-1797 .elementor-element-2f5dd55 .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z'/%3E%3C/svg%3E");
}
.elementor-1797 .elementor-element-c8bf238 .elementor-flip-box__layer__title::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23171D34'%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E");
}
@media (max-width: 767px) {
  .elementor-1797 .elementor-widget-flip-box .elementor-flip-box__front .elementor-flip-box__layer__overlay {
    padding: 22px 22px 8px !important;
  }
  .elementor-1797 .elementor-widget-flip-box .elementor-flip-box__back .elementor-flip-box__layer__overlay {
    padding: 0 22px 22px !important;
  }
  .elementor-1797 .elementor-widget-flip-box .elementor-flip-box__layer__title {
    font-size: 18px !important;
  }
}

/* ---------- 5. Celular: uso más cómodo (revisión del 14-nov-2026 a 375 px) ---------- */
@media (max-width: 767px) {
  /* Nada más ancho que la pantalla: en PQRSF, las reseñas de Google y un carrusel la ensanchaban a 615 px. */
  body {
    overflow-x: clip;
  }
  .swiper,
  .swiper-container,
  .elementor-swiper,
  .ti-widget,
  .ti-reviews-container-wrapper {
    max-width: 100%;
    overflow: hidden;
  }

  /* Trámites e institucionales: la foto decorativa de arriba ocupaba 480–540 px y el título quedaba fuera de la
   * primera pantalla. Se deja una franja de 210 px y el título y la información suben. */
  .plantilla-tramite main .elementor-widget-slides .swiper-slide,
  .plantilla-institucional_hero main .elementor-widget-slides .swiper-slide {
    height: 210px !important;
  }
  .plantilla-tramite main .elementor-widget-slides .swiper-slide-bg,
  .plantilla-institucional_hero main .elementor-widget-slides .swiper-slide-bg {
    background-position: center 92% !important;
  }

  /* Formularios (contacto, PQRSF, conciliación): letra de 16 px para que el iPhone no acerque la pantalla al escribir,
   * y campos y botón más altos, fáciles de tocar. */
  .wpcf7 input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='hidden']):not([type='file']),
  .wpcf7 select,
  .wpcf7 textarea {
    font-size: 16px !important;
    min-height: 48px;
  }
  .wpcf7 textarea {
    min-height: 130px;
  }
  .wpcf7 input[type='file'] {
    font-size: 15px !important;
    max-width: 100%;
  }
  .wpcf7 input[type='submit'],
  .wpcf7 button[type='submit'] {
    width: 100%;
    min-height: 50px;
    font-size: 16px !important;
  }
  .wpcf7 .wpcf7-list-item {
    display: block;
    margin: 6px 0 !important;
  }
  .wpcf7 .wpcf7-list-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
  }

  /* Tablas (tarifas): se desplazan de lado dentro de su caja en vez de salirse de la pantalla. */
  .eael-data-table-wrap,
  .elementor-widget-text-editor:has(table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Enlaces que medían 15–22 px de alto («Leer más» de noticias y entradas): zona de toque de 44 px. */
  .elementor-post__read-more,
  .premium-blog-excerpt-link,
  .elementor-post__title a {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
  }
}
@media (max-width: 767px) {
  /* Direcciones web largas (p. ej. el enlace de la Procuraduría en PQRSF) se parten en vez de ensanchar la página. */
  main p,
  main li,
  main td,
  main a {
    overflow-wrap: break-word;
  }
}

/* ---------- 6. Celular, segunda ronda ---------- */
/* El índice y el acceso rápido solo existen en celular: en computador el calco queda igual. */
.indice-pagina,
.acceso-rapido {
  display: none;
}
@media (max-width: 767px) {
  html {
    scroll-padding-top: 88px; /* los saltos del índice no quedan debajo del encabezado fijo */
    scroll-behavior: smooth;
  }

  /* Índice «En esta página» de los trámites: fichas que se desplazan de lado. */
  .indice-pagina {
    display: block;
    margin: 0;
    padding: 14px 0 16px;
    background: #f3f6f8;
    border-bottom: 1px solid #e3e9ed;
  }
  .indice-pagina__titulo {
    margin: 0 20px 10px !important;
    color: #51616c;
    font: 600 12px/1 Montserrat, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .indice-pagina ul {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0 20px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .indice-pagina ul::-webkit-scrollbar {
    display: none;
  }
  .indice-pagina li {
    flex: none;
  }
  .indice-pagina a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #e3e9ed;
    border-radius: 999px;
    background: #fff;
    color: #00617c !important;
    font: 600 14px/1 Montserrat, sans-serif;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .indice-pagina a:active {
    background: #ffcc3e;
    border-color: #f5b700;
    color: #171d34 !important;
  }

  /* «Acceso rápido» de la portada: los trámites más buscados y el horario. */
  .acceso-rapido {
    display: block;
    padding: 28px 16px 24px;
    background: #f3f6f8;
  }
  .acceso-rapido__titulo {
    margin: 0 4px 16px !important;
    color: #004568 !important;
    font: 700 22px/1.25 Montserrat, sans-serif !important;
    letter-spacing: -0.01em;
  }
  .acceso-rapido__grilla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .acceso-rapido__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid #e3e9ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 41, 64, 0.06);
    color: #171d34 !important;
    font: 600 15px/1.25 Montserrat, sans-serif;
    text-decoration: none !important;
  }
  .acceso-rapido__item svg {
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 10px;
    background: #ffcc3e;
    fill: #171d34;
  }
  .acceso-rapido__item:active {
    border-color: #f5b700;
  }
  .acceso-rapido__horario {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #171d34;
    color: #fff;
    font: 400 14px/1.5 Montserrat, sans-serif;
  }
  .acceso-rapido__horario p {
    margin: 0 0 4px !important;
    font-weight: 700;
    color: #ffcc3e;
  }
  .acceso-rapido__horario ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .acceso-rapido__horario b {
    font-weight: 600;
  }

  /* Navidad más discreta en celular: el trineo medía 360 px (toda la pantalla) y pasaba cada 26 s. */
  html body .nv-capa {
    --nv-ancho: 200px;
    --nv-ciclo: 50s;
  }
  html body .nv-copo {
    opacity: 0.5;
  }
}

/* ---------- Accesibilidad (PageSpeed, 15/11/2026) ---------- */
/* El reverso de las tarjetas que giran lleva color de fondo debajo del degradado: está en tema.css. */
/* «Leer más» de las reseñas: Trustindex lo pinta negro con opacidad (gris #808080), que no alcanza el contraste
   mínimo sobre blanco. */
.ti-widget .ti-read-more,
.ti-widget .ti-read-more span {
  opacity: 1 !important;
}
.ti-widget .ti-read-more span {
  color: #5b6670 !important;
}
/* Frente de las tarjetas que giran: el título lleva el mismo azul noche de la franja donde está. No cambia lo que se
   ve, pero con el giro 3D las pruebas de contraste no encuentran el fondo de la tarjeta y comparan el título blanco
   con el gris de la sección. */
.elementor-flip-box .elementor-flip-box__front .elementor-flip-box__layer__title {
  background-color: rgb(23, 29, 52);
}
/* Puntos de los carruseles de imágenes: el punto se ve igual, pero el área para tocarlo es de 24 px. */
.elementor-image-carousel-wrapper .swiper-pagination-bullet {
  box-sizing: content-box;
  padding: 8px;
  background-clip: content-box;
}
/* Puntos del carrusel de logos: ahora son botones (sitio.js); sin el estilo de botón del navegador. */
.slick-dots .slick-dots__boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 0;
  cursor: pointer;
}
/* Títulos de las tarjetas de trámites de la portada: pasaron de h4 a h3 (orden de encabezados) con el mismo aspecto. */
.elementor-image-box-content h3.elementor-image-box-title {
  margin-top: 1.33em;
  margin-bottom: 0;
}
/* Logos de entidades del pie: llevan width y height en el HTML (reservan su espacio al cargar), pero se siguen
   estirando a todo el ancho de su columna como antes. */
#colophon img:is([src*='SUPERINTENDENCIA'], [src*='REGISTRADURIA-XXI'], [src*='MIN-JUSTICIA'], [src*='CERTICAMARA'], [src*='logo-vur']) {
  width: 100%;
  height: auto;
}
