
/* ==========================================================================
   v9.0 - Production consolidation
   Single final layer: palette, footer, hero, shortcuts, cards and mobile fixes.
   ========================================================================== */

:root{
  --ji-prod-navy:#0f2b63!important;
  --ji-prod-blue:#2457e6!important;
  --ji-prod-blue-2:#3677ff!important;
  --ji-prod-red:#cf142b!important;
  --ji-prod-red-dark:#ad1025!important;
  --ji-prod-white:#ffffff!important;
  --ji-prod-soft:#f4f7ff!important;
  --ji-prod-soft-2:#eef4ff!important;
  --ji-prod-line:#d8e2fb!important;
  --ji-prod-ink:#0d214a!important;
  --ji-prod-copy:#51627f!important;

  --ji-primary:#0f2b63!important;
  --ji-secondary:#2457e6!important;
  --ji-accent:#cf142b!important;
  --ji-bg:#f4f7ff!important;
  --ji-text:#0d214a!important;
  --ji-border:#d8e2fb!important;
  --ji-v5-teal:#2457e6!important;
  --ji-v5-teal-dark:#0f2b63!important;
  --ji-v5-yellow:#2457e6!important;
  --ji-v5-orange:#cf142b!important;
  --ji-v5-purple:#2457e6!important;
  --ji-card-kicker:#2457e6!important;
  --ji-card-accent:#cf142b!important;
}

html,
body{
  overflow-x:hidden!important;
  background:var(--ji-prod-soft)!important;
  color:var(--ji-prod-ink)!important;
}

/* Header */
html body .ji-clean-header,
html body.ji-v53-clean .ji-clean-header,
html body.ji-v54-dashboard .ji-clean-header{
  background:linear-gradient(90deg,var(--ji-prod-navy) 0%,var(--ji-prod-blue) 62%,var(--ji-prod-red) 100%)!important;
  color:#fff!important;
}

/* Footer full width with exact header gradient */
html body footer#contacto.ji-footer,
html body footer.ji-footer,
html body .ji-footer{
  position:relative!important;
  left:50%!important;
  right:50%!important;
  width:100vw!important;
  max-width:100vw!important;
  margin-left:-50vw!important;
  margin-right:-50vw!important;
  padding:0!important;
  background:linear-gradient(90deg,var(--ji-prod-navy) 0%,var(--ji-prod-blue) 62%,var(--ji-prod-red) 100%)!important;
  color:#fff!important;
  overflow:hidden!important;
}

html body footer.ji-footer .ji-footer__topband,
html body footer.ji-footer .ji-footer__grid,
html body footer.ji-footer .ji-footer__legal-main,
html body footer.ji-footer .ji-container{
  background:transparent!important;
  background-image:none!important;
}

html body footer.ji-footer .ji-footer__topband{
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
}

html body footer.ji-footer .ji-footer__grid{
  width:min(calc(100% - 32px),var(--ji-container,1180px))!important;
  max-width:var(--ji-container,1180px)!important;
  margin-inline:auto!important;
  padding-block:3.5rem!important;
}

html body footer.ji-footer .ji-footer__bottom{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:1rem 0!important;
  background:var(--ji-prod-navy)!important;
  background-image:none!important;
  color:#fff!important;
}

html body footer.ji-footer .ji-footer__bottom .ji-container{
  width:min(calc(100% - 32px),var(--ji-container,1180px))!important;
  max-width:var(--ji-container,1180px)!important;
  margin-inline:auto!important;
}

html body footer.ji-footer,
html body footer.ji-footer *{
  color:#fff!important;
}

/* Titles: blue + red only */
html body .ji-block-heading__title,
html body .ji-block-heading__title--bicolor,
html body .ji-section__header h2,
html body .ji-v5-section__title,
html body .ji-page-header h1,
html body .ji-article h1,
html body .ji-split h2,
html body [class*="title--bicolor"],
html body [class*="section__title"]{
  color:var(--ji-prod-blue)!important;
  -webkit-text-fill-color:var(--ji-prod-blue)!important;
  background:none!important;
  text-shadow:none!important;
}

html body .ji-block-heading__title span,
html body .ji-block-heading__title--bicolor span,
html body .ji-section__header h2 span,
html body .ji-v5-section__title span,
html body .ji-page-header h1 span,
html body .ji-article h1 span,
html body .ji-split h2 span,
html body [class*="title--bicolor"] span,
html body [class*="section__title"] span{
  color:var(--ji-prod-red)!important;
  -webkit-text-fill-color:var(--ji-prod-red)!important;
  background:none!important;
}

/* Section surfaces */
html body #quienes-somos,
html body #destacados,
html body #tramites,
html body #documentos,
html body #noticias,
html body #galerias,
html body #directiva,
html body #directorio{
  background:linear-gradient(180deg,var(--ji-prod-soft) 0%,var(--ji-prod-soft-2) 100%)!important;
}

/* Cards */
html body .ji-card-system,
html body .ji-unified-card,
html body .ji-news-card,
html body .ji-v5-card,
html body .ji-archive-card,
html body .ji-person-card,
html body .ji-short-card,
html body .ji-tramite-rebuild-card{
  background:#fff!important;
  border:1px solid var(--ji-prod-line)!important;
  border-left:1px solid var(--ji-prod-line)!important;
  border-radius:0!important;
  box-shadow:0 16px 34px rgba(15,43,99,.075)!important;
  overflow:hidden!important;
}

html body .ji-card-system::before,
html body .ji-card-system::after,
html body .ji-unified-card::before,
html body .ji-unified-card::after,
html body .ji-news-card::before,
html body .ji-news-card::after{
  content:none!important;
  display:none!important;
}

html body .ji-card-system__eyebrow,
html body .ji-unified-card__top,
html body .ji-news-card__category,
html body .ji-v5-card__kicker,
html body .ji-archive-card__kicker,
html body .ji-person-card__role,
html body .ji-tramite-card .ji-unified-card__top,
html body .ji-tramite-rebuild-card__tag{
  color:var(--ji-prod-blue)!important;
  -webkit-text-fill-color:var(--ji-prod-blue)!important;
  background:#fff!important;
  font-weight:950!important;
}

html body .ji-card-system__body h3,
html body .ji-card-system__body h3 a,
html body .ji-unified-card__body h3,
html body .ji-unified-card__body h3 a,
html body .ji-news-card__body h3,
html body .ji-news-card__body h3 a,
html body .ji-tramite-rebuild-card__body h4{
  color:var(--ji-prod-ink)!important;
}

html body .ji-card-system__body p,
html body .ji-unified-card__body p,
html body .ji-news-card__body p,
html body .ji-tramite-rebuild-card__body p{
  color:var(--ji-prod-copy)!important;
}

/* Internal card buttons: blue */
html body #tramites .ji-unified-card__footer a,
html body #quienes-somos .ji-unified-card__footer a,
html body #documentos .ji-unified-card__footer a,
html body #directorio .ji-unified-card__footer a,
html body #destacados .ji-card-system__footer a,
html body #noticias .ji-card-system__footer a,
html body #galerias .ji-card-system__footer a,
html body #directiva .ji-card-system__footer a,
html body .ji-card-system__footer a,
html body .ji-unified-card__footer a,
html body .ji-tramite-rebuild-card__footer a,
html body .ji-v5-card__button,
html body .ji-archive-card__button,
html body .ji-person-card__button,
html body .ji-short-card__button{
  background:var(--ji-prod-blue)!important;
  background-image:none!important;
  border:2px solid var(--ji-prod-blue)!important;
  color:#fff!important;
  text-transform:uppercase!important;
  box-shadow:none!important;
}

html body #tramites .ji-unified-card__footer a:hover,
html body #quienes-somos .ji-unified-card__footer a:hover,
html body #documentos .ji-unified-card__footer a:hover,
html body #directorio .ji-unified-card__footer a:hover,
html body #destacados .ji-card-system__footer a:hover,
html body #noticias .ji-card-system__footer a:hover,
html body #galerias .ji-card-system__footer a:hover,
html body #directiva .ji-card-system__footer a:hover,
html body .ji-card-system__footer a:hover,
html body .ji-unified-card__footer a:hover,
html body .ji-tramite-rebuild-card__footer a:hover{
  background:var(--ji-prod-navy)!important;
  border-color:var(--ji-prod-navy)!important;
  color:#fff!important;
}

html body .ji-card-system__footer a span,
html body .ji-unified-card__footer a span,
html body .ji-tramite-rebuild-card__footer a span{
  background:#fff!important;
  color:var(--ji-prod-blue)!important;
}

/* Primary / section CTAs: red */
html body .ji-block-heading__cta .ji-btn,
html body .ji-block-heading__cta .ji-btn--news,
html body .ji-news-section__cta .ji-btn,
html body .ji-news-section__cta .ji-btn--news,
html body .ji-clean-call,
html body .ji-cert-verify__form button,
html body .ji-cert-action--primary{
  background:var(--ji-prod-red)!important;
  border-color:var(--ji-prod-red)!important;
  color:#fff!important;
}

html body .ji-block-heading__cta .ji-btn:hover,
html body .ji-block-heading__cta .ji-btn--news:hover,
html body .ji-news-section__cta .ji-btn:hover,
html body .ji-news-section__cta .ji-btn--news:hover,
html body .ji-clean-call:hover,
html body .ji-cert-verify__form button:hover,
html body .ji-cert-action--primary:hover{
  background:var(--ji-prod-red-dark)!important;
  border-color:var(--ji-prod-red-dark)!important;
  color:#fff!important;
}

/* Hero desktop compact */
html body .ji-clean-hero__shell{
  min-height:0!important;
}

/* Hero mobile: no empty image space */
@media (max-width:920px){
  html body .ji-clean-hero.ji-clean-hero--dashboard,
  html body .ji-clean-hero__shell,
  html body .ji-clean-hero__media,
  html body .ji-hero-slider,
  html body .ji-hero-slider__track{
    background:var(--ji-prod-navy)!important;
  }

  html body .ji-clean-hero__shell{
    display:block!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
  }

  html body .ji-clean-hero__media,
  html body .ji-hero-slider,
  html body .ji-hero-slider__track{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
  }

  html body .ji-hero-slide{
    height:auto!important;
    min-height:0!important;
    aspect-ratio:4/5!important;
    background-size:cover!important;
    background-position:center center!important;
    display:flex!important;
    align-items:center!important;
  }

  html body .ji-hero-slide.is-active{
    display:flex!important;
  }

  html body .ji-clean-hero__content{
    min-height:0!important;
    height:auto!important;
    padding:2.4rem 1.7rem!important;
    justify-content:center!important;
  }

  html body .ji-clean-dashboard{
    margin:0!important;
    padding:1.35rem 1.1rem 1.55rem!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    background:var(--ji-prod-navy)!important;
  }

  html body .ji-clean-dashboard__pills{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:.65rem!important;
  }

  html body .ji-clean-dashboard__pills a{
    min-height:46px!important;
    padding:.5rem .55rem!important;
    font-size:.82rem!important;
    line-height:1.12!important;
  }
}

/* Shortcuts: 4 in one row desktop */
html body .ji-home-shortcuts .ji-home-shortcuts__grid,
html body .ji-home-shortcuts--v55 .ji-home-shortcuts__grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

@media (max-width:980px){
  html body .ji-home-shortcuts .ji-home-shortcuts__grid,
  html body .ji-home-shortcuts--v55 .ji-home-shortcuts__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:640px){
  html body .ji-home-shortcuts .ji-home-shortcuts__grid,
  html body .ji-home-shortcuts--v55 .ji-home-shortcuts__grid{
    grid-template-columns:1fr!important;
  }
}

/* Accessibility / floating */
html body .ji-back-to-top,
html body .ji-backtotop{
  left:22px!important;
  right:auto!important;
  background:var(--ji-prod-red)!important;
  color:#fff!important;
}
