/* ==========================================
   IndexSolar - Bloque Why Tablet
   Clases prefijadas para evitar conflictos.
   Layout: encabezado arriba + beneficios a la izquierda + video a la derecha en tableta.
   ========================================== */

.ixs-why-tab {
  --ixs-green: #5ea33b;
  --ixs-green-1: #78b94f;
  --ixs-green-2: #5b8f3b;
  --ixs-green-3: #2f5e22;
  --ixs-blue: #1d2b53;
  --ixs-text: #3f536e;
  --ixs-pill-bg: #eaf4e3;
  --ixs-section-bg: transparent;
  --ixs-radius-xl: 28px;
  --ixs-radius-lg: 22px;
  --ixs-radius-pill: 999px;
  --ixs-shadow-soft: 0 18px 48px rgba(31, 49, 76, 0.08);

  width: min(100%, 1220px);
  margin: 0 auto;
  padding: clamp(28px, 3.5vw, 52px);
  background: var(--ixs-section-bg);
  box-sizing: border-box;
  font-family: inherit;
}

.ixs-why-tab,
.ixs-why-tab * {
  box-sizing: border-box;
}

.ixs-why-tab__head {
  width: 100%;
  margin-bottom: clamp(26px, 3vw, 38px);
}

.ixs-why-tab__eyebrow {
  margin: 0 0 18px;
  color: var(--ixs-green);
  font-size: clamp(18px, 1.65vw, 28px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ixs-why-tab__title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(34px, 3.7vw, 72px);
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: normal;
  overflow-wrap: anywhere;
}

.ixs-why-tab__title-line {
  display: block;
}

.ixs-why-tab__title-line--blue {
  color: var(--ixs-blue);
}

.ixs-why-tab__title-line--gradient {
  color: var(--ixs-green-2);
  background-image: linear-gradient(90deg, #78b94f 0%, #5b8f3b 45%, #2f5e22 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ixs-why-tab__desc-wrap {
  width: 100%;
  max-width: 100%;
  margin: 24px 0 0;
}

.ixs-why-tab__desc {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.6;
  color: var(--ixs-text);
  letter-spacing: 0.037em;
  text-align: justify;
}

.ixs-why-tab__content {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 3vw, 48px);
  align-items: start;
}

.ixs-why-tab__left {
  --ixs-feature-gap: clamp(28px, 2.8vw, 42px);

  min-width: 0;
  display: grid;
  gap: var(--ixs-feature-gap);
  align-content: start;
}

.ixs-why-tab__right {
  min-width: 0;
  display: grid;
  gap: 22px;
  align-content: start;
}

.ixs-why-tab__feature {
  display: grid;
  gap: 12px;
}

.ixs-why-tab__feature-pill {
  position: relative;
  --ixs-pill-dot-left: 28px;
  --ixs-pill-dot-size-var: 16px;
  --ixs-pill-dot-text-gap: 14px;
  --ixs-pill-group-offset-x: 0px;

  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  min-height: 46px;
  padding: 6px 20px 6px calc(var(--ixs-pill-dot-left) + var(--ixs-pill-dot-size-var) + var(--ixs-pill-dot-text-gap) + var(--ixs-pill-group-offset-x));
  border-radius: var(--ixs-radius-pill);
  background: var(--ixs-pill-bg);
  color: var(--ixs-green);
  font-weight: 700;
  font-size: clamp(18px, 1.7vw, 32px);
  line-height: 1.18;
}

.ixs-why-tab__feature-pill::before {
  content: "";
  position: absolute;
  left: calc(var(--ixs-pill-dot-left) + var(--ixs-pill-group-offset-x));
  top: 50%;
  width: var(--ixs-pill-dot-size-var);
  height: var(--ixs-pill-dot-size-var);
  border-radius: 50%;
  background: var(--ixs-green);
  transform: translateY(-50%);
}

.ixs-why-tab__feature-text {
  margin: 0;
  color: var(--ixs-text);
  font-size: clamp(17px, 1.55vw, 30px);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.ixs-why-tab-video {
  --ixs-video-radius: 30px;
  --ixs-video-shadow: 0 16px 44px rgba(0, 0, 0, 0.08);
  --ixs-video-width: 100%;
  --ixs-play-w: clamp(128px, 12vw, 170px);
  --ixs-play-h: clamp(74px, 6vw, 96px);
  --ixs-play-radius: 22px;
  --ixs-play-img: none;
  --ixs-play-img-hover: none;

  position: relative;
  width: var(--ixs-video-width);
  max-width: 100%;
  justify-self: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ixs-video-radius);
  background: #ffffff;
  box-shadow: var(--ixs-video-shadow);
  background-size: cover;
  background-position: center;
  transition: transform 260ms ease, box-shadow 260ms ease, filter 260ms ease;
}

.ixs-why-tab-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29, 43, 83, 0.22), rgba(29, 43, 83, 0.08), rgba(29, 43, 83, 0));
  pointer-events: none;
  transition: background 240ms ease, opacity 240ms ease;
}

.ixs-why-tab-video__btn {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 180ms ease;
}

.ixs-why-tab-video__play {
  width: var(--ixs-play-w);
  height: var(--ixs-play-h);
  border-radius: var(--ixs-play-radius);
  border: none;
  outline: none;
  background-color: rgba(234, 244, 227, 1);
  background-image: var(--ixs-play-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease, filter 220ms ease;
}

.ixs-why-tab-video__play:hover,
.ixs-why-tab-video__btn:focus-visible .ixs-why-tab-video__play,
.ixs-why-tab-video__btn.is-activating .ixs-why-tab-video__play {
  transform: scale(1.1);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
  background-color: rgba(94, 163, 59, 1);
  background-image: var(--ixs-play-img-hover);
  filter: saturate(1.05);
}

.ixs-why-tab-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

.ixs-why-tab__cases-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 74px;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--ixs-green);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-size: clamp(22px, 2vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  box-shadow: 0 14px 34px rgba(94, 163, 59, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.ixs-why-tab__cases-btn:hover,
.ixs-why-tab__cases-btn:focus-visible {
  background: #538f35;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(94, 163, 59, 0.24);
}

/* Desktop y laptop chica */
@media (max-width: 1180px) {
  .ixs-why-tab {
    padding: 32px;
  }

  .ixs-why-tab__content {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 30px;
  }
}

/* Tableta: mantener beneficios a la izquierda y video a la derecha */
@media (max-width: 1024px) {
  .ixs-why-tab {
    padding: 28px 24px;
  }

  .ixs-why-tab__eyebrow {
    font-size: clamp(17px, 2.1vw, 24px);
  }

  .ixs-why-tab__title {
    font-size: clamp(42px, 5.7vw, 62px);
  }

  .ixs-why-tab__desc {
    font-size: clamp(16px, 1.9vw, 19px);
    line-height: 1.68;
    letter-spacing: 0.02em;
  }

  .ixs-why-tab__content {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 24px;
  }

  .ixs-why-tab__feature-pill {
    --ixs-pill-dot-left: 26px;
    --ixs-pill-dot-size-var: 14px;
    --ixs-pill-dot-text-gap: 14px;
    min-height: 44px;
    font-size: clamp(17px, 1.95vw, 24px);
  }

  .ixs-why-tab__feature-text {
    font-size: clamp(16px, 1.75vw, 20px);
    line-height: 1.45;
  }

  .ixs-why-tab__cases-btn {
    min-height: 66px;
    font-size: clamp(18px, 2.4vw, 26px);
  }
}

/* Tableta compacta: aún lado a lado */
@media (max-width: 820px) {
  .ixs-why-tab__content {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 20px;
  }

  .ixs-why-tab__feature-pill {
    width: 100%;
  }
}

/* Móvil */
@media (max-width: 767px) {
  .ixs-why-tab {
    padding: 24px 18px;
  }

  .ixs-why-tab__eyebrow {
    margin-bottom: 12px;
    font-size: 18px;
  }

  .ixs-why-tab__title {
    font-size: clamp(34px, 9vw, 54px);
    line-height: 1.05;
  }

  .ixs-why-tab__desc {
    font-size: 16px;
    letter-spacing: 0.015em;
  }

  .ixs-why-tab__content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ixs-why-tab__left,
  .ixs-why-tab__right {
    width: 100%;
  }

  .ixs-why-tab__feature-pill {
    width: 100%;
    font-size: clamp(20px, 5.4vw, 28px);
  }

  .ixs-why-tab__feature-text {
    font-size: clamp(18px, 4.6vw, 24px);
    line-height: 1.35;
  }

  .ixs-why-tab-video {
    border-radius: 22px;
  }

  .ixs-why-tab__cases-btn {
    min-height: 64px;
    padding: 16px 18px;
    font-size: clamp(18px, 5vw, 26px);
  }
}


.ixs-why-tab-video.is-activating {
  transform: scale(1.01);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.14);
}

.ixs-why-tab-video.is-activating::after {
  background: linear-gradient(to top, rgba(29, 43, 83, 0.36), rgba(29, 43, 83, 0.14), rgba(29, 43, 83, 0.02));
}

.ixs-why-tab-video__btn.is-activating {
  cursor: progress;
}

.ixs-why-tab-video__btn.is-activating .ixs-why-tab-video__play {
  animation: ixs-why-tab-play-pulse 900ms ease-in-out 1;
}

@keyframes ixs-why-tab-play-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
  }
  45% {
    transform: scale(1.12);
    box-shadow: 0 30px 72px rgba(0, 0, 0, 0.24);
  }
  100% {
    transform: scale(1.1);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.22);
  }
}

.ixs-why-tab-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  z-index: 3;
}

/* Reproductor YouTube precargado: queda detrás del botón verde hasta el clic. */
.ixs-why-tab-video__yt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 120ms ease;
}

.ixs-why-tab-video.is-player-active .ixs-why-tab-video__yt {
  opacity: 1;
  pointer-events: auto;
}

.ixs-why-tab-video__yt-slot,
.ixs-why-tab-video__yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
