/* INTEMPO — experimento: galería de soluciones en movimiento */

.is-soluciones .scroll-indicator {
  opacity: 1;
}

.sol-flow-stage {
  position: relative;
  background: var(--surface);
  color: var(--blue-deep);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sol-flow-stage__copy {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 0.85rem) var(--gutter) 1rem;
}

.sol-flow-stage__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
  max-width: none;
}

.sol-flow-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.sol-flow-index button {
  appearance: none;
  border: 1px solid rgba(0, 45, 74, 0.14);
  background: #fff;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.sol-flow-index button:hover,
.sol-flow-index button:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
}

.sol-flow-index button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.sol-flow-index button.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.sol-flow-stage__canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: min(28rem, 52vh);
  height: auto;
  overflow: hidden;
}

.sol-flow__nav {
  position: absolute;
  right: clamp(0.7rem, 1.8vw, 1.35rem);
  top: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transform: translateY(-50%);
}

.sol-flow__nav-btn {
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid rgba(0, 45, 74, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-deep);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 45, 74, 0.12);
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.sol-flow__nav-btn svg {
  width: 0.82rem;
  height: 0.82rem;
  display: block;
}

.sol-flow__nav-btn:hover,
.sol-flow__nav-btn:focus-visible {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: scale(1.06);
}

.sol-flow__nav-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.sol-flow {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(2.75rem, 5vw, 5rem);
  padding: 0.75rem clamp(2.5rem, 6vw, 6rem) 1.25rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.sol-flow__col {
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 5vw, 4.5rem);
  width: 100%;
  height: max-content;
  align-self: start;
  will-change: transform;
}

.sol-flow__col--up,
.sol-flow__col--down {
  animation: sol-flow-up 160s linear infinite;
}

.sol-flow__col--down {
  margin-top: 5rem;
  animation-direction: reverse;
}

.sol-flow__col--up {
  margin-top: 0;
}

.sol-flow__col[hidden] {
  display: none;
}

.sol-flow:has(.sol-flow__col[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.sol-flow:has(.sol-flow__col[hidden]) .sol-flow__col:not([hidden]) {
  margin-top: 0;
  animation-direction: reverse;
}

.sol-flow__break {
  flex: 0 0 auto;
  padding: 0.15rem 0.15rem 0.1rem;
  max-width: 40rem;
}

.sol-flow__break-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1.05vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.sol-flow__break-copy {
  margin-top: 0.75rem;
}

.sol-flow__break-copy p {
  margin: 0 0 0.55rem;
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.3vw, 1.175rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--blue-deep);
}

.sol-flow__break-copy ul {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.sol-flow__break-copy li {
  position: relative;
  padding: 0.32rem 0 0.32rem 0.95rem;
  font-size: clamp(0.88rem, 1.05vw, 0.98rem);
  line-height: 1.45;
  color: var(--blue-deep);
}

.sol-flow__break-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--orange);
}

.sol-flow:has(.sol-flow__break:hover) .sol-flow__col {
  animation-play-state: paused;
}

.sol-flow.is-paused .sol-flow__col,
.sol-flow.is-nudging .sol-flow__col,
.sol-flow:has(.sol-flow__item:hover) .sol-flow__col,
.sol-flow:has(.sol-flow__item:focus-within) .sol-flow__col {
  animation-play-state: paused;
}

.sol-flow__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  flex: 0 0 auto;
  background: #dfe5ea;
  border-radius: 16px;
  cursor: pointer;
  isolation: isolate;
  box-shadow:
    0 4px 12px rgba(0, 45, 74, 0.1),
    0 22px 48px rgba(0, 45, 74, 0.18);
  transition: box-shadow 0.35s var(--ease-out), opacity 0.3s ease;
}

.sol-flow.is-paused .sol-flow__item:not(:hover):not(.is-open):not(:focus-within),
.sol-flow:has(.sol-flow__item:hover) .sol-flow__item:not(:hover),
.sol-flow:has(.sol-flow__item:focus-within) .sol-flow__item:not(:focus-within) {
  opacity: 0.82;
}

.sol-flow__item:hover,
.sol-flow__item:focus-within,
.sol-flow__item.is-open {
  z-index: 4;
  opacity: 1;
  box-shadow:
    0 12px 28px rgba(0, 45, 74, 0.14),
    0 36px 64px rgba(0, 45, 74, 0.26);
}

.sol-flow__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.4s var(--ease-out);
}

.sol-flow__item img[src*="casos-exito-2/telecomunicaciones/"] {
  object-position: center top;
}

.sol-flow__item:hover img,
.sol-flow__item:focus-within img,
.sol-flow__item.is-open img {
  transform: scale(1.06);
}

.sol-flow__item--tall {
  height: min(58vh, 34rem);
}

.sol-flow__item--wide {
  height: min(44vh, 26rem);
}

.sol-flow__item--sq {
  height: min(52vh, 30rem);
}

.sol-flow__panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem 1.3rem 1.25rem;
  background: linear-gradient(180deg, rgba(0, 45, 74, 0) 48%, rgba(0, 45, 74, 0.88) 100%);
  color: #fff;
  pointer-events: none;
  transition: background 0.35s var(--ease-out);
  overflow: hidden;
}

.sol-flow__item:hover .sol-flow__panel,
.sol-flow__item:focus-within .sol-flow__panel,
.sol-flow__item.is-open .sol-flow__panel {
  background: linear-gradient(180deg, rgba(0, 45, 74, 0.58) 0%, rgba(0, 45, 74, 0.96) 100%);
}

.sol-flow__label {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.sol-flow__extra {
  display: grid;
  grid-template-rows: 0fr;
  position: relative;
  z-index: 1;
  min-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
  transition: grid-template-rows 0.4s var(--ease-out), opacity 0.28s ease, margin 0.35s var(--ease-out);
}

.sol-flow__item:hover .sol-flow__extra,
.sol-flow__item:focus-within .sol-flow__extra,
.sol-flow__item.is-open .sol-flow__extra {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 0.85rem;
  max-height: calc(100% - 4.5rem);
}

.sol-flow__extra-inner {
  min-height: 0;
  overflow: hidden;
}

.sol-flow__desc {
  margin: 0 0 0.7rem;
  font-size: clamp(0.95rem, 1.4vw, 1.22rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.sol-flow__extra ul {
  margin: 0;
}

.sol-flow__extra li {
  padding: 0.42rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: clamp(0.88rem, 1.15vw, 1rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

@keyframes sol-flow-up {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -50%, 0);
  }
}

.sol-flow-stage.is-static .sol-flow__col {
  animation: none;
  transform: none;
  will-change: auto;
  margin-top: 0;
}

.sol-flow-stage.is-static .sol-flow {
  position: relative;
  height: auto;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.sol-flow-stage.is-static {
  display: block;
  min-height: 0;
  overflow: visible;
}

.sol-flow-stage.is-static .sol-flow-stage__canvas {
  height: auto;
  min-height: auto;
  overflow: visible;
}

.sol-flow-stage.is-static .sol-flow__nav {
  display: none;
}

@media (max-width: 900px) {
  .sol-flow-stage {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .sol-flow-stage__canvas {
    flex: none;
    min-height: 0;
    height: auto;
    overflow: visible;
  }

  .sol-flow {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    padding: 0 var(--gutter) 2rem;
  }

  .sol-flow__col {
    gap: 1.1rem;
    min-width: 0;
  }

  .sol-flow__col--up,
  .sol-flow__col--down {
    animation: none;
    margin-top: 0;
  }

  .sol-flow-stage__copy {
    position: sticky;
    top: var(--header-h);
    z-index: 6;
    background: var(--surface);
    padding: 0.7rem var(--gutter) 0.75rem;
  }

  .sol-flow-stage__copy h2 {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
  }

  .sol-flow-index {
    margin-top: 0.65rem;
    gap: 0.3rem;
  }

  .sol-flow-index button {
    font-size: 0.7rem;
    padding: 0.42rem 0.6rem;
  }

  .sol-flow__item {
    min-width: 0;
  }

  .sol-flow__item:hover .sol-flow__extra,
  .sol-flow__item:focus-within .sol-flow__extra {
    grid-template-rows: 0fr;
    opacity: 0;
    margin: 0;
  }

  .sol-flow__item:hover .sol-flow__panel,
  .sol-flow__item:focus-within .sol-flow__panel {
    background: linear-gradient(180deg, rgba(0, 45, 74, 0) 48%, rgba(0, 45, 74, 0.88) 100%);
  }

  .sol-flow__item.is-open {
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .sol-flow__item.is-open img {
    position: relative;
    inset: auto;
    height: min(36vh, 14.5rem);
    flex: 0 0 auto;
  }

  .sol-flow__item.is-open .sol-flow__panel {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    background: rgba(0, 45, 74, 0.96);
    padding: 1rem 0.9rem 1.05rem;
  }

  .sol-flow__item.is-open .sol-flow__extra {
    display: block;
    grid-template-rows: none;
    opacity: 1;
    max-height: none;
    overflow: visible;
    margin-bottom: 0.75rem;
  }

  .sol-flow__item.is-open .sol-flow__extra-inner {
    overflow: visible;
  }

  .sol-flow__item.is-open .sol-flow__desc,
  .sol-flow__item.is-open .sol-flow__extra li {
    overflow-wrap: anywhere;
  }

  .sol-flow__item.is-open .sol-flow__desc {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .sol-flow__item.is-open .sol-flow__extra li {
    font-size: 0.82rem;
    padding: 0.32rem 0;
  }

  .sol-flow__panel {
    padding: 0.85rem 0.75rem 0.8rem;
  }

  .sol-flow__label {
    font-size: clamp(0.82rem, 3.4vw, 1rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .sol-flow__item--tall {
    height: min(38vh, 16.5rem);
  }

  .sol-flow__item--wide {
    height: min(28vh, 13rem);
  }

  .sol-flow__item--sq {
    height: min(34vh, 15rem);
  }

  .sol-flow__nav {
    display: none;
  }
}
