/* =========================================================================
   APP DEVELOPMENT — LISTOYA FEATURED BLOCK (UI-APP-LISTOYA-01)
   Reuses the approved ListoYA hero visual system (see frontend/css/home.css,
   "FEATURED PROJECT — LISTOYA HERO") on the App Development page, between
   "Lo que construimos" and "Preguntas frecuentes". All selectors are scoped
   under .rn-app-listoya so nothing here touches global elements/components.
   The phone/demo classes (.listoya-phone*, .listoya-hero__demo, #listoya-video)
   are kept as-is because js/main.js already wires the YouTube demo activation
   to those exact hooks — reusing them avoids adding page-specific JS.
   ========================================================================= */
.rn-app-listoya {
  position: relative;
  overflow: hidden;
}

.rn-app-listoya__container {
  position: relative;
}

.rn-app-listoya__stage {
  position: relative;
  container-type: inline-size;
  container-name: rn-app-listoya-stage;
  width: 100%;
  aspect-ratio: 1672 / 941;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: clamp(14px, 1.8vw, 24px);
  overflow: hidden;
  isolation: isolate;
  background: #f5f7fc;
  box-shadow: 0 30px 70px rgba(15, 56, 130, 0.14);
}

.rn-app-listoya__artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* --- Static center phone (shared hooks with js/main.js) --- */
.rn-app-listoya .listoya-phone {
  position: absolute;
  z-index: 3;
  left: 54.01%;
  top: 5.38cqw;
  width: 18.72%;
  height: 42.46cqw;
  padding: 0.66cqw;
  border-radius: 2.9cqw;
  background: linear-gradient(160deg, #1c1c22 0%, #050507 55%, #17171d 100%);
  box-shadow:
    0 1.4cqw 3.4cqw rgba(7, 21, 47, 0.42),
    inset 0 0 0 0.2cqw rgba(255, 255, 255, 0.08);
  scroll-margin-top: 120px;
}

.rn-app-listoya .listoya-phone__island {
  position: absolute;
  top: 1.35cqw;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 34%;
  height: 1.7cqw;
  border-radius: 999px;
  background: #050507;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rn-app-listoya .listoya-phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2.3cqw;
  overflow: hidden;
  background: #04122e;
}

.rn-app-listoya .listoya-phone__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #0649ef;
  pointer-events: none;
}

.rn-app-listoya .listoya-phone__login {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.rn-app-listoya .listoya-phone__play {
  position: relative;
  z-index: 2;
  width: 3.8cqw;
  height: 3.8cqw;
  min-width: 28px;
  min-height: 28px;
  max-width: 52px;
  max-height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(4, 21, 70, 0.22);
  box-shadow: 0 0.8cqw 2cqw rgba(3, 19, 70, 0.25);
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}

.rn-app-listoya .listoya-phone__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 0.55cqw solid transparent;
  border-bottom: 0.55cqw solid transparent;
  border-left: 0.82cqw solid #fff;
  transform: translate(-35%, -50%);
}

.rn-app-listoya .listoya-phone__play:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* --- Eyebrow: sits in the empty band above the baked artwork title --- */
.rn-app-listoya__eyebrow {
  position: absolute;
  z-index: 4;
  left: 4.6cqw;
  top: 13.4cqw;
  display: inline-flex;
  margin: 0;
  color: #2563eb;
  font-weight: 900;
  font-size: clamp(9px, 1.25cqw, 16px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Left overlay content block (real, translatable HTML) --- */
.rn-app-listoya__content {
  position: absolute;
  z-index: 4;
  left: 4.6cqw;
  top: 36cqw;
  width: 31.5cqw;
}

.rn-app-listoya__description {
  margin: 0;
  color: #1e2b4a;
  font-size: clamp(10.5px, 1.5cqw, 21px);
  line-height: 1.45;
  font-weight: 600;
}

.rn-app-listoya__chips {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.55cqw, 9px);
  margin: clamp(8px, 1cqw, 16px) 0 0;
  padding: 0;
  list-style: none;
}

.rn-app-listoya__chips li {
  display: inline-flex;
  align-items: center;
  padding: clamp(2px, 0.35cqw, 6px) clamp(7px, 1cqw, 15px);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1e2b4a;
  font-size: clamp(8.5px, 1.05cqw, 14px);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 56, 130, 0.06);
}

.rn-app-listoya__actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 0.8cqw, 13px);
  margin-top: clamp(9px, 1.2cqw, 18px);
}

.rn-app-listoya__actions .button {
  padding: clamp(5px, 0.65cqw, 11px) clamp(10px, 1.4cqw, 22px);
  font-size: clamp(9.5px, 1.1cqw, 15px);
}

.rn-app-listoya__play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.35em 0 0.35em 0.58em;
  border-color: transparent transparent transparent currentColor;
}

/* --- Target of "Qué tipo de apps desarrollamos" anchor: keep the heading
   clear of the sticky header when reached via #apps-types-title. --- */
#apps-types-title {
  scroll-margin-top: 120px;
}

/* --- Mobile: same reflow strategy as the approved Home block. The stage
   grows taller than the artwork; the artwork keeps its natural ratio at the
   top and the content block flows below it inside the same panel. --- */
@media (max-width: 767px) {
  .rn-app-listoya__stage {
    aspect-ratio: auto;
  }

  .rn-app-listoya__artwork {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 1672 / 941;
  }

  .rn-app-listoya__content {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    padding: 16px 18px 20px;
  }

  .rn-app-listoya__description {
    font-size: clamp(14px, 4vw, 17px);
  }

  .rn-app-listoya__chips {
    gap: 7px;
    margin-top: 12px;
  }

  .rn-app-listoya__chips li {
    padding: 6px 12px;
    font-size: 12px;
  }

  .rn-app-listoya__actions {
    gap: 10px;
    margin-top: 16px;
  }

  .rn-app-listoya__actions .button {
    padding: 10px 18px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .rn-app-listoya__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rn-app-listoya__actions .button {
    justify-content: center;
  }
}
