.infra-services {
  padding: clamp(72px, 8vw, 112px) 24px 96px;
  background: #f6f8fa;
  font-family: 'Poppins', sans-serif;
}
.infra-services__inner { max-width: 1160px; margin: 0 auto; }
.infra-services__eyebrow {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 12px; color: #9b1b58;
  font-size: 11px; font-weight: 600; letter-spacing: .15em;
}
.infra-services__eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #df2454;
}
.infra-services__heading {
  max-width: 620px; margin: 0 0 36px; color: #991956;
  font-size: clamp(34px, 3.5vw, 50px); font-weight: 600; line-height: 1.08;
}
.infra-services__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.infra-services[data-count="4"] .infra-services__inner { max-width: 1196px; }
.infra-services__grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.infra-services__grid[data-count="4"] .infra-services__card { aspect-ratio: 588 / 360; }
.infra-services__grid[data-count="5"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.infra-services__grid[data-count="5"] > .infra-services__card { grid-column: span 2; }
.infra-services__grid[data-count="5"] > .infra-services__card:nth-last-child(2) { grid-column: 2 / span 2; }
.infra-services__grid[data-count="5"] > .infra-services__card:last-child { grid-column: 4 / span 2; }
.infra-services__card {
  position: relative; isolation: isolate; display: block; width: 100%;
  aspect-ratio: 1.06; overflow: hidden; border: 0; border-radius: 18px;
  padding: 0; background: #101b25; color: #fff; text-align: left;
  cursor: pointer;
}
.infra-services__photo,
.infra-services__veil,
.infra-services__wine {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.infra-services__photo {
  z-index: 0; object-fit: cover;
}
.infra-services__veil {
  z-index: 1;
  background: linear-gradient(180deg, rgba(4, 12, 20, .08) 0%, rgba(4, 12, 20, .18) 46%, rgba(4, 12, 20, .84) 100%);
  opacity: 1; transition: opacity 300ms ease-out;
}
.infra-services__wine {
  z-index: 1;
  background: url('../img/infraestructura/servicios/degradado-hover.png') center / cover no-repeat;
  opacity: 0; transition: opacity 300ms ease-out;
}
.infra-services__title {
  position: absolute; z-index: 2; left: 22px; right: 72px; bottom: 23px;
  font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; line-height: 1.25;
}
.infra-services__indicator {
  position: absolute; z-index: 2; right: 20px; bottom: 20px; width: 42px; height: 42px;
}
.infra-services__indicator img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  transition: opacity 300ms ease-out;
}
.infra-services__indicator img:last-child { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .infra-services__card:hover .infra-services__wine { opacity: 1; }
  .infra-services__card:hover .infra-services__veil { opacity: 0; }
  .infra-services__card:hover .infra-services__indicator img:first-child { opacity: 0; }
  .infra-services__card:hover .infra-services__indicator img:last-child { opacity: 1; }
}
.infra-services__card:focus-visible { outline: 3px solid #df2454; outline-offset: 4px; }
.infra-services__card:focus-visible .infra-services__wine { opacity: 1; }
.infra-services__card:focus-visible .infra-services__veil { opacity: 0; }
.infra-services__card:focus-visible .infra-services__indicator img:first-child { opacity: 0; }
.infra-services__card:focus-visible .infra-services__indicator img:last-child { opacity: 1; }
@media (max-width: 700px) {
  .infra-services { padding: 64px 20px 76px; }
  .infra-services__heading { margin-bottom: 28px; }
  .infra-services__grid,
  .infra-services__grid[data-count="4"],
  .infra-services__grid[data-count="5"] {
    grid-template-columns: 1fr; gap: 16px; max-width: none;
  }
  .infra-services__grid[data-count="5"] > .infra-services__card,
  .infra-services__grid[data-count="5"] > .infra-services__card:nth-last-child(2),
  .infra-services__grid[data-count="5"] > .infra-services__card:last-child { grid-column: 1; }
  .infra-services__card { max-width: 520px; margin: 0 auto; }
  .infra-services__grid[data-count="4"] .infra-services__card { aspect-ratio: 1.06; }
}
@media (prefers-reduced-motion: reduce) {
  .infra-services__veil, .infra-services__wine,
  .infra-services__indicator img { transition: none; }
}

.infra-service-modal[hidden] { display: none; }
.infra-service-modal {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 18px; overflow-y: auto; background: rgba(13, 17, 24, .7);
  font-family: 'Poppins', sans-serif;
}
.infra-service-modal__panel {
  position: relative; display: grid; grid-template-columns: 43% 57%;
  width: min(1100px, 100%); height: auto; max-height: calc(100dvh - 36px);
  overflow: hidden; border-radius: 22px;
  background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}
.infra-service-modal__media {
  position: relative; min-width: 0; overflow: hidden; background: #52616b;
}
.infra-service-modal__media::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 15, 24, .16), transparent 48%, rgba(22, 15, 28, .68));
}
.infra-service-modal__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 350ms ease-out;
}
.infra-service-modal__slide.is-active { opacity: 1; }
#administracion-infraestructuraModal .infra-service-modal__slide[src$="/videowall.jpeg"] {
  object-position: 82% center;
}
#obra-civilModal .infra-service-modal__slide[src$="/obra_civil3.jpg"] {
  object-position: right center;
}
#mesa-ayudaModal .infra-service-modal__slide[src$="/mesa-ayuda.png"] {
  object-position: 0% center;
}
@media (min-width: 701px) {
  #continuidadModal .infra-service-modal__slide[src$="/continuidad3.jpg"] {
    object-fit: contain;
    object-position: center top;
    background: #d9d9d9;
  }
}
.infra-service-modal__controls {
  position: absolute; right: 20px; bottom: 20px; left: 20px; z-index: 2;
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
}
.infra-service-modal__dots { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.infra-service-modal__dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .45); cursor: pointer;
  transition: width 250ms ease, background-color 250ms ease;
}
.infra-service-modal__dot[aria-current="true"] { width: 24px; background: #fff; }
.infra-service-modal__arrows { display: flex; gap: 8px; }
.infra-service-modal__arrow,
.infra-service-modal__close {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: #f1f2f4; color: #20232a;
  cursor: pointer;
}
.infra-service-modal__arrow svg,
.infra-service-modal__close svg { width: 18px; height: 18px; }
.infra-service-modal__arrow:hover,
.infra-service-modal__close:hover { background: #e4e5e9; }
.infra-service-modal__close { position: absolute; top: 20px; right: 20px; z-index: 3; }
.infra-service-modal__content {
  display: flex; flex-direction: column; min-width: 0; overflow-y: auto;
  padding: 76px clamp(34px, 4vw, 58px) 62px;
}
.infra-service-modal__eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 22px;
  color: #a51c57; font-size: 12px; font-weight: 600; letter-spacing: .16em;
}
.infra-service-modal__eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #df2454;
}
.infra-service-modal__title {
  margin: 0 36px 16px 0; color: #22252b;
  font-size: clamp(27px, 2.6vw, 36px); font-weight: 600; line-height: 1.13;
}
.infra-service-modal__rule { height: 1px; margin: 0 0 18px; background: #e4e5e8; }
.infra-service-modal__features {
  display: grid; gap: 11px; margin: 0 0 32px; padding: 0; list-style: none;
}
.infra-service-modal__features li {
  display: flex; align-items: start; gap: 14px;
  color: #25272c; font-family: 'Poppins', sans-serif;
  font-size: 15px; font-weight: 400; line-height: 1.5; letter-spacing: 0;
}
.infra-service-modal__features li::before {
  content: ''; flex: none; width: 10px; height: 10px; margin-top: 6px;
  border-radius: 50%; background: #8f3b64;
}
.infra-service-modal__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  align-self: start; min-height: 48px; padding: 0 24px;
  border-radius: 99px; background: #8f3b64; color: #fff;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.infra-service-modal__cta:hover { background: #a34673; }
.infra-service-modal__cta svg { width: 17px; height: 17px; }
.infra-service-modal button:focus-visible,
.infra-service-modal a:focus-visible { outline: 2px solid #df2454; outline-offset: 3px; }
@media (max-width: 700px) {
  .infra-service-modal { padding: 12px; }
  .infra-service-modal__panel {
    display: flex; flex-direction: column; width: min(540px, 100%);
    height: auto; min-height: 0; max-height: calc(100dvh - 24px); overflow-y: auto;
  }
  .infra-service-modal__media { height: 34svh; min-height: 220px; flex: none; }
  .infra-service-modal__content { padding: 30px 24px 32px; overflow: visible; }
  .infra-service-modal__title { font-size: clamp(24px, 6vw, 32px); }
  .infra-service-modal__close { top: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .infra-service-modal__slide, .infra-service-modal__dot { transition: none; }
}
