.rh-esg-block {
  position: relative;
  padding: 100px 5%;
}

.rh-esg-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.rh-esg-head {
  text-align: center;
}

.rh-esg-section-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 3.2px;
  text-transform: uppercase;
}

.rh-esg-heading {
  margin: 0 auto;
  max-width: 860px;
  color: var(--ink);
  text-align: center;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.85rem, 3.5vw, 2.9rem);
  line-height: 1.18;
}

.rh-esg-heading span:not([style]):not([class*="has-"]) {
  color: var(--green);
}

.rh-esg-heading::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  border-radius: 2px;
  margin: 15px auto 22px;
  background: linear-gradient(90deg, var(--green), var(--teal));
}

.rh-esg-intro-text {
  margin: 0 auto;
  max-width: 580px;
  color: var(--ink-70);
  text-align: center;
  font-size: 0.96rem;
  line-height: 1.88;
}

.rh-esg-grid.wp-block-columns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 52px;
}

.rh-esg-grid.wp-block-columns > .wp-block-column {
  margin: 0;
}

.rh-esg-card {
  position: relative;
  overflow: hidden;
  padding: 36px 32px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
  transition: all 0.36s;
}

.rh-esg-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.36s;
  background: linear-gradient(90deg, var(--green), var(--teal));
}

.rh-esg-card:hover {
  transform: translateY(-5px);
  border-color: rgba(39, 174, 96, 0.35);
  box-shadow: 0 16px 48px rgba(39, 174, 96, 0.1);
}

.rh-esg-card:hover::after {
  transform: scaleX(1);
}

.rh-esg-card-head.wp-block-group {
  margin: 0 0 18px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.rh-esg-head-copy.wp-block-group {
  margin: 0;
  min-width: 0;
}

.rh-esg-icon.wp-block-image {
  margin: 0;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  padding: 14px;
  border-radius: 13px;
  border: 1.5px solid rgba(39, 174, 96, 0.2);
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(23, 165, 137, 0.07));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.rh-esg-icon.wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rh-esg-card:hover .rh-esg-icon.wp-block-image {
  border-color: rgba(39, 174, 96, 0.3);
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.16), rgba(23, 165, 137, 0.14));
}

/* Fallback para bloques ya guardados con estructura antigua (sin core/image). */
.rh-esg-card > .rh-esg-label {
  position: relative;
  padding-left: 70px;
}

.rh-esg-card > .rh-esg-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  border: 1.5px solid rgba(39, 174, 96, 0.2);
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(23, 165, 137, 0.07));
  transition: all 0.3s ease;
}

.rh-esg-card > .rh-esg-label::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 14px;
  width: 20px;
  height: 20px;
  background: #7ab89a;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  transition: all 0.3s ease;
}

.rh-esg-card--corporate > .rh-esg-label::after {
  mask-image: url("./icons/chart-pie.svg");
  -webkit-mask-image: url("./icons/chart-pie.svg");
}

.rh-esg-card--carbon > .rh-esg-label::after {
  mask-image: url("./icons/leaf.svg");
  -webkit-mask-image: url("./icons/leaf.svg");
}

.rh-esg-card:hover > .rh-esg-label::before {
  border-color: rgba(39, 174, 96, 0.3);
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.16), rgba(23, 165, 137, 0.14));
}

.rh-esg-card > .rh-esg-card-title {
  padding-left: 70px;
}

.rh-esg-label {
  margin: 0 0 4px;
  color: var(--sage);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.4;
}

.rh-esg-card-title {
  margin: 0;
  color: var(--ink);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.3;
}

.rh-esg-body {
  margin: 18px 0 16px;
  color: var(--ink-70);
  font-size: 0.84rem;
  line-height: 1.78;
}

.rh-esg-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rh-esg-list li {
  margin: 0;
  position: relative;
  padding-left: 16px;
  color: var(--ink-70);
  font-size: 0.8rem;
  line-height: 1.55;
}

.rh-esg-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.rh-esg-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.rh-esg-card--carbon.rh-esg-reveal {
  transition-delay: 0.09s;
}

.rh-esg-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .rh-esg-grid.wp-block-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .rh-esg-block {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .rh-esg-card {
    padding: 28px 24px;
  }

  .rh-esg-icon.wp-block-image {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    padding: 12px;
  }

  .rh-esg-card > .rh-esg-label,
  .rh-esg-card > .rh-esg-card-title {
    padding-left: 64px;
  }

  .rh-esg-card > .rh-esg-label::before {
    width: 48px;
    height: 48px;
  }

  .rh-esg-card > .rh-esg-label::after {
    left: 14px;
    top: 12px;
  }
}
