/* Comunidad (comunidad/index.html): encabezado con fotos de fondo, carrusel de momentos,
   carrusel de programas y franja dorada de cierre. */

.com-etiqueta {
  display: inline-flex; align-items: center; margin: 0 0 1.25rem; padding: .45rem 1rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #e8cf8f; border: 1px solid rgba(201, 162, 75, .5); border-radius: 999px;
  background: rgba(10, 10, 10, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- 1. Encabezado a pantalla completa ---------- */
.com-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--header-h, 80px)); display: flex; flex-direction: column; justify-content: flex-end;
  background: #000;
}
.com-hero__fondo { position: absolute; inset: 0; z-index: -2; }
.com-hero__foto {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12);
  animation: com-pase 36s linear infinite; animation-delay: calc(var(--i) * 6s);
}
.com-hero__foto:first-child { opacity: 1; }
@keyframes com-pase {
  0%     { opacity: 0; transform: scale(1.12); }
  3%     { opacity: 1; }
  16.6%  { opacity: 1; }
  20%    { opacity: 0; transform: scale(1); }
  100%   { opacity: 0; transform: scale(1); }
}
.com-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .6) 45%, rgba(0, 0, 0, .25) 100%),
    linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .55) 30%, transparent 60%),
    radial-gradient(circle at 85% 10%, rgba(201, 162, 75, .22), transparent 50%);
}
.com-hero__contenido { padding-block: clamp(4rem, 10vh, 7rem) clamp(2.5rem, 6vh, 4rem); }
.com-hero__titulo {
  margin: 0; max-width: 14ch; color: #fff;
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 6rem); line-height: .98; letter-spacing: -.045em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .5);
}
.com-hero__titulo em {
  font-style: normal;
  background: linear-gradient(100deg, #f1dc9f, #c9a24b 55%, #e8cf8f); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.com-hero__intro { margin: 1.5rem 0 0; max-width: 42ch; font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .85); }
.com-hero__acciones { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.com-hero__cifras { border-top: 1px solid rgba(201, 162, 75, .3); background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.com-hero__cifras ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.com-hero__cifras li { display: flex; align-items: baseline; gap: .75rem; padding: 1.4rem 0; }
.com-hero__cifras li + li { padding-left: clamp(1rem, 3vw, 2.5rem); border-left: 1px solid rgba(255, 255, 255, .1); }
.com-hero__cifras strong {
  font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1; letter-spacing: -.03em;
  background: linear-gradient(100deg, #f1dc9f, #c9a24b); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.com-hero__cifras span { color: rgba(255, 255, 255, .72); font-size: .9rem; }

/* Entrada del encabezado */
.com-hero__contenido > * { animation: com-entra 1s cubic-bezier(.16, 1, .3, 1) both; }
.com-hero__contenido > :nth-child(2) { animation-delay: .12s; }
.com-hero__contenido > :nth-child(3) { animation-delay: .26s; }
.com-hero__contenido > :nth-child(4) { animation-delay: .38s; }
.com-hero__cifras { animation: com-entra 1s cubic-bezier(.16, 1, .3, 1) .5s both; }
@keyframes com-entra { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Cabeceras de sección: solo título, sin párrafos */
.com-cabeza { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.com-cabeza--fila { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.com-cabeza__titulo { margin: 0; font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); line-height: 1; letter-spacing: -.04em; color: #fff; }

/* ---------- 2. Momentos: carrusel continuo ---------- */
.com-momentos { padding-block: clamp(4rem, 9vw, 7rem) clamp(2rem, 5vw, 3.5rem); scroll-margin-top: 4rem; }
.com-cinta { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.com-cinta__pista { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(.75rem, 1.5vw, 1.25rem); width: max-content; animation: com-cinta 55s linear infinite; }
.com-cinta:hover .com-cinta__pista { animation-play-state: paused; }
@keyframes com-cinta { to { transform: translateX(calc(-50% - clamp(.75rem, 1.5vw, 1.25rem) / 2)); } }
.com-cinta__item { flex: none; width: clamp(16rem, 34vw, 30rem); }
.com-cinta__item figure { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 1.1rem; overflow: hidden; background: #161616; }
.com-cinta__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.05) brightness(.85);
  transition: filter .6s ease, transform 1s cubic-bezier(.16, 1, .3, 1);
}
.com-cinta__item figcaption {
  position: absolute; left: 1rem; bottom: 1rem; padding: .45rem .85rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(201, 162, 75, .35);
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease;
}
.com-cinta__item:hover img { filter: none; transform: scale(1.05); }
.com-cinta__item:hover figcaption { opacity: 1; transform: none; }


/* ---------- 4. Franja dorada de cierre ---------- */
.com-banda { background: #c9a24b; color: #0a0a0a; padding-block: clamp(3rem, 6vw, 5rem); }
.com-banda__fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.com-banda__titulo { margin: 0; color: #0a0a0a; font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); letter-spacing: -.04em; line-height: 1; }
.com-banda__boton {
  display: inline-flex; align-items: center; gap: .65rem; padding: 1.1rem 1.8rem;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; background: #0a0a0a; color: #fff; transition: background-color .25s ease, transform .25s ease;
}
.com-banda__boton:hover { background: #1a1a1a; transform: translateY(-1px); }
.com-banda__boton:hover svg { transform: translateX(3px); }
.com-banda__boton svg { transition: transform .25s ease; }

/* ---------- Adaptación ---------- */
@media (max-width: 760px) {
  .com-hero { min-height: auto; }
  .com-hero::after { background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .7) 45%, rgba(0, 0, 0, .55) 100%); }
  .com-hero__cifras ul { grid-template-columns: 1fr; }
  .com-hero__cifras li { padding: .9rem 0; }
  .com-hero__cifras li + li { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .com-cinta__item { width: 78vw; }
  .com-cinta__item figcaption { opacity: 1; transform: none; }
  .com-cinta__item img { filter: none; }
}
@media (max-width: 480px) {
  .com-hero__acciones .btn { width: 100%; justify-content: space-between; }
  .com-banda__boton { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .com-hero__foto { animation: none; transform: none; }
  .com-hero__foto:not(:first-child) { display: none; }
  .com-hero__contenido > *, .com-hero__cifras { animation: none; }
  .com-cinta__pista { animation: none; }
  .com-cinta { overflow-x: auto; }
}

/* Ajuste: el encabezado completo (con la franja de cifras) entra en la primera pantalla */
.com-hero { min-height: calc(100svh - 81px); max-height: 60rem; }
.com-hero__titulo { max-width: 13ch; font-size: clamp(2.5rem, 1.2rem + 4.2vw, 5rem); }
.com-hero__contenido { padding-block: clamp(2.5rem, 7vh, 5rem) clamp(2rem, 4.5vh, 3rem); }
.com-hero__intro { margin-top: 1.1rem; }
.com-hero__acciones { margin-top: 1.6rem; }
.com-hero__cifras li { padding: 1.1rem 0; }
@media (max-width: 760px) { .com-hero { max-height: none; } }

/* Título en 3 líneas: "Conectamos talento," / "impulsamos" / "desarrollo." */
.com-hero__titulo { max-width: none; }
.com-hero__linea { display: block; white-space: nowrap; }
@media (max-width: 480px) { .com-hero__titulo { font-size: clamp(1.4rem, 7.2vw, 2.6rem); } }
/* El dorado va en cada línea (con líneas en bloque el recorte del degradado en <em> no se pinta) */
.com-hero__titulo em { background: none; color: inherit; }
.com-hero__titulo em .com-hero__linea {
  background: linear-gradient(100deg, #f1dc9f, #c9a24b 55%, #e8cf8f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  width: fit-content;
}

/* 18 fotos en el carrusel de momentos: vuelta más lenta para mantener la velocidad */
.com-cinta__pista { animation-duration: 160s; }

/* ---------- Dónde nos encontramos (eventos por ciudad) ---------- */
.com-ciudades { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(4rem, 9vw, 7rem); }
.com-ciudades__sub { margin: 0; color: #b9b3a7; max-width: 30ch; text-align: right; }
.com-ciudades__rejilla {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, clamp(14rem, 22vw, 19rem));
  gap: clamp(.75rem, 1.4vw, 1.1rem);
}
.com-ciudad {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 1.2rem; background: #161616;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
}
.com-ciudad--grande { grid-column: span 2; grid-row: span 2; }
.com-ciudad:nth-child(2) { grid-column: span 2; }
.com-ciudad img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), filter .6s ease; filter: saturate(.9) brightness(.92);
}
.com-ciudad::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .45) 38%, rgba(0, 0, 0, .05) 70%);
}
.com-ciudad__texto { position: absolute; inset: auto 0 0 0; padding: clamp(1.1rem, 2vw, 1.6rem); }
.com-ciudad__pais {
  display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .5rem; padding: .3rem .7rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #e8cf8f;
  background: rgba(0, 0, 0, .5); border: 1px solid rgba(201, 162, 75, .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.com-ciudad__nombre { margin: 0; color: #fff; font-size: clamp(1.5rem, 1rem + 1.4vw, 2.2rem); line-height: 1; letter-spacing: -.03em; }
.com-ciudad--grande .com-ciudad__nombre { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); }
.com-ciudad__desc {
  margin: .55rem 0 0; max-width: 38ch; color: rgba(255, 255, 255, .82); font-size: .92rem; line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s ease, opacity .4s ease;
}
.com-ciudad--grande .com-ciudad__desc { max-height: 6rem; opacity: 1; font-size: 1rem; }
.com-ciudad:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(201, 162, 75, .6), 0 28px 60px rgba(0, 0, 0, .5); }
.com-ciudad:hover img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }
.com-ciudad:hover .com-ciudad__desc { max-height: 6rem; opacity: 1; }

@media (max-width: 960px) {
  .com-ciudades__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: clamp(13rem, 34vw, 17rem); }
  .com-ciudad--grande { grid-column: span 2; grid-row: span 1; }
  .com-ciudad:nth-child(2) { grid-column: span 1; }
  .com-ciudad:nth-child(4) { grid-column: span 2; }
}
@media (max-width: 700px) {
  .com-cabeza--fila:has(.com-ciudades__sub) { flex-direction: column; align-items: flex-start; }
  .com-ciudades__sub { text-align: left; }
  .com-ciudades__rejilla { grid-template-columns: 1fr; grid-auto-rows: 15rem; }
  .com-ciudad--grande, .com-ciudad:nth-child(2), .com-ciudad:nth-child(4) { grid-column: auto; }
  .com-ciudad__desc { max-height: 6rem; opacity: 1; }
}
@media (hover: none) { .com-ciudad__desc { max-height: 6rem; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .com-ciudad, .com-ciudad img, .com-ciudad__desc { transition: none; }
  .com-ciudad:hover, .com-ciudad:hover img { transform: none; }
}
