.fms-section {
  --fms-accent: #bdc92f;
  --fms-text: #111111;
  --fms-bg: #ffffff;
  --fms-bg-image: none;
  --fms-bg-mobile-image: var(--fms-bg-image);
  --fms-overlay: rgba(255,255,255,0.10);
  --fms-visual-height: 420px;
  --fms-image-position: center center;
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: 100vw;
  margin: 0 0 0 calc(50% - 50vw);
  color: var(--fms-text);
  background: var(--fms-bg);
  font-family: inherit;
  /* El theme justifica todo el texto: aquí se alinea a la izquierda salvo que la sección diga otra cosa */
  text-align: left;
  overflow: hidden;
}

.fms-section + .fms-section {
  margin-top: 0;
}

.fms-section *,
.fms-section *::before,
.fms-section *::after {
  box-sizing: border-box;
}

.fms-visual {
  flex: 0 0 auto;
  width: 100%;
  height: var(--fms-visual-height);
  min-height: 200px;
  max-height: 55vh;
  background-image:
    linear-gradient(var(--fms-overlay), var(--fms-overlay)),
    var(--fms-bg-image);
  background-position: var(--fms-image-position);
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: auto;
}

.fms-content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 64px) clamp(18px, 5vw, 74px);
  background: var(--fms-bg);
}

.fms-content > * {
  width: 100%;
}

.fms-hero-copy {
  max-width: 1320px;
  margin: 0 auto;
  text-align: center;
}

.fms-stat-grid,
.fms-split {
  width: min(100%, 1320px);
  margin-right: auto;
  margin-left: auto;
}

.fms-align--left .fms-hero-copy {
  margin-left: 0;
  text-align: left;
}

.fms-eyebrow {
  margin: 0 0 10px;
  color: var(--fms-accent);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.fms-section h2 {
  margin: 0;
  color: var(--fms-text);
  font-size: clamp(28px, 2.7vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  /* El theme pone Mayúscula En Cada Palabra: se respeta el texto tal cual */
  text-transform: none;
  text-align: inherit;
}

.fms-section h2 span {
  display: inline;
}

.fms-section h2 .fms-title-accent {
  color: var(--fms-accent);
}

.fms-lead {
  margin: 18px auto 0;
  max-width: 900px;
  font-size: clamp(17px, 1.3vw, 23px);
  line-height: 1.3;
  font-weight: 400;
}

.fms-body {
  margin: 10px auto 0;
  max-width: 760px;
  font-size: clamp(15px, 1.1vw, 19px);
  line-height: 1.4;
}

.fms-align--left .fms-lead,
.fms-align--left .fms-body {
  margin-left: 0;
}

.fms-body p {
  margin: 0 0 10px;
}

.fms-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 24px;
}

.fms-align--left .fms-actions {
  justify-content: flex-start;
}

.fms-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border: 2px solid var(--fms-accent);
  border-radius: 999px;
  color: var(--fms-text);
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.fms-button:hover,
.fms-button:focus {
  color: var(--fms-text);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
}

.fms-button--primary {
  background: var(--fms-accent);
}

.fms-button--soft {
  background: var(--fms-accent);
  border-color: var(--fms-accent);
  box-shadow: inset 0 0 0 999px rgba(255,255,255,0.38);
}

.fms-button--outline {
  background: transparent;
}

.fms-button__icon {
  display: block;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-right: 8px;
  object-fit: contain;
}

/* ---------- Cifras ---------- */
.fms-stat-grid {
  display: grid;
  /* Cada cifra ocupa lo que necesita y el conjunto se reparte sin huecos grandes */
  grid-template-columns: repeat(4, max-content);
  justify-content: space-evenly;
  gap: 20px clamp(20px, 3vw, 48px);
  align-items: center;
}

.fms-stat {
  display: grid;
  grid-template-columns: auto auto;
  gap: clamp(8px, 0.9vw, 14px);
  align-items: center;
  min-width: 0;
  padding: 8px 0;
  text-align: left;
}

.fms-stat__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(60px, 6vw, 110px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fms-accent);
  color: #ffffff;
  overflow: hidden;
  box-shadow: inset 0 -10px 18px rgba(0,0,0,0.08);
}

.fms-stat__media:has(img) {
  width: clamp(64px, 6.4vw, 118px);
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.fms-stat__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fms-stat__copy {
  min-width: 0;
}

.fms-stat strong {
  display: block;
  margin-bottom: 2px;
  color: var(--fms-accent);
  font-size: clamp(34px, 3.8vw, 68px);
  font-weight: 800;
  line-height: 0.92;
  white-space: nowrap;
}

.fms-stat span {
  display: block;
  max-width: 11ch;
  color: var(--fms-text);
  font-size: clamp(15px, 1.45vw, 26px);
  line-height: 1.1;
  text-align: left;
}

.fms-stat p {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.35;
}

/* ---------- Columnas (texto + tarjetas) ---------- */
.fms-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.fms-split__copy {
  min-width: 0;
  text-align: left;
}

/* En el diseño las dos líneas del título van en verde */
.fms-split h2 > span {
  color: var(--fms-accent);
}

.fms-split h2 span {
  display: block;
}

.fms-split .fms-lead {
  margin-top: 16px;
  font-style: italic;
}

.fms-split .fms-body,
.fms-split .fms-lead {
  max-width: 760px;
  margin-left: 0;
}

.fms-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
}

.fms-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  color: var(--fms-text);
  text-align: center;
  text-decoration: none;
}

.fms-card:hover,
.fms-card:focus {
  color: var(--fms-text);
  text-decoration: none;
}

.fms-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(170px, 100%);
  height: clamp(96px, 8.5vw, 140px);
  margin-bottom: 14px;
  color: #111111;
}

.fms-card__media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fms-card p {
  margin: 0;
  font-size: clamp(14px, 1.15vw, 19px);
  line-height: 1.35;
  text-align: center;
}

.fms-card strong {
  margin-bottom: 4px;
  color: var(--fms-accent);
  font-size: clamp(26px, 2.2vw, 40px);
  line-height: 1;
}

.fms-card small {
  display: block;
  margin-top: 6px;
  color: #555555;
  font-size: 15px;
  line-height: 1.3;
}

/* ---------- Imágenes ---------- */
.fms-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
}

.fms-image-grid__item {
  display: block;
  margin: 0;
  min-width: 0;
}

.fms-image-grid__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fms-section--images .fms-content {
  padding: 0;
  align-items: stretch;
  flex-direction: column;
}

.fms-images-head {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 64px) clamp(18px, 5vw, 74px) clamp(20px, 2.6vw, 36px);
  text-align: center;
}

.fms-align--left .fms-images-head {
  margin-left: 0;
  text-align: left;
}

.fms-images-head .fms-lead {
  margin-top: 16px;
}

.fms-section--images .fms-image-grid__item {
  aspect-ratio: 3 / 2;
}

.fms-svg-icon {
  display: block;
  width: 68%;
  height: 68%;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fms-stat__media .fms-svg-icon {
  color: #ffffff;
}

.fms-card__media .fms-svg-icon {
  width: 110px;
  height: 110px;
  color: #111111;
  stroke-width: 2.6;
}

.fms-svg-icon--small {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  stroke-width: 3.4;
}

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  .fms-stat-grid {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    gap: 26px clamp(36px, 7vw, 80px);
  }

  .fms-stat strong {
    font-size: clamp(40px, 5.6vw, 60px);
  }

  .fms-stat span {
    font-size: clamp(16px, 2.2vw, 24px);
  }

  .fms-stat__media,
  .fms-stat__media:has(img) {
    width: clamp(64px, 9vw, 100px);
  }

  /* Texto a la izquierda y logos a la derecha también en tablet: solo se reduce */
  .fms-split {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(20px, 4vw, 48px);
  }

  .fms-split h2 {
    font-size: clamp(24px, 3.4vw, 38px);
  }

  .fms-card-grid {
    gap: clamp(12px, 2.4vw, 28px);
  }

  .fms-card__media {
    height: clamp(72px, 10vw, 120px);
  }

  .fms-card p {
    font-size: clamp(13px, 1.7vw, 17px);
  }
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  .fms-section {
    --fms-bg-image: var(--fms-bg-mobile-image);
  }

  .fms-visual {
    height: min(var(--fms-visual-height), 300px);
    max-height: 45vh;
  }

  .fms-content {
    padding: 28px 18px 34px;
  }

  .fms-section h2 {
    font-size: 27px;
  }

  .fms-section h2 span {
    display: block;
  }

  .fms-lead {
    font-size: 17px;
  }

  .fms-body {
    font-size: 15px;
  }

  .fms-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .fms-button {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }

  .fms-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 20px 14px;
  }

  .fms-stat {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    text-align: center;
  }

  .fms-stat__media,
  .fms-stat__media:has(img) {
    width: 64px;
  }

  .fms-stat strong {
    font-size: 34px;
  }

  .fms-stat span {
    max-width: none;
    font-size: 15px;
    text-align: center;
  }

  .fms-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fms-card__media {
    height: 96px;
  }

  .fms-image-grid {
    grid-template-columns: 1fr;
  }

  .fms-section--images .fms-image-grid__item {
    aspect-ratio: 16 / 10;
  }

  .fms-images-head {
    padding: 28px 18px 20px;
  }
}

/* Móvil pequeño: el bloque de logos baja debajo del texto */
@media (max-width: 599px) {
  .fms-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .fms-card-grid {
    max-width: 420px;
  }
}
