/* home-test.css — Home branded (manual de marca v1.3). Todo scopeado bajo #home-test.
   El grid 3-col + navbar height + hero min-height viven en el CSS crítico inline de head-test.php. */

/* ════════════════════ HERO rotativo (2026-07-17 v2) ════════════════════
   Claims agresivos de /que-ofrecemos con foto, rotan cada 6s. Único destino:
   /que-ofrecemos (sin CTA de apertura). Compacto: la data queda a la vista. */
#home-test .hero-rava {
  background: linear-gradient(135deg, #005685 0%, #0B2F55 100%);
  color: #fff;
  padding: 0;
  margin-bottom: 22px;
  overflow: hidden;
}
html.dark #home-test .hero-rava { background: linear-gradient(135deg, #0B2F55 0%, #041424 100%); }

#home-test .hero-rava__inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 768px)  { #home-test .hero-rava__inner { grid-template-columns: 1fr clamp(300px, 32vw, 420px); } }
  /* min 300px (era 260): con fotos de sujetos cerca de los bordes, la caja 260×205
     recortaba de más en tablets */
@media (min-width: 1400px) { #home-test .hero-rava__inner { max-width: 1350px; } }

#home-test .hero-rava__copy { padding: 26px 16px 20px; min-width: 0; }

/* Claims apilados con crossfade — alto fijo para que la rotación no mueva el layout */
#home-test .hero-claims { position: relative; min-height: 108px; }
@media (min-width: 768px)  { #home-test .hero-claims { min-height: 100px; } }
#home-test .hero-claim { position: absolute; inset: 0; }

#home-test .hero-rava__eyebrow {
  font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 13px;
  color: #EBD9BD;  /* --brand-acento-on-dark: bronce arena sobre azul (manual §2.1) */
  margin: 0 0 6px; letter-spacing: 0.3px;
}
#home-test .hero-rava__title {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
  font-size: 20px; line-height: 1.2; letter-spacing: -0.3px; margin: 0; color: #fff;
  text-wrap: balance;
}
@media (min-width: 768px) { #home-test .hero-rava__title { font-size: 25px; line-height: 1.16; } }
#home-test .hero-rava__title b { color: #EBD9BD; font-weight: 800; }

#home-test .hero-rava__foot {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px;
}
#home-test .hero-rava__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; font-size: 15px; margin: 0; white-space: nowrap;
}
#home-test .hero-rava__cta .icon { width: 16px; height: 16px; }
#home-test .hero-dots { display: flex; gap: 7px; }
#home-test .hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.35); transition: background 0.2s;
}
#home-test .hero-dots button.active { background: #EBD9BD; }
#home-test .hero-dots button:focus-visible { outline: 2px solid #DCEAF5; outline-offset: 2px; }

/* Media — foto por slide, crossfade; fundido hacia el azul con máscara */
#home-test .hero-rava__media { position: relative; display: block; min-height: 160px; }
@media (min-width: 768px) { #home-test .hero-rava__media { min-height: 0; } }
#home-test .hero-media__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 0.55s ease; pointer-events: none;
  /* la opacidad activa la maneja Alpine via :style (inline en slide 1 pre-JS) */
}
#home-test .hero-media__img:not(.is-cutout) {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%);
}
@media (min-width: 768px) {
  #home-test .hero-media__img:not(.is-cutout) {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  }
}
/* Recorte con alpha (persona): contain apoyado abajo, sin máscara */
#home-test .hero-media__img.is-cutout { object-fit: contain; object-position: right bottom; padding-top: 6px; }
@media (max-width: 767px) { #home-test .hero-media__img.is-cutout { object-position: center bottom; } }
/* Slide con el sujeto principal a la derecha: en cajas angostas conservar ese lado */
#home-test .hero-media__img.pos-right { object-position: right center; }
@media (prefers-reduced-motion: reduce) {
  #home-test .hero-media__img, #home-test .hero-claim { transition: none !important; }
}

/* ════════════════════ TABLA CARDS — gramática /perfil2 (2026-07-17) ════════════════════
   Título azul primario + icono bronce sobre superficie clara (antes: barra azul sólida).
   Los tokens resuelven solos el dark mode (primario → #5B9DD0, acento → #B89B74). */
#home-test .tabla-card {
  border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; background: var(--table-bg);
  margin-bottom: 18px;
}
#home-test .tabla-titulo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px 9px; background: transparent;
}
#home-test .tabla-titulo-text {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 15px;
  color: var(--brand-primario); letter-spacing: 0;
}
#home-test .tabla-titulo-text .icon { width: 16px; height: 16px; color: var(--brand-acento); }
#home-test .tabla-ver-mas { color: var(--link-color); display: inline-flex; line-height: 0; padding: 2px; border-radius: 4px; }
#home-test .tabla-ver-mas:hover { background: var(--brand-acento-claro); }
#home-test .tabla-ver-mas:focus-visible { outline: 2px solid var(--brand-primario); outline-offset: 2px; border-radius: 3px; }
#home-test .tabla-vacia {
  font-family: 'Lora', serif; color: var(--text-secondary); text-align: center; font-size: 13px; padding: 14px;
}
#home-test .tabla-card .td-titulo { text-align: left; white-space: normal; }
#home-test .tabla-card td.td-left { text-align: left; overflow: hidden; text-overflow: ellipsis; }
/* Links de celda en CUALQUIER columna → --link-color del manual (§7). El design-system
   solo cubre td:first-of-type; en "Información relevante" la especie va 2ª columna y
   caía al azul default del browser (reporte Juan 17/07). */
#home-test .tabla-card tbody td a { color: var(--link-color); text-decoration: none; }
#home-test .tabla-card tbody td a:hover { text-decoration: underline; }
#home-test .tabla-card .icon { width: 14px; height: 14px; }   /* flechas trending en celdas */

/* Tabs */
#home-test .tabla-tabs {
  display: flex; flex-wrap: wrap; gap: 0; background: var(--table-bg);
  border-bottom: 1px solid var(--table-border);
}
#home-test .tabla-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 12px;
  color: var(--text-secondary); padding: 9px 12px; border-bottom: 2px solid transparent;
}
#home-test .tabla-tab:hover { color: var(--brand-primario); }
#home-test .tabla-tab.selected { color: var(--brand-primario); border-bottom-color: var(--brand-primario); }
#home-test .tabla-tab:focus-visible { outline: 2px solid var(--brand-primario); outline-offset: -2px; }

/* ════════════════════ EN VIVO ════════════════════ */
#home-test .card-vivo {
  border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; margin-bottom: 18px; background: var(--bg-card);
}
#home-test .live-banner {
  background: #b91c1c; color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
  font-size: 13px; letter-spacing: 0.5px; padding: 8px 12px; display: flex; align-items: center; gap: 8px;
}
#home-test .live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: rt-pulse 1.4s infinite; }
@keyframes rt-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { #home-test .live-dot { animation: none; } }
#home-test .video-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; }
#home-test .video-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ════════════════════ LMM (co-brand verde) ════════════════════ */
#home-test .lmm-block {
  background: var(--bg-card); border-left: 4px solid var(--brand-primario);  /* #00BD8B */
  border-radius: 8px; padding: 20px; margin-bottom: 18px;
}
/* Adaptación dark del bloque LMM (manual §9.5 no cubre LMM en superficie dark de RAVA).
   [data-brand=lmm] fija --text-body:#3A3A3A (gris oscuro) → ilegible sobre #1a1a1a.
   Forzamos texto claro + borde/títulos verde menta legible. */
html.dark #home-test .lmm-block { background: var(--bg-card); border-left-color: #2dd4aa; }
html.dark #home-test .lmm-block__body p { color: #e0e0e0; }
html.dark #home-test .lmm-block__fecha,
html.dark #home-test .lmm-block .lockup__prep { color: #9aa4ad; }
#home-test .lmm-block__head { margin-bottom: 12px; }
#home-test .lmm-block .lockup { margin-bottom: 10px; }
#home-test .lmm-block__title {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 20px; margin: 0 0 4px; line-height: 1.2;
}
#home-test .lmm-block__title a { color: var(--brand-secundario); text-decoration: none; }  /* #007153 */
html.dark #home-test .lmm-block__title a { color: #2dd4aa; }
#home-test .lmm-block__title a:hover { text-decoration: underline; }
#home-test .lmm-block__fecha { font-family: 'Lora', serif; font-size: 13px; color: var(--text-secondary); margin: 0; }
#home-test .lmm-block__body p { font-family: 'Lora', serif; font-size: 15px; line-height: 1.6; color: var(--text-body); margin: 0 0 10px; text-align: justify; }
#home-test .lmm-block__body .lmm-lead { font-weight: 600; }
#home-test .lmm-block__more { margin: 6px 0 0; }
#home-test .lmm-block__more .cta-tertiary { display: inline-flex; align-items: center; gap: 4px; }

/* ════════════════════ CARDS BRANDED (cierre / noticias / foro) ════════════════════ */
#home-test .card-branded {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
  padding: 16px 18px; margin-bottom: 18px;
}
#home-test .card-branded__head {
  display: flex; align-items: center; gap: 8px; color: var(--brand-primario);
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; margin-bottom: 12px;
}
#home-test .card-branded__head a { color: inherit; text-decoration: none; }

/* Cierre de mercado */
#home-test .card-cierre { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 18px; margin-bottom: 18px; }
#home-test .card-cierre__head { display: flex; gap: 14px; align-items: flex-start; }
#home-test .card-cierre__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
#home-test .card-cierre__title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; margin: 6px 0 4px; }
#home-test .card-cierre__title a { color: var(--brand-secundario); text-decoration: none; }
html.dark #home-test .card-cierre__title a { color: var(--text-body); }
#home-test .card-cierre__title a:hover { text-decoration: underline; }
#home-test .card-cierre__meta { font-family: 'Lora', serif; font-size: 13px; color: var(--text-secondary); margin: 0; }
#home-test .card-cierre__resumen { font-family: 'Lora', serif; font-size: 15px; line-height: 1.6; color: var(--text-body); margin: 14px 0 8px; text-align: justify; }
#home-test .card-cierre__more .cta-tertiary,
#home-test .noticias-section .cta-tertiary { display: inline-flex; align-items: center; gap: 4px; }

/* Noticias */
#home-test .noticias-list { display: flex; flex-direction: column; gap: 14px; }
#home-test .noticia-item { padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
#home-test .noticia-item:last-child { border-bottom: none; }
#home-test .noticia-titulo a { color: var(--link-color); text-decoration: none; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; }
#home-test .noticia-titulo a:hover { text-decoration: underline; }
#home-test .noticia-resumen { font-family: 'Lora', serif; font-size: 14px; line-height: 1.55; color: var(--text-body); margin: 4px 0; }
#home-test .noticia-meta { font-family: 'Lora', serif; font-size: 12px; color: var(--text-secondary); display: flex; gap: 10px; }

/* Foro */
#home-test .foro-list { list-style: none; margin: 0; padding: 0; }
#home-test .foro-list li { margin-bottom: 8px; }
#home-test .foro-list a { display: flex; align-items: center; gap: 10px; color: var(--text-body); text-decoration: none; font-family: 'Lora', serif; font-size: 14px; }
#home-test .foro-list a:hover { color: var(--brand-primario); }
#home-test .foro-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
#home-test .foro-avatar--ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-acento-claro); color: var(--brand-primario); font-size: 11px; font-weight: 700;
}

/* ════════════════════ SHORTS / SPOTIFY ════════════════════ */
#home-test .shorts, #home-test .spotify { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
#home-test .card-short { border-radius: 8px; overflow: hidden; }
#home-test .card-short iframe { display: block; border-radius: 8px; aspect-ratio: 9 / 16; width: 100%; height: auto; }
#home-test .card-spotify { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }

/* ════════════════════ MAPAS DE CALOR ════════════════════ */
#home-test .mapa-card { position: relative; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; margin-bottom: 18px; background: var(--bg-card); }
#home-test .mapa-watermark { position: absolute; top: 8px; right: 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 11px; color: var(--text-secondary); opacity: 0.6; z-index: 1; }
#home-test .mapa-content { width: 100%; }
#home-test .mapa-content svg, #home-test .mapa-content img { max-width: 100%; height: auto; display: block; }

/* ════════════════════ CAROUSEL BRANDED ════════════════════ */
#home-test .carousel-branded { position: relative; width: 100%; aspect-ratio: 5 / 3; overflow: hidden; border-radius: 8px; margin-bottom: 18px; background: var(--bg-card); }
#home-test .carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
#home-test .carousel-slide.active { opacity: 1; pointer-events: auto; }
#home-test .carousel-slide picture, #home-test .carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
#home-test .carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: rgba(0,0,0,0.4); color: #fff; border: none; cursor: pointer; border-radius: 50%;
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
}
#home-test .carousel-arrow.left { left: 8px; }
#home-test .carousel-arrow.right { right: 8px; }
#home-test .carousel-arrow:hover { background: rgba(0,0,0,0.6); }
#home-test .carousel-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#home-test .carousel-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
#home-test .carousel-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); cursor: pointer; padding: 0; }
#home-test .carousel-dots button.active { background: #fff; }
#home-test .carousel-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #home-test .carousel-slide { transition: none; } }

/* ════════════════════ FACADES (perf 2026-07-18) ════════════════════
   Reels y Spotify: superficie estática, el iframe de terceros solo al click. */
#home-test .yt-facade {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16;
  border: none; border-radius: 8px; overflow: hidden; cursor: pointer; padding: 0;
  background: #000;
}
#home-test .yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
#home-test .yt-facade__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(0, 86, 133, 0.92); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
#home-test .yt-facade__play svg { width: 26px; height: 26px; margin-left: 3px; }
#home-test .yt-facade:hover .yt-facade__play { transform: translate(-50%, -50%) scale(1.08); background: rgba(0, 86, 133, 1); }
#home-test .yt-facade:focus-visible { outline: 3px solid var(--brand-primario, #005685); outline-offset: 2px; }
#home-test .yt-facade-frame { display: block; width: 100%; aspect-ratio: 9 / 16; height: auto; border: 0; border-radius: 8px; }

#home-test .sp-facade {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 200px; padding: 26px 18px;
  border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(160deg, #E8F8F2, #A8E6D0);
}
#home-test .sp-facade img { height: 54px; width: auto; }
#home-test .sp-facade__txt {
  font-family: 'Lora', Georgia, serif; font-size: 14.5px; color: #005E45; font-weight: 600;
}
#home-test .sp-facade__play {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 14px;
  background: #00BD8B; color: #0A0A0A; padding: 10px 24px; border-radius: 50px;
}
#home-test .sp-facade__play svg { width: 16px; height: 16px; }
#home-test .sp-facade:hover .sp-facade__play { filter: brightness(1.05); }
#home-test .sp-facade:focus-visible { outline: 3px solid #007153; outline-offset: 2px; }
html.dark #home-test .sp-facade { background: linear-gradient(160deg, #123c30, #0b2b22); }
html.dark #home-test .sp-facade__txt { color: #A8E6D0; }
