/* stock/news/news-academy.css
   NEWS — Academy style (oct 2026). Loaded after news.css. Light touch on desktop; on phones the
   whole content area scrolls (AI summary + headlines) instead of only the list, so a long AI
   summary can no longer squeeze the list to nothing. */
:root { --ink: #16242a; --line: rgba(22, 36, 42, 0.09); --shadow-card: 0 8px 24px rgba(22, 36, 42, 0.04); }

/* tabs */
@media (min-width: 769px) {
  .paginas { background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-card); padding: 6px 8px; gap: 4px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .paginas .elementoNav { border-radius: 999px; padding: 9px 18px; color: rgba(22, 36, 42, 0.62); background: transparent; border-color: transparent; }
  .paginas .elementoNav h3 { font-size: 14px; font-weight: 600; }
  .paginas .elementoNav:hover { background: rgba(84, 140, 146, 0.08); border-color: transparent; color: var(--ink); transform: none; box-shadow: none; }
  .paginas .elementoNav[aria-current="page"],
  .paginas .news { background: var(--ink) !important; border-color: var(--ink) !important; color: #fff !important; box-shadow: none !important; }
}

/* company header */
.news-header { border: 1px solid var(--line) !important; border-radius: 18px !important; box-shadow: var(--shadow-card) !important; }
.news-company-logo-wrap { background: #fff !important; border-color: var(--line) !important; box-shadow: none !important; }
.news-title { font-weight: 800 !important; letter-spacing: -0.025em !important; color: var(--ink) !important; }
.news-ticker { display: inline-block; background: var(--ink); color: #fff !important; border-radius: 7px; padding: 2px 8px; font-size: 0.72rem; letter-spacing: 0.02em; }
.news-subtitle { color: rgba(22, 36, 42, 0.5) !important; }
.news-updated { color: rgba(22, 36, 42, 0.42) !important; font-weight: 500; }

/* AlphaAI card: same as the Summary tab */
.aai-card { background: #fff !important; border: 1px solid var(--line) !important; border-radius: 18px !important; box-shadow: var(--shadow-card) !important; }
.aai-name { color: var(--ink) !important; font-weight: 800 !important; }
.aai-pill { background: rgba(84, 140, 146, 0.12) !important; border-color: transparent !important; color: var(--color-azul-oscuro, #285260) !important; font-weight: 700 !important; }
.aai-label, .aai-footer-label { color: rgba(22, 36, 42, 0.45) !important; font-weight: 800 !important; letter-spacing: 0.14em !important; }
.aai-btn { background: var(--color-azul-oscuro, #285260) !important; border-radius: 12px !important; font-weight: 700 !important; box-shadow: 0 10px 24px rgba(40, 82, 96, 0.22); }
.aai-btn:hover { background: #1f4450 !important; opacity: 1 !important; }
.aai-result-text { color: var(--ink) !important; font-size: 0.88rem !important; }
.aai-tag { background: rgba(84, 140, 146, 0.10) !important; border-color: transparent !important; color: var(--color-azul-oscuro, #285260) !important; }

/* headline cards: calm, no teal left bar */
.news-card { border: 1px solid var(--line) !important; border-radius: 16px !important; box-shadow: var(--shadow-card) !important; }
.news-card--primary, .news-card--hovered { border-left: 1px solid var(--line) !important; }
.news-card--hovered { border-color: rgba(84, 140, 146, 0.32) !important; box-shadow: 0 14px 34px rgba(22, 36, 42, 0.08) !important; transform: none !important; }
.news-card__title { color: var(--ink) !important; font-weight: 700 !important; }
.news-card__source { color: var(--color-azul-oscuro, #285260) !important; }

/* phone: one scroll for the whole content (AI summary scrolls away with the headlines) */
@media (max-width: 768px) {
  body .contenido.contenido-news { justify-content: flex-start !important; align-items: stretch !important; overflow-y: auto !important; overflow-x: hidden !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  body .contenido.contenido-news .news-shell,
  body .contenido.contenido-news .news-body,
  body .contenido.contenido-news .news-list-wrapper { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; }
  body .contenido.contenido-news .news-feed { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; padding-bottom: 96px !important; }
  .aai-card { flex-shrink: 0 !important; }
}

/* desktop too: the AI card is not pinned; it scrolls with the headlines */
@media (min-width: 769px) {
  .news-shell { overflow-y: auto !important; overflow-x: hidden !important; scrollbar-gutter: stable; }
  .news-shell .news-body, .news-shell .news-list-wrapper { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; }
  .news-shell .news-feed { flex: 0 0 auto !important; min-height: auto !important; overflow: visible !important; padding-bottom: 32px !important; }
  .aai-card { flex-shrink: 0 !important; }
}
.news-feed .news-card.news-card--primary, .news-feed .news-card.news-card--hovered, .news-feed .news-card.news-card--primary.news-card--hovered { border-left: 1px solid rgba(84, 140, 146, 0.32) !important; }
.news-feed .news-card.news-card--primary:not(.news-card--hovered) { border-left-color: var(--line) !important; }

/* company card stays pinned at the top of the scrolling area (desktop and phone) */
.news-shell .news-header, body .contenido.contenido-news .news-header {
  position: sticky !important; top: 0; z-index: 20;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(22, 36, 42, 0.07) !important;
}
@media (min-width: 769px) { .news-shell { padding-top: 0 !important; } .news-shell .news-header { margin-top: 12px; } }
@media (max-width: 768px) {
  body .contenido.contenido-news .news-header { padding: 10px 12px !important; margin-bottom: 10px !important; }
  .news-title { font-size: 1.1rem !important; line-height: 1.2 !important; }
  .news-subtitle { margin-top: 3px !important; }
  .news-company-logo-wrap { width: 36px !important; height: 36px !important; }
}
@media (max-width: 768px) {
  .news-updated { display: none !important; }
  .news-header__left { min-width: 0; }
  .news-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
