/**
 * Infraestructura (Equipo e instalaciones) – página dinámica.
 */

.fi-page-infra {
  --ei-navy: #0d2140;
  --ei-navy-soft: #1a3a66;
  --ei-orange: #f27a21;
  --ei-muted: #5a6b84;
  --ei-sky: #eef3f9;
  background:
    radial-gradient(ellipse at 10% 8%, rgba(242, 122, 33, 0.06), transparent 42%),
    linear-gradient(180deg, #f7fafc 0%, #fff 28%, #f5f8fc 100%);
}

/* ---------- Hero ---------- */
.fi-ei-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(34rem, 78vh, 44rem);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 88% 12%, rgba(242, 122, 33, 0.12), transparent 42%),
    radial-gradient(ellipse at 8% 80%, rgba(13, 33, 64, 0.05), transparent 45%),
    linear-gradient(155deg, #f8fbff 0%, #eef3f9 48%, #f7fafc 100%);
}

.fi-ei-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.fi-ei-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%);
}

.fi-ei-hero__glow {
  position: absolute;
  inset: auto -12% -30% 40%;
  height: 70%;
  background: radial-gradient(circle, rgba(242, 122, 33, 0.14), transparent 62%);
  animation: fi-ei-glow 8s ease-in-out infinite alternate;
}

.fi-ei-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}

.fi-ei-hero__orb--a {
  width: 140px;
  height: 140px;
  top: 16%;
  right: 40%;
  background: radial-gradient(circle, rgba(242, 122, 33, 0.28), transparent 70%);
  animation: fi-ei-float 9s ease-in-out infinite;
}

.fi-ei-hero__orb--b {
  width: 90px;
  height: 90px;
  bottom: 22%;
  left: 8%;
  background: radial-gradient(circle, rgba(13, 33, 64, 0.16), transparent 70%);
  animation: fi-ei-float 11s ease-in-out infinite reverse;
}

.fi-ei-hero__dots {
  position: absolute;
  inset: 12% 8% auto auto;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(rgba(13, 33, 64, 0.14) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: 0.45;
}

.fi-ei-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: calc(var(--fi-header-height, 5.5rem) + 1rem) 0 4.25rem;
}

.fi-ei-hero__copy {
  justify-self: end;
  width: 100%;
  max-width: 34rem;
  padding-left: clamp(1.25rem, 5vw, 3.5rem);
  padding-right: 0.5rem;
}

.fi-ei-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ei-orange);
}

.fi-ei-hero__label-icon {
  display: inline-flex;
  color: var(--ei-orange);
}

.fi-ei-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 4.8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ei-navy);
}

.fi-ei-hero__title-lead {
  display: block;
  font-family: var(--fi-font-script);
  font-weight: 700;
  font-size: 0.78em;
  color: var(--ei-orange);
  line-height: 1.15;
  margin-bottom: 0.1em;
}

.fi-ei-hero__title-main {
  display: inline;
  color: var(--ei-navy);
}

.fi-ei-hero__heart {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.28rem;
  color: var(--ei-orange);
  animation: fi-ei-pulse 2.2s ease-in-out infinite;
}

.fi-ei-hero__heart svg {
  width: 0.5em;
  height: 0.5em;
  fill: currentColor;
  stroke: none;
}

.fi-ei-hero__lead {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ei-muted);
}

.fi-ei-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.fi-ei-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fi-ei-hero__stat {
  min-width: 7rem;
  padding: 0.8rem 0.95rem;
  background: #fff;
  border: 1px solid rgba(13, 33, 64, 0.08);
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(13, 33, 64, 0.06);
}

.fi-ei-hero__stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ei-navy);
  letter-spacing: -0.02em;
}

.fi-ei-hero__stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ei-muted);
}

.fi-ei-hero__stage {
  position: relative;
  min-height: clamp(320px, 42vw, 460px);
}

.fi-ei-hero__portrait {
  position: absolute;
  inset: 4% 6% 10% 16%;
  margin: 0;
  border-radius: 1.6rem 1.6rem 1.6rem 42%;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(13, 33, 64, 0.18);
}

.fi-ei-hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.8s ease;
}

.fi-ei-hero__stage:hover .fi-ei-hero__portrait img {
  transform: scale(1.06);
}

.fi-ei-hero__mosaic {
  position: absolute;
  width: clamp(130px, 26%, 180px);
  aspect-ratio: 1;
  left: 0;
  bottom: 4%;
  z-index: 2;
}

.fi-ei-hero__mosaic-ring {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  border: 2px dashed rgba(242, 122, 33, 0.45);
  animation: fi-ei-spin 18s linear infinite;
}

.fi-ei-hero__mosaic-photo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 18px 40px rgba(13, 33, 64, 0.18);
}

.fi-ei-hero__mosaic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fi-ei-hero__face {
  position: absolute;
  top: 10%;
  right: 2%;
  z-index: 3;
  width: clamp(72px, 16%, 110px);
  margin: 0;
  aspect-ratio: 1;
  border-radius: 1.15rem;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 16px 36px rgba(13, 33, 64, 0.16);
  animation: fi-ei-float 7s ease-in-out infinite;
}

.fi-ei-hero__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fi-ei-hero__spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ei-orange);
  box-shadow: 0 0 12px rgba(242, 122, 33, 0.55);
  animation: fi-ei-spark 2.8s ease-in-out infinite;
  z-index: 3;
}

.fi-ei-hero__spark--1 { top: 8%; right: 6%; }
.fi-ei-hero__spark--2 { top: 42%; right: -4%; width: 6px; height: 6px; animation-delay: -1s; }

.fi-ei-hero__bubble {
  position: absolute;
  top: 2%;
  left: -2%;
  z-index: 3;
  max-width: 12.5rem;
  padding: 0.8rem 0.95rem;
  background: #fff;
  border-radius: 1.1rem;
  box-shadow: 0 16px 36px rgba(13, 33, 64, 0.14);
  animation: fi-ei-float 6.5s ease-in-out infinite;
}

.fi-ei-hero__bubble-icon {
  display: inline-flex;
  color: var(--ei-orange);
  margin-bottom: 0.2rem;
}

.fi-ei-hero__bubble p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ei-navy);
}

.fi-ei-hero__bubble span {
  color: var(--ei-orange);
}

.fi-ei-hero__chip {
  position: absolute;
  right: 2%;
  bottom: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(13, 33, 64, 0.14);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ei-navy);
}

.fi-ei-hero__chip-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 122, 33, 0.12);
  color: var(--ei-orange);
}

.fi-ei-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  line-height: 0;
  color: #fff;
  pointer-events: none;
}

.fi-ei-hero__wave svg {
  width: 100%;
  height: clamp(48px, 7vw, 80px);
  display: block;
}

.fi-page-infra .fi-ei-hero + .fi-about-subnav-wrap {
  margin-top: -2.35rem;
  position: relative;
  z-index: 12;
  padding-bottom: 0.5rem;
}

/* ---------- Section heads ---------- */
.fi-ei-section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.35rem;
}

.fi-ei-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ei-orange);
}

.fi-ei-section-head h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ei-navy);
  line-height: 1.15;
}

.fi-ei-section-head h2 span {
  color: var(--ei-orange);
}

.fi-ei-section-head p {
  margin: 0;
  color: var(--ei-muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* ---------- Team ---------- */
.fi-ei-team {
  padding: 3rem 0 2.5rem;
  background: #fff;
}

.fi-ei-team__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.fi-ei-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(13, 33, 64, 0.07);
  border-radius: 1.2rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 14px 36px rgba(13, 33, 64, 0.06);
  transition: box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.fi-ei-card:hover {
  box-shadow: 0 24px 48px rgba(13, 33, 64, 0.12);
}

.fi-ei-card__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--ei-sky);
}

.fi-ei-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.fi-ei-card:hover .fi-ei-card__media img {
  transform: scale(1.07);
}

.fi-ei-card__glow {
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(13, 33, 64, 0.18));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.fi-ei-card:hover .fi-ei-card__glow {
  opacity: 1;
}

.fi-ei-card__body {
  padding: 1rem 0.9rem 1.2rem;
}

.fi-ei-card__body h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--ei-navy);
  line-height: 1.3;
}

.fi-ei-card__body span {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ei-orange);
  line-height: 1.4;
}

/* ---------- Facilities ---------- */
.fi-ei-facilities {
  padding: 2.75rem 0 3.5rem;
  background:
    radial-gradient(ellipse at 90% 10%, rgba(242, 122, 33, 0.07), transparent 40%),
    linear-gradient(180deg, #f5f8fc 0%, #fff 100%);
}

.fi-ei-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.fi-ei-gallery__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.2rem;
  overflow: hidden;
  background: var(--ei-sky);
  cursor: zoom-in;
  box-shadow: 0 16px 40px rgba(13, 33, 64, 0.08);
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.fi-ei-gallery__item--wide {
  grid-column: 1 / -1;
}

.fi-ei-gallery__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 52px rgba(13, 33, 64, 0.14);
}

.fi-ei-gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.fi-ei-gallery__item--wide img {
  aspect-ratio: 21 / 9;
}

.fi-ei-gallery__item:hover img {
  transform: scale(1.06);
}

.fi-ei-gallery__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 20, 40, 0.78));
  opacity: 0.85;
  pointer-events: none;
}

.fi-ei-gallery__caption {
  position: absolute;
  left: 1rem;
  right: 3.5rem;
  bottom: 1rem;
  z-index: 1;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.fi-ei-gallery__expand {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ei-navy);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, background 0.25s ease;
}

.fi-ei-gallery__item:hover .fi-ei-gallery__expand {
  transform: scale(1.08);
  background: var(--ei-orange);
  color: #fff;
}

/* ---------- Lightbox (pantalla completa) ---------- */
.fi-page-infra .fi-facilities-lightbox,
.fi-facilities-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fi-page-infra .fi-facilities-lightbox.is-open,
.fi-page-infra .fi-facilities-lightbox:not([hidden]),
.fi-facilities-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fi-facilities-lightbox[hidden] {
  display: none !important;
}

.fi-facilities-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 14, 28, 0.92);
  cursor: pointer;
}

.fi-facilities-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(100vw - 1.5rem, 1180px);
  max-height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  animation: fi-ei-lightbox-in 0.35s ease;
}

.fi-facilities-lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.fi-facilities-lightbox__figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 6.5rem);
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 0.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.fi-facilities-lightbox__figure figcaption {
  max-width: 40rem;
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 650;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.fi-facilities-lightbox__close,
.fi-facilities-lightbox__nav {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ei-navy, #0d2140);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.fi-facilities-lightbox__close {
  top: 1rem;
  right: 1rem;
  position: fixed;
}

.fi-facilities-lightbox__nav--prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  position: fixed;
}

.fi-facilities-lightbox__nav--next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  position: fixed;
}

.fi-facilities-lightbox__counter {
  position: fixed;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
  z-index: 2;
}

body.fi-lightbox-open {
  overflow: hidden;
}

/* ---------- Reveals ---------- */
.fi-page-infra [data-fi-ei-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fi-page-infra [data-fi-ei-reveal="right"] {
  transform: translateX(28px);
}

.fi-page-infra [data-fi-ei-reveal="up"] {
  transform: translateY(28px) scale(0.98);
}

.fi-page-infra [data-fi-ei-reveal].is-in {
  opacity: 1;
  transform: none;
}

@keyframes fi-ei-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes fi-ei-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fi-ei-glow {
  from { opacity: 0.55; transform: translateX(0); }
  to { opacity: 1; transform: translateX(-5%); }
}

@keyframes fi-ei-spin {
  to { transform: rotate(360deg); }
}

@keyframes fi-ei-spark {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes fi-ei-lightbox-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .fi-ei-team__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .fi-ei-hero {
    min-height: auto;
  }

  .fi-ei-hero__inner {
    grid-template-columns: 1fr;
    padding-bottom: 3.5rem;
  }

  .fi-ei-hero__copy {
    justify-self: stretch;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .fi-ei-hero__stage {
    min-height: 300px;
    order: -1;
  }

  .fi-ei-hero__portrait {
    inset: 6% 6% 12% 14%;
    border-radius: 1.35rem 1.35rem 38% 1.35rem;
  }

  .fi-ei-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fi-ei-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fi-ei-hero__actions .fi-btn {
    justify-content: center;
  }

  .fi-ei-hero__bubble,
  .fi-ei-hero__face {
    display: none;
  }

  .fi-ei-team__grid,
  .fi-ei-gallery {
    grid-template-columns: 1fr;
  }

  .fi-ei-gallery__item--wide {
    grid-column: auto;
  }

  .fi-ei-gallery__item--wide img {
    aspect-ratio: 16 / 10;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fi-ei-hero__glow,
  .fi-ei-hero__orb,
  .fi-ei-hero__heart,
  .fi-ei-hero__bubble,
  .fi-ei-hero__face,
  .fi-ei-hero__mosaic-ring,
  .fi-ei-hero__spark,
  .fi-ei-card,
  .fi-ei-gallery__item,
  .fi-ei-gallery__item img {
    animation: none !important;
    transition: none !important;
  }

  .fi-page-infra [data-fi-ei-reveal] {
    opacity: 1;
    transform: none;
  }
}
