/*
 * Instituto Jerez — Tres ámbitos iniciales de investigación
 * Estilos deliberadamente acotados a la sección detectada por el plugin.
 */
.home main .wp-block-post-content > .wp-block-group.ij-research-domains {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 15%, rgba(210, 138, 71, .11), transparent 27%),
    radial-gradient(circle at 90% 85%, rgba(122, 143, 116, .15), transparent 29%),
    linear-gradient(145deg, #f9f7f0 0%, #edf2e9 52%, #e5ece1 100%) !important;
  color: #263332 !important;
  border-top: 1px solid rgba(18, 59, 58, .12);
  border-bottom: 1px solid rgba(18, 59, 58, .12);
}

/* Neutraliza decoraciones oscuras heredadas de selectores antiguos del tema. */
.home main .wp-block-post-content > .wp-block-group.ij-research-domains::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 59, 58, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 59, 58, .025) 1px, transparent 1px);
  background-size: 52px 52px;
}

.home main .wp-block-post-content > .wp-block-group.ij-research-domains::after {
  content: "IJ";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  right: clamp(-1.5rem, 2vw, 2rem);
  bottom: -4.8rem;
  color: rgba(18, 59, 58, .035);
  font-family: Iowan Old Style, Baskerville, "Palatino Linotype", Georgia, serif;
  font-size: clamp(10rem, 23vw, 22rem);
  font-weight: 650;
  line-height: .8;
  letter-spacing: -.09em;
  transform: none;
}

.home .ij-research-domains > * {
  position: relative;
  z-index: 2;
}

.home .ij-research-domains__title {
  max-width: 920px;
  margin-right: auto !important;
  margin-left: auto !important;
  color: #123b3a !important;
  font-size: clamp(2.25rem, 4.8vw, 4.5rem) !important;
  font-weight: 650 !important;
  line-height: 1.04 !important;
  letter-spacing: -.045em;
  text-shadow: none !important;
  opacity: 1 !important;
}

.home .ij-research-domains__title::before {
  content: "LÍNEAS INICIALES DE INVESTIGACIÓN";
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 1rem;
  color: #6a4d2e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .7rem;
  font-weight: 780;
  line-height: 1.35;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.home .ij-research-domains__title::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 3px;
  margin: 1.15rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d28a47, #7a8f74);
}

.home .ij-research-domains__grid {
  gap: clamp(1rem, 2.2vw, 1.75rem) !important;
  align-items: stretch !important;
}

.home .ij-research-domains .ij-domain-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  padding: clamp(1.55rem, 2.8vw, 2.15rem) !important;
  border: 1px solid rgba(18, 59, 58, .14) !important;
  border-radius: 22px !important;
  background: linear-gradient(155deg, rgba(255, 255, 255, .96), rgba(250, 248, 241, .88)) !important;
  color: #263332 !important;
  box-shadow:
    0 18px 48px rgba(18, 59, 58, .09),
    inset 0 1px 0 rgba(255, 255, 255, .86);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.home .ij-research-domains .ij-domain-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #d28a47, #7a8f74);
}

.home .ij-research-domains .ij-domain-card::after {
  content: "";
  position: absolute;
  right: -3.5rem;
  bottom: -4rem;
  width: 10rem;
  aspect-ratio: 1;
  border: 1px solid rgba(18, 59, 58, .07);
  border-radius: 50%;
  box-shadow: 0 0 0 1.8rem rgba(122, 143, 116, .025);
}

.home .ij-research-domains .ij-domain-card:hover {
  transform: translateY(-6px);
  border-color: rgba(210, 138, 71, .43) !important;
  box-shadow:
    0 25px 58px rgba(18, 59, 58, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.home .ij-domain-card__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(210, 138, 71, .38);
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdfa, #edf2e9);
  color: #285444;
  box-shadow: 0 8px 22px rgba(18, 59, 58, .075);
}

.home .ij-domain-card__icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home .ij-research-domains .ij-domain-card__title {
  position: relative;
  z-index: 2;
  margin-top: 0 !important;
  margin-bottom: .9rem !important;
  color: #123b3a !important;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem) !important;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.025em;
  opacity: 1 !important;
}

.home .ij-research-domains .ij-domain-card p {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  color: #35423f !important;
  font-size: 1rem;
  line-height: 1.72;
  text-align: left !important;
  opacity: 1 !important;
}

.home .ij-research-domains .wp-block-buttons {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.home .ij-research-domains .wp-block-button.is-style-outline .wp-block-button__link {
  border-color: #285444 !important;
  background: rgba(255, 255, 255, .42) !important;
  color: #123b3a !important;
}

.home .ij-research-domains .wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: #d28a47 !important;
  background: #123b3a !important;
  color: #ffffff !important;
}

@media (max-width: 781px) {
  .home .ij-research-domains__title {
    font-size: clamp(2.05rem, 9vw, 3.35rem) !important;
  }

  .home .ij-research-domains__title::before {
    width: auto;
    letter-spacing: .12em;
  }

  .home .ij-research-domains .ij-domain-card {
    min-height: auto;
    border-radius: 18px !important;
  }

  .home main .wp-block-post-content > .wp-block-group.ij-research-domains::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .ij-research-domains .ij-domain-card {
    transition: none;
  }
}
