/**
 * JPMP Footer GOV.CO – Diseño nuevo KIT UI 9.2
 * Fondo blanco · Marco dorado #CFA855 · Barra inferior azul oscuro
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap');

/* ══════════════════════════════════════════════════════════════════════════════
   NEUTRALIZAR ESTILOS DEL TEMA EN LA REGIÓN FOOTER
   ══════════════════════════════════════════════════════════════════════════ */

#footer:has(.jpmp-footer),
.footer:has(.jpmp-footer),
.footer-inner:has(.jpmp-footer),
.before-footer:has(.jpmp-footer) {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer-center:has(.jpmp-footer) {
  background: transparent !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  margin: 0 !important;
  padding-top: 100px !important;
}

/* Neutraliza el margin-top negativo del tema en páginas internas */
body:not(.frontpage):has(.jpmp-footer) footer,
body:not(.path-user):has(.jpmp-footer) footer {
  margin-top: 0 !important;
}

body:not(.frontpage):has(.jpmp-footer) footer .footer-first,
body:not(.path-user):has(.jpmp-footer) footer .footer-first {
  margin-top: 0 !important;
}

body.jpmp-footer-active #footer,
body.jpmp-footer-active .footer,
body.jpmp-footer-active .footer-inner,
body.jpmp-footer-active .footer-center,
body.jpmp-footer-active .before-footer {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.block-jpmp-accesibilidad,
.block--id--jpmp-footer-block {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

#footer:has(.jpmp-footer) .copyright {
  display: none !important;
}

body.jpmp-footer-active #footer .copyright {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CONTADOR DE VISITAS
   ══════════════════════════════════════════════════════════════════════════ */

.block-visit-counter {
  position: relative;
  z-index: 1;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: #0943B5;
  padding: 10px 48px;
  margin: 0;
}

.block-visit-counter p {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  color: #ffffff;
  margin: 0;
  text-align: right;
}

.block-visit-counter b {
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ESPACIO ENTRE BLOQUE DE OTRAS ENTIDADES Y EL FOOTER
   ══════════════════════════════════════════════════════════════════════════ */

#block-footer-svg {
  margin-bottom: 80px !important;
  padding-bottom: 80px !important;
}

/* Fuerza espacio antes del footer usando el contenedor de la región */
.footer-center:has(.jpmp-footer) {
  padding-top: 80px !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER – CONTENEDOR FULL-BLEED CON MARCO DORADO
   ══════════════════════════════════════════════════════════════════════════ */

body {
  overflow-x: hidden;
}

.jpmp-footer {
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  box-sizing: border-box;
  background: transparent;
  padding: 0;
  overflow: visible;
  margin-top: 48px;           /* espacio para que la tarjeta blanca flote */
}

/* ── MARCO DORADO: visible en lados y fondo ── */
.jpmp-footer__frame {
  background-color: #CFA855;
  padding: 1px 56px 40px;   /* top más alto = tarjeta sube más */
  margin-top: 96px;
}

/* ── TARJETA BLANCA: flota encima del marco dorado, ancho 10/12 cols ── */
.jpmp-footer__wrapper {
  background-color: #ffffff;
  border-radius: 12px;
  border: 2px solid #CFA855;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  margin-top: -120px;        /* sube más sobre el borde dorado */
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  width: 83.333%;            /* 10 de 12 columnas Bootstrap */
  padding: 48px 64px 40px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SECCIÓN SUPERIOR: info izquierda + logo derecha
   ══════════════════════════════════════════════════════════════════════════ */

.jpmp-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.jpmp-footer__top-info {
  flex: 1;
  min-width: 0;
}

.jpmp-footer__top-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-direction: column;
  gap: 12px;
}

.jpmp-footer__logo-entidad {
  max-width: 120px;
  height: auto;
}

/* ── NOMBRE PORTAL ── */
.jpmp-footer__nombre-portal {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0943B5;
  margin: 0 0 20px;
  padding: 0;
  line-height: 1.3;
  border: none;
  background: none;
  text-transform: none;
  letter-spacing: normal;
}

/* ── ENCABEZADO DE SEDE ── */
.jpmp-footer__sede-heading {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #0943B5;
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.3;
  border: none;
  background: none;
  text-transform: none;
}

/* ── INFORMACIÓN DE CONTACTO ── */
.jpmp-footer__address {
  font-style: normal;
  margin-bottom: 20px;
}

.jpmp-footer__info-item {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  color: #333333;
  line-height: 1.8;
  margin: 0;
}

.jpmp-footer__link {
  color: #0943B5 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
}

.jpmp-footer__link:hover {
  color: #1a4fa0 !important;
}

.jpmp-footer__link:focus-visible {
  outline: 2px solid #326bf3;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── REDES SOCIALES ── */
.jpmp-footer__redes {
  margin-top: 16px;
}

.jpmp-footer__redes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.jpmp-footer__red-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0943B5 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  transition: color 0.15s ease;
}

.jpmp-footer__red-link:hover {
  color: #1a4fa0 !important;
}

.jpmp-footer__red-link:focus-visible {
  outline: 2px solid #326bf3;
  outline-offset: 4px;
  border-radius: 2px;
  text-decoration: none;
}

.jpmp-footer__red-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: #0943B5;
}

.jpmp-footer__red-label {
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SECCIÓN SEDES (grid – se activará con los campos futuros)
   ══════════════════════════════════════════════════════════════════════════ */

.jpmp-footer__sedes {
  margin-top: 32px;
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}

.jpmp-footer__sede-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 48px;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.jpmp-footer__sede-row:last-child {
  border-bottom: none;
}

.jpmp-footer__sede-nombre {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0943B5;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
}

.jpmp-footer__sede-contacto-heading {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0943B5;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
}

.jpmp-footer__sede-info p,
.jpmp-footer__sede-contacto p {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  color: #333333;
  line-height: 1.8;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ENLACES DE PIE (Políticas, Mapa del sitio, etc.)
   ══════════════════════════════════════════════════════════════════════════ */

.jpmp-footer__enlaces {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.jpmp-footer__enlaces-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.jpmp-footer__enlace {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  color: #0943B5 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.jpmp-footer__enlace:hover {
  color: #1a4fa0 !important;
}

.jpmp-footer__enlace:focus-visible {
  outline: 2px solid #326bf3;
  outline-offset: 2px;
  border-radius: 2px;
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BARRA INFERIOR: GOV.CO + Colombia (azul oscuro)
   ══════════════════════════════════════════════════════════════════════════ */

.jpmp-footer__bottom-strip {
  background-color: #0943B5; /* Azul cobalto */
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px calc(8.333% + 64px); /* alineado con el texto dentro de la tarjeta */
  position: relative;
  z-index: 1;
}

.jpmp-footer__govco-link {
  display: inline-flex;
  align-items: center;
}

.jpmp-footer__govco-link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
  border-radius: 3px;
}

.jpmp-footer__logo-govco {
  max-width: 130px;
  height: auto;
}

.jpmp-footer__logos-gov-separator {
  width: 2px;
  height: 32px;
  background: rgba(255, 255, 255, 0.55);
}

.jpmp-footer__logo-colombia {
  max-width: 48px;
  height: auto;
}

/* ══════════════════════════════════════════════════════════════════════════════
   VISUALLY HIDDEN (WCAG)
   ══════════════════════════════════════════════════════════════════════════ */

.jpmp-footer .visually-hidden {
  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;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE: TABLET (≤ 992px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
  .jpmp-footer {
    margin-top: 40px;
  }

  .jpmp-footer__frame {
    padding: 100px 48px 32px;
  }

  .jpmp-footer__wrapper {
    margin-top: -100px;
    padding: 40px 48px 32px;
  }

  .jpmp-footer__top {
    gap: 32px;
  }

  .jpmp-footer__top-logo {
    padding: 0 24px;
  }

  .jpmp-footer__bottom-strip {
    padding: 16px calc(8.333% + 48px);
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE: MÓVIL (≤ 768px)
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .jpmp-footer {
    margin-top: 40px;
  }

  .jpmp-footer__frame {
    padding: 1px 20px 32px;
    margin-top: 96px;
  }

  .jpmp-footer__wrapper {
    width: 100%;
    margin-top: -90px;
    padding: 32px 20px 24px;
    border-radius: 0;
  }

  .jpmp-footer__top {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .jpmp-footer__top-info {
    text-align: left;
    width: 100%;
    order: 1;
  }

  .jpmp-footer__top-logo {
    padding: 0;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
  }

  .jpmp-footer__logo-entidad {
    max-width: 100px;
  }

  .jpmp-footer__nombre-portal {
    font-size: 18px;
    text-align: center;
  }

  .jpmp-footer__sede-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jpmp-footer__redes-list {
    gap: 12px;
    justify-content: flex-start;
  }

  .jpmp-footer__enlaces-list {
    gap: 8px 12px;
    justify-content: flex-start;
    flex-direction: column;
  }

  .jpmp-footer__bottom-strip {
    padding: 14px 20px;
    justify-content: center;
    gap: 12px;
  }

  .jpmp-footer__logo-govco {
    max-width: 130px;
  }

  .jpmp-footer__logos-gov-separator {
    display: block;
    width: 2px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   HIGH CONTRAST MODE (Windows)
   ══════════════════════════════════════════════════════════════════════════ */

@media (forced-colors: active) {
  .jpmp-footer {
    border-top: 2px solid ButtonText;
  }
  .jpmp-footer__bottom-strip {
    border-top: 2px solid ButtonText;
  }
  .jpmp-footer__enlace,
  .jpmp-footer__link,
  .jpmp-footer__red-link {
    forced-color-adjust: auto;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════════════════════════════ */

@media print {
  .jpmp-footer {
    background-color: #ffffff !important;
    padding: 16px 0;
  }
  .jpmp-footer__bottom-strip {
    display: none;
  }
  .jpmp-footer__nombre-portal,
  .jpmp-footer__sede-heading,
  .jpmp-footer__info-item,
  .jpmp-footer__link {
    color: #000000 !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .jpmp-footer__link,
  .jpmp-footer__red-link,
  .jpmp-footer__enlace {
    transition: none;
  }
}
