/* ============================================================
   iOS Development Lab — Apps de estudiantes LIDTS
   Estilos del contenido central rediseñado
   Paleta: gris (#ececed / #6f6f6f), naranja (#f97316),
           azul (#06c / #002145 / #001021)
   ============================================================ */

:root {
  --ios-azul-oscuro: #001021;
  --ios-azul-marino: #002145;
  --ios-azul: #06c;
  --ios-azul-claro: #e8f0fe;
  --ios-naranja: #f97316;
  --ios-naranja-soft: #fff3ea;
  --ios-gris-bg: #ececed;
  --ios-gris-card: #ffffff;
  --ios-gris-texto: #6f6f6f;
  --ios-oro: #c47e1b;
  --ios-sombra: 0 10px 30px -10px rgba(0, 16, 33, 0.18);
  --ios-sombra-hover: 0 18px 42px -12px rgba(0, 16, 33, 0.28);
  --ios-radio: 22px;
  --ios-fuente: "SF Pro Display", "SF Pro Icons", "Helvetica Neue",
    "Helvetica", "Arial", sans-serif;
}

/* ---------- Hero / Título de sección ---------- */
.apps-hero {
  background: linear-gradient(135deg, #001021 0%, #002145 55%, #013a73 100%);
  padding: 64px 20px 130px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.apps-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 90px;
  background: var(--ios-gris-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.apps-hero__badge {
  display: inline-block;
  font-family: var(--ios-fuente);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ios-naranja);
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px -6px rgba(249, 115, 22, 0.7);
}

.apps-hero__title {
  font-family: var(--ios-fuente);
  color: #fff;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  line-height: 1.2;
  max-width: 880px;
  margin: 0 auto 16px;
  font-weight: 700;
}

.apps-hero__title span {
  color: #ffb27d;
}

.apps-hero__subtitle {
  font-family: var(--ios-fuente);
  color: #b9c6d8;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Filtros ---------- */
.apps-filtros {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  margin: -64px auto 38px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.apps-filtro {
  font-family: var(--ios-fuente);
  font-size: 14px;
  font-weight: 600;
  color: var(--ios-azul-marino);
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px -8px rgba(0, 16, 33, 0.25);
}

.apps-filtro i {
  font-size: 13px;
}

.apps-filtro:hover {
  transform: translateY(-2px);
  border-color: var(--ios-naranja);
  color: var(--ios-naranja);
}

.apps-filtro.is-active {
  background: var(--ios-naranja);
  border-color: var(--ios-naranja);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(249, 115, 22, 0.65);
}

/* ---------- Contenedor general ---------- */
.apps-wrap {
  background: var(--ios-gris-bg);
  padding: 4px 16px 70px;
}

.apps-lista {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 96px;
}

/* ============================================================
   TARJETA DE APP — DOS RENGLONES
   Renglón 1: capturas de pantalla
   Renglón 2: información de la app
   ============================================================ */
.app-card {
  background: var(--ios-gris-card);
  border-radius: var(--ios-radio);
  border: 2px solid #9aa0a8;
  box-shadow: var(--ios-sombra);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-card.is-visible:hover {
  transform: translateY(-4px);
  box-shadow: var(--ios-sombra-hover);
}

/* ---- RENGLÓN 1: Capturas ---- */
.app-shots {
  background: linear-gradient(160deg, #d7e8ff 0%, #bcd9ff 100%);
  padding: 28px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.app-shot {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: none;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  transition: all 0.25s ease;
}

.app-shot:hover {
  background: #f4f6f8;
}

.app-shot img,
.app-shot iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
  border-radius: 6px;
}

.app-shot img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.app-shot img:hover {
  transform: scale(1.03);
}

/* === ESTILO 1: capturas VERTICALES (solo MixinUP 2) === */
.app-shots--vertical .app-shot {
  flex: 0 1 184px; /* 230px reducido 20% */
}

.app-shots--vertical .app-shot img {
  height: auto;
}

/* === ESTILO 2: capturas HORIZONTALES (todas las demás) === */
.app-shots--horizontal {
  flex-wrap: wrap;
}

.app-shots--horizontal .app-shot {
  flex: 1 1 0;
  min-width: 0;
  max-width: 40%; /* ancho reducido ~20% respecto al 50% por captura */
}

.app-shots--horizontal .app-shot img {
  height: auto;
}

.app-shots--horizontal .app-shot--video {
  aspect-ratio: 16 / 9;
  align-items: center;
  background: #000;
}

.app-shots--horizontal .app-shot--video iframe {
  object-fit: contain;
}

/* ---- RENGLÓN 2: Información ---- */
.app-info {
  padding: 30px 34px 34px;
  display: flex;
  flex-direction: column;
}

.app-info__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.app-logo {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 2px solid var(--ios-azul-oscuro);
  object-fit: cover;
  background: var(--ios-azul-oscuro);
}

.app-logo-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.25s ease;
}
.app-logo-link:hover {
  transform: scale(1.05);
}

.app-titlewrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.app-name {
  font-family: var(--ios-fuente);
  font-size: 22px;
  font-weight: 700;
  color: var(--ios-azul-oscuro);
  margin: 0;
  line-height: 1.1;
}

.app-premio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  background: var(--ios-naranja-soft);
  color: var(--ios-oro);
  font-family: var(--ios-fuente);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #f3d9be;
}

.app-premio img {
  height: 14px;
}

.app-autor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.app-year {
  font-family: var(--ios-fuente);
  font-size: 14px;
  font-weight: 700;
  color: var(--ios-naranja); /* naranja fuerte */
  line-height: 1;
}

.app-autor__label {
  font-family: var(--ios-fuente);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ios-azul-oscuro);
}

/* Píldora individual por cada persona autora */
.autor-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--ios-fuente);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--ios-naranja); /* naranja fuerte */
  border: 1px solid var(--ios-naranja);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 4px 12px -6px rgba(249, 115, 22, 0.7);
}

.app-desc {
  font-family: var(--ios-fuente);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ios-gris-texto);
  text-align: justify;
  margin: 0 0 20px;
  max-width: 99%;
}

.app-desc b {
  color: var(--ios-azul-marino);
}

.app-tech {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.app-tech__label {
  font-family: var(--ios-fuente);
  font-size: 12px;
  font-weight: 700;
  color: var(--ios-azul-oscuro);
  margin-right: 2px;
}

.app-chip {
  font-family: var(--ios-fuente);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ios-azul);
  background: var(--ios-azul-claro);
  border: 1px solid #cfe0ff;
  padding: 5px 12px;
  border-radius: 999px;
}

.app-chip2 {
  font-family: var(--ios-fuente);
  font-size: 11.5px;
  font-weight: 600;
  color: #000;
  background: #f6f3d1;
  border: 1px solid #f6f3d1;
  padding: 5px 12px;
  border-radius: 999px;
}

.app-repo {
  height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;  
  align-self: flex-start;
  font-family: var(--ios-fuente);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ios-azul);
  background: #fff;
  border: 1px solid var(--ios-azul);
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.25s ease;
}

.app-repo:hover {
  background: var(--ios-azul);
  color: #fff;
}

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
  .apps-hero {
    padding: 48px 18px 110px;
  }
  .app-shots {
    padding: 20px;
    gap: 12px;
  }
  /* Verticales: máximo 3 en fila, se encogen */
  .app-shots--vertical {
    flex-wrap: wrap;
  }
  .app-shots--vertical .app-shot {
    flex: 1 1 30%;
  }
  /* Horizontales apiladas en móvil */
  .app-shots--horizontal .app-shot {
    flex: 1 1 100%;
  }
  .app-info {
    padding: 24px 20px 26px;
  }
  .app-info__head {
    gap: 13px;
  }
  .app-logo {
    width: 58px;
    height: 58px;
  }
  .app-name {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .app-shots--vertical .app-shot {
    flex: 1 1 45%;
  }
}

/* ============================================================
   LIGHTBOX — ampliar captura al hacer clic
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 16, 33, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.lightbox__close {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ios-naranja);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}

.lightbox__close:hover {
  transform: scale(1.08);
}

/* ============================================================
   EFECTO DE APARICIÓN AL HACER SCROLL (reversible)
   ============================================================ */
.app-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease;
}

.app-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respeta preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .app-card {
    opacity: 1;
    transform: none;
    transition: box-shadow 0.3s ease;
  }
}
