/* Correcciones de compatibilidad para Astra y los bloques de portada. */
body.home .site-content,
body.home .site-content > .ast-container,
body.home #primary,
body.home .site-main,
body.home article.page,
body.home .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.home .site-content > .ast-container {
  display: block !important;
}

body.home .vc-agency-hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 820px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  isolation: isolate;
  background-color: #173b2d;
}

body.home .vc-agency-hero > img.wp-block-cover__image-background,
body.home .vc-agency-hero > .wp-block-cover__image-background {
  position: absolute !important;
  z-index: -2 !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
}

body.home .vc-agency-hero > .wp-block-cover__background {
  position: absolute !important;
  z-index: -1 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

body.home .vc-agency-hero .wp-block-cover__inner-container {
  position: relative !important;
  z-index: 2 !important;
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 72px 0 !important;
}

body.home .vc-agency-hero-inner {
  width: 100% !important;
  max-width: 820px !important;
  margin-right: auto !important;
  margin-left: 0 !important;
}

/* Catálogo más ancho y textos que no se parten letra por letra. */
body.home .vc-catalog-section {
  width: 100% !important;
  max-width: none !important;
  padding-right: max(24px, calc((100vw - 1280px) / 2)) !important;
  padding-left: max(24px, calc((100vw - 1280px) / 2)) !important;
}

body.home .vc-catalog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

body.home .vc-catalog-card {
  min-width: 0 !important;
}

body.home .vc-catalog-body h3,
body.home .vc-catalog-body h3 a {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Las secciones inferiores deben ocupar la página completa, no el ancho
   restringido que Gutenberg aplica a los bloques comunes. */
body.home .entry-content > .vc-feature-split,
body.home .entry-content > .vc-value-section,
body.home .entry-content > .vc-agency-stats,
body.home .entry-content > .vc-agency-cta {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Dos parroquias, dos mitades simétricas. */
body.home .vc-feature-split {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.home .vc-feature-panel {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 620px !important;
  padding: clamp(38px, 6vw, 92px) !important;
  background-size: cover !important;
  background-position: center !important;
}

body.home .vc-feature-panel h2 {
  max-width: 560px !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Guía: encabezado centrado y tres tarjetas realmente anchas. */
body.home .vc-value-section {
  box-sizing: border-box !important;
  padding: 110px max(24px, calc((100vw - 1180px) / 2)) !important;
}

body.home .vc-value-heading {
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

body.home .vc-value-heading h2 {
  max-width: 900px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.home .vc-value-grid {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 60px auto 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
}

body.home .vc-value-grid article {
  min-width: 0 !important;
  padding: 38px 34px !important;
}

body.home .vc-value-grid h3,
body.home .vc-value-grid p {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* Franja de cifras y llamada final a ancho completo. */
body.home .vc-agency-stats,
body.home .vc-agency-cta {
  box-sizing: border-box !important;
}

body.home .vc-agency-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  padding: 58px max(24px, calc((100vw - 1120px) / 2)) !important;
}

body.home .vc-agency-cta {
  padding: 110px 24px !important;
}

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

  body.home .vc-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.home .vc-feature-split {
    grid-template-columns: 1fr !important;
  }

  body.home .vc-feature-panel {
    min-height: 480px !important;
  }
}

@media (max-width: 620px) {
  body.home .vc-agency-hero {
    min-height: 680px !important;
  }

  body.home .vc-agency-hero .wp-block-cover__inner-container {
    width: calc(100% - 36px) !important;
  }

  body.home .vc-catalog-grid {
    grid-template-columns: 1fr !important;
  }

  body.home .vc-value-grid,
  body.home .vc-agency-stats {
    grid-template-columns: 1fr !important;
  }
}
