/* Panel de novedades (news.js). Tokens de tokens.css; claro y oscuro. */
.news-dialog {
  --news-surface: #fffaf3;
  --news-hero: #ffe6ee;
  --news-ink: var(--ap-ink, #1f1419);
  --news-ink-2: var(--ap-ink-2, #4b3d45);
  --news-line: var(--ap-line, rgba(31, 20, 25, 0.11));
  --news-lav: #f1ecfd;
  --news-peach: #ffece0;
  --news-pink: #fff0f4;
  --news-mint: #e8f2ef;
  --news-chip: #fffaf3;
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 36px;
  background: var(--news-surface);
  color: var(--news-ink);
  box-shadow: 0 40px 120px rgba(31, 20, 25, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: auto;
  font-family: var(--ap-font, "Figtree", system-ui, sans-serif);
  z-index: var(--ap-z-modal, 1000);
}
.news-dialog::backdrop { background: rgba(31, 20, 25, 0.52); backdrop-filter: blur(3px); }
.news-dialog[open] { animation: news-in 0.45s var(--ap-ease-spring, cubic-bezier(0.2, 1.2, 0.3, 1)) both; }
@keyframes news-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .news-dialog[open] { animation: none; } }

:root[data-theme="dark"] .news-dialog {
  --news-surface: var(--ap-paper-dark, #0b2123);
  --news-hero: #3a1626;
  --news-lav: rgba(184, 164, 237, 0.16);
  --news-peach: rgba(255, 176, 132, 0.14);
  --news-pink: rgba(255, 122, 168, 0.14);
  --news-mint: rgba(159, 211, 196, 0.14);
  --news-chip: rgba(255, 250, 243, 0.08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.news-panel h2, .news-panel h3 { font-family: var(--ap-font-display, "Bricolage Grotesque", sans-serif); margin: 0; }
.news-panel p { margin: 0; }

.news-hero { position: relative; min-height: 250px; display: flex; background: var(--news-hero); overflow: hidden; }
.news-hero-art { position: absolute; right: 0; top: 0; width: 52%; height: 100%; background: url("./assets/art/esferas-claro.webp") center / cover; opacity: 0.8; -webkit-mask-image: linear-gradient(to right, transparent, #000 28%); mask-image: linear-gradient(to right, transparent, #000 28%); }
:root[data-theme="dark"] .news-hero-art { background-image: url("./assets/art/esferas-oscuro.webp"); }
.news-hero-bloop { position: absolute; right: 14%; top: 24px; width: 210px; height: auto; filter: drop-shadow(0 18px 30px rgba(224, 47, 114, 0.35)); animation: news-float 4s ease-in-out infinite; }
@keyframes news-float { 50% { transform: translateY(-8px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .news-hero-bloop { animation: none; } }
/* El texto va arriba: deja aire con las tarjetas de debajo. */
.news-hero-copy { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 48px 30px; width: 58%; box-sizing: border-box; }
.news-hero-copy h2 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
.news-hero-copy p { font-size: 17px; line-height: 1.45; color: var(--news-ink-2); }
.news-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--ap-brand, #ff4d8b); color: #1f1419; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.news-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 250, 243, 0.88); color: #1f1419; cursor: pointer; }
.news-close:focus-visible, .news-actions button:focus-visible { outline: 2px solid var(--ap-brand, #ff4d8b); outline-offset: 3px; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px 32px 4px; }
.news-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 24px; }
.news-card h3 { font-size: 21px; font-weight: 700; }
.news-card p { font-size: 14.5px; line-height: 1.5; color: var(--news-ink-2); }
.news-card-head { display: flex; align-items: center; gap: 10px; }
.news-icon { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; color: #1f1419; }
.news-lav { background: var(--news-lav); } .news-lav .news-icon { background: #b8a4ed; }
.news-peach { background: var(--news-peach); } .news-peach .news-icon { background: #ffb084; }
.news-pink { background: var(--news-pink); } .news-pink .news-icon { background: #ff9cbf; }
.news-mint { background: var(--news-mint); } .news-mint .news-icon { background: #9fd3c4; }

.news-feature { grid-row: span 2; gap: 12px; padding: 22px; background: #1f1419; color: #fbeff2; }
:root[data-theme="dark"] .news-feature { background: #2b1520; box-shadow: 0 0 0 1px rgba(255, 122, 168, 0.25) inset; }
.news-feature h3 { font-size: 28px; line-height: 1.08; }
.news-feature p { font-size: 15px; color: #e5d3da; }
.news-feature .news-foot { margin-top: auto; font-size: 13px; color: #c9b4bd; }
.news-tag { align-self: flex-start; padding: 5px 10px; border-radius: 999px; background: rgba(255, 77, 139, 0.22); color: #ffb3cd; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.news-demo { position: relative; margin-top: 8px; padding: 16px; border-radius: 18px; background: #fffaf3; color: #1f1419; font-size: 14px; line-height: 1.6; }
.news-demo mark { background: rgba(255, 77, 139, 0.28); color: inherit; border-radius: 4px; padding: 1px 2px; }
.news-bubble { position: absolute; left: 40%; top: -16px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--ap-brand, #ff4d8b); color: #1f1419; font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(255, 77, 139, 0.45); }
.news-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.news-pills span { padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(251, 239, 242, 0.35); font-size: 13px; font-weight: 600; }
.news-pills .is-on { background: #fbeff2; color: #1f1419; border-color: #fbeff2; }

.news-voice { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 8px 12px; border-radius: 999px; background: var(--news-surface); font-size: 13px; font-weight: 600; color: var(--news-ink-2); }
.news-play { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--news-ink); color: var(--news-surface); }
.news-bars { display: flex; align-items: center; gap: 3px; flex-grow: 1; }
.news-bars i { width: 3px; border-radius: 2px; background: var(--news-ink); }
.news-count { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-family: var(--ap-font-display, sans-serif); font-size: 34px; font-weight: 800; }
.news-count s { text-decoration: none; opacity: 0.4; }
.news-count small { font-family: var(--ap-font, sans-serif); font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--news-ink-2); }
.news-check { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 14px; font-weight: 600; }
.news-check i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: var(--ap-brand, #ff4d8b); color: #1f1419; }
.news-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.news-week i { height: 34px; border-radius: 8px; background: var(--news-surface); }
.news-week .a { background: #ff9cbf; } .news-week .b { background: #b8a4ed; }

.news-strip { display: flex; gap: 16px; padding: 8px 32px 0; }
.news-strip p { flex: 1 1 0; display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 20px; border: 1px solid var(--news-line); font-size: 14.5px; line-height: 1.4; }
.news-strip svg { flex-shrink: 0; }
/* Fijos abajo: en pantallas bajas el panel se desplaza y los botones siguen a mano. */
.news-actions { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px 20px; background: var(--news-surface); }
.news-actions p { font-size: 14px; color: var(--news-ink-2); }
.news-actions div { display: flex; gap: 12px; }
.news-actions button { min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 16px; }

/* Móvil: hoja inferior con la lista condensada (diseño «Móvil · panel de novedades»). */
@media (max-width: 720px) {
  .news-dialog { width: 100vw; max-width: 100vw; max-height: calc(100dvh - 36px); margin: auto 0 0; border-radius: 30px 30px 0 0; }
  .news-dialog[open] { animation-name: news-up; }
  @keyframes news-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .news-hero { min-height: 210px; }
  .news-hero-art { width: 100%; opacity: 0.9; -webkit-mask-image: none; mask-image: none; }
  .news-hero-bloop { right: 14px; top: 26px; width: 150px; }
  .news-hero-copy { width: 230px; padding: 0 0 20px 20px; margin-top: auto; gap: 10px; }
  .news-hero-copy h2 { font-size: 30px; }
  .news-hero-copy p { display: none; }
  .news-chip { font-size: 12px; padding: 6px 11px; }
  .news-close { top: 18px; right: 14px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 16px 0; }
  .news-feature { grid-row: auto; padding: 16px; gap: 8px; }
  .news-feature h3 { font-size: 20px; }
  .news-feature .news-tag, .news-feature .news-demo, .news-feature .news-pills { display: none; }
  .news-card:not(.news-feature) { padding: 12px 14px; border-radius: 18px; }
  .news-card:not(.news-feature) h3 { font-size: 16px; }
  .news-card:not(.news-feature) p { font-size: 13.5px; }
  .news-extra { display: none; }
  .news-strip { flex-direction: column; gap: 8px; padding: 10px 16px 0; }
  .news-strip p { padding: 10px 14px; font-size: 13.5px; }
  .news-actions { flex-direction: column-reverse; align-items: stretch; padding: 12px 16px 18px; gap: 8px; box-shadow: 0 -12px 24px color-mix(in srgb, var(--news-surface) 85%, transparent); }
  .news-actions p { display: none; }
  .news-actions div { flex-direction: column-reverse; }
}
