/* ------------------------------------------------------------------------- */
/* Modern /news hub layout                                                   */
/* ------------------------------------------------------------------------- */

:root {
  --news-bg: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.93)
  );
  --news-card-bg: rgba(13, 20, 35, 0.9);
  --news-border: rgba(148, 163, 184, 0.25);
  --news-border-strong: rgba(148, 163, 184, 0.45);
  --news-text-muted: #94a3b8;
  --news-glow: 0 25px 50px rgba(15, 118, 110, 0.25);
  --news-radius: 1.25rem;
  --news-emerald-rgb: 16, 185, 129;
}

.news-shell {
  background-image: var(--news-bg);
  color: var(--bs-light);
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 3rem;
  width: 100%;
}

.news-hero {
  background: linear-gradient(
    135deg,
    rgba(12, 16, 32, 0.95),
    rgba(8, 47, 73, 0.95)
  );
  border-radius: var(--news-radius);
  box-shadow: var(--news-glow);
}

.news-hero-title {
  font-size: clamp(1.75rem, 2vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.news-hero-subtitle {
  font-size: 1rem;
  color: var(--news-text-muted);
  max-width: 48rem;
}

.news-hero-cta .btn {
  border-radius: 999px;
}

.news-hero .card-body {
  padding: 2rem;
}

@media (min-width: 992px) {
  .news-hero .card-body {
    padding: 3rem 3.5rem;
  }
}

.news-hero-mini-thermo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.news-hero-mini-thermo--bottom {
  margin-top: 2rem;
  padding: 1.75rem;
  background: rgba(12, 16, 32, 0.85);
  border-radius: var(--news-radius);
  border: 1px solid rgba(94, 234, 212, 0.15);
  box-shadow: var(--news-glow);
}

.news-hero-mini-thermo__header {
  margin-bottom: 1rem;
}

.hero-thermo-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: 0.95rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  background: rgba(6, 18, 30, 0.9);
  border: 1px solid rgba(var(--news-emerald-rgb), 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.hero-thermo-tile.tile-pos {
  background: rgba(var(--news-emerald-rgb), 0.16);
  color: #d1faf4;
}

.hero-thermo-tile.tile-neg {
  background: rgba(248, 113, 113, 0.16);
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.35);
}

.hero-thermo-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--news-emerald-rgb), 0.5);
}

.hero-thermo-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  min-width: 0;
  flex: 1;
}

.hero-thermo-label i {
  font-size: 1rem;
}

.hero-thermo-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.hero-thermo-pct {
  font-size: 1.15rem;
  font-weight: 600;
}

.hero-thermo-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-radius: 0.85rem;
  text-decoration: none;
  border: 1.5px solid rgba(var(--news-emerald-rgb), 0.25);
  color: #d1fae5;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-thermo-compact .hero-thermo-pct {
  position: static;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-thermo-compact:hover {
  border-color: rgba(var(--news-emerald-rgb), 0.5);
  transform: translateY(-2px);
  color: #ffffff;
}
.hero-thermo-compact .hero-thermo-label {
  flex: 0 1 auto;
}

.news-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5f3fc;
  border: 1px solid rgba(94, 234, 212, 0.4);
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.news-hero-extra {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.news-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.news-tag-list {
  display: contents;
}

.news-tag {
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.4);
  color: #f8fafc;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-tag:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
}

/* ------------------------------------------------------------------------- */
/* Grid layout                                                               */
/* ------------------------------------------------------------------------- */

.news-layout {
  width: 100%;
}

.news-main > *:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------------- */
/* Featured article                                                          */
/* ------------------------------------------------------------------------- */

.news-feature {
  position: relative;
  border-radius: var(--news-radius);
  min-height: clamp(320px, 55vh, 540px);
  background-color: #020617;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-feature-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.news-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 6, 23, 0.95),
    rgba(2, 132, 199, 0.55)
  );
}

.news-feature-content {
  position: relative;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 100%;
}

.feature-tag {
  align-self: flex-start;
  background: rgba(15, 118, 110, 0.3) !important;
  border: 1px solid rgba(94, 234, 212, 0.4);
}

.feature-title {
  font-size: clamp(1.8rem, 2.2vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 0;
}

.feature-excerpt {
  color: rgba(241, 245, 249, 0.9);
  font-size: 1.05rem;
  max-width: 50rem;
}

.feature-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

.feature-actions .btn {
  border-radius: 999px;
}

.news-feature-logo {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

/* ------------------------------------------------------------------------- */
/* Secondary insights                                                        */
/* ------------------------------------------------------------------------- */

.news-secondary-grid {
  margin-bottom: 2rem;
}

.news-secondary-grid .col {
  display: flex;
}

.news-grid-item .news-card {
  height: 100%;
}

.news-card[role="link"],
.news-card.cursor-pointer {
  cursor: pointer;
}

.news-grid-item .news-card-body {
  min-height: 180px;
}

/* ------------------------------------------------------------------------- */
/* Sector thermometer                                                        */
/* ------------------------------------------------------------------------- */

.news-thermo {
  background: var(--news-card-bg);
  border-radius: var(--news-radius);
  border: 1px solid rgba(94, 234, 212, 0.2);
  box-shadow: var(--news-glow);
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
}

.news-thermo-body {
  padding: 0;
}

/* ------------------------------------------------------------------------- */
/* News stream                                                               */
/* ------------------------------------------------------------------------- */

.news-stream {
  background: var(--news-card-bg);
  border-radius: var(--news-radius);
  border: 1px solid var(--news-border);
  overflow: hidden;
}

.news-stream-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--news-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.news-stream-count {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: #f8fafc;
}

.news-feed {
  display: flex;
  flex-direction: column;
}

.news-feed-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.news-feed-row[role="link"] {
  cursor: pointer;
}

.news-feed-row:last-child {
  border-bottom: 0;
}

.news-feed-row:hover {
  background: rgba(15, 23, 42, 0.7);
  transform: translateX(4px);
}

.news-feed-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.12rem 0.95rem;
  font-size: 0.82rem;
  color: #d1fae5;
  background: rgba(var(--news-emerald-rgb), 0.18);
  border: 1px solid rgba(var(--news-emerald-rgb), 0.35);
}

.news-feed-chip--neutral {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.35);
}

.news-feed-body {
  flex: 1 1 auto;
  min-width: 0;
}

.news-feed-title {
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.3rem;
}

.news-feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: #93a0c0;
}

.news-feed-meta .ticker {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fefce8;
}

.news-feed-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  min-width: 100px;
  font-variant-numeric: tabular-nums;
}

.news-feed-stats .value {
  font-weight: 600;
  color: #f8fafc;
}

.news-feed-stats .variation {
  font-weight: 600;
}

.news-newsletter-highlight {
  margin-top: 2rem;
  background: var(--news-card-bg);
  border-radius: var(--news-radius);
  border: 1px solid var(--news-border);
  color: var(--news-foreground, #e2e8f0);
}

.news-newsletter-highlight .card-body {
  background: transparent;
}

.news-newsletter-highlight h2,
.news-newsletter-highlight h5 {
  color: var(--news-foreground, #e2e8f0);
}

.news-newsletter-highlight__excerpt {
  position: relative;
  overflow: hidden;
  max-height: var(--news-newsletter-excerpt-max-height, 240px);
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.7) 75%,
    rgba(0, 0, 0, 0.25) 88%,
    rgba(0, 0, 0, 0.08) 94%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.7) 75%,
    rgba(0, 0, 0, 0.25) 88%,
    rgba(0, 0, 0, 0.08) 94%,
    rgba(0, 0, 0, 0) 100%
  );
}

.news-newsletter-highlight__excerpt p {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.95rem;
}

.news-newsletter-highlight__cta {
  min-width: 240px;
}

.news-newsletter-highlight__links a {
  color: #c7d2fe;
  font-weight: 600;
}

.news-newsletter-highlight__links a:hover {
  color: #fff;
}

.news-newsletter-highlight .btn-outline-light {
  color: var(--news-foreground, #e2e8f0);
  border-color: rgba(226, 232, 240, 0.4);
}

.news-newsletter-highlight .btn-outline-light:hover {
  background: rgba(226, 232, 240, 0.08);
  border-color: rgba(226, 232, 240, 0.9);
}

/* ------------------------------------------------------------------------- */
/* Sidebar                                                                   */
/* ------------------------------------------------------------------------- */

.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--news-card-bg);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-card__header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-card__header.bg-secondary {
  background-color: rgba(30, 41, 59, 0.95) !important;
}

.sidebar-card__header-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sidebar-card__eyebrow {
  letter-spacing: 0.08em;
  color: rgba(241, 245, 249, 0.8);
}

.sidebar-card__title {
  font-size: 1.1rem;
  color: #fff;
}

.sidebar-card__body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.market-movers-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  color: #f8fafc;
}

.market-movers-table caption {
  display: none;
}

.market-movers-table td {
  border: 0;
  padding: 0.55rem 0.25rem;
  vertical-align: middle;
}

.market-movers-table tr + tr td {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.market-movers-logo-col {
  width: 56px;
}

.market-movers-price-col {
  width: 90px;
}

.market-movers-var-col {
  width: 110px;
}

.market-movers-logo-cell {
  width: 56px;
}

.news-sidebar .stock-logo {
  width: 36px !important;
  height: 36px !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 0.5rem !important;
}

.market-movers-asset {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.market-movers-asset a {
  color: #e2e8f0;
  position: relative;
}

.market-movers-asset span {
  color: #94a3b8;
}

.market-movers-price,
.market-movers-var {
  text-align: right;
  font-family: "Roboto Mono", "SFMono-Regular", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.market-movers-var .value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
}

.market-movers-var .variation-value {
  font-weight: 600;
}

.market-movers-var .badge {
  font-size: 0.7rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}

.price-mono {
  color: #f8fafc;
  font-weight: 600;
}

.sector-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sector-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  color: #e2e8f0;
  border: 1px solid var(--news-border);
  border-radius: calc(var(--news-radius) - 0.45rem);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sector-activity-item.is-pos {
  background: rgba(var(--news-emerald-rgb), 0.12);
  border-color: rgba(var(--news-emerald-rgb), 0.35);
}

.sector-activity-item.is-neg {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}

.sector-activity-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(var(--news-emerald-rgb), 0.25);
  border-color: rgba(var(--news-emerald-rgb), 0.55);
}

.sector-activity-infos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sector-activity-infos i {
  font-size: 1rem;
}

.sector-activity-pct {
  font-family: "Roboto Mono", "SFMono-Regular", Menlo, monospace;
  font-weight: 600;
}

/* ------------------------------------------------------------------------- */
/* Sector map                                                                */
/* ------------------------------------------------------------------------- */

.sector-map {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(6, 18, 30, 0.85);
  border: 1px solid rgba(94, 234, 212, 0.2);
}

.sector-map__tile {
  position: absolute;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(248, 250, 252, 0.25);
  padding: min(0.65rem, 1.2vw);
  text-align: center;
  transition: filter 0.2s ease;
  overflow: hidden;
}

.sector-map__tile.tile-pos {
  background: rgba(var(--news-emerald-rgb), 0.28);
  border-color: rgba(var(--news-emerald-rgb), 0.4);
}

.sector-map__tile.tile-neg {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
}

.sector-map__tile:hover {
  filter: brightness(1.1);
}

.sector-map__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.15rem;
  width: 100%;
  height: 100%;
}

.sector-map__name {
  font-size: clamp(0.65rem, 1vw, 0.85rem);
  font-weight: 500;
  opacity: 0.85;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
  display: block;
}

.sector-map__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.sector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sector-pill {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 150px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--news-border-strong);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  color: #e2e8f0;
}

.sector-pill strong {
  font-variant-numeric: tabular-nums;
}

.sector-pill.tile-pos {
  background: rgba(var(--news-emerald-rgb), 0.16);
  border-color: rgba(var(--news-emerald-rgb), 0.35);
  color: #d1fae5;
}

.sector-pill.tile-neg {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fee2e2;
}

.news-thermo--mobile .sector-pill {
  flex: 1 1 100%;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .news-feature {
    min-height: clamp(320px, 60vh, 520px);
  }

  .feature-title {
    font-size: clamp(1.5rem, 4vw, 2.1rem);
  }

  .feature-excerpt {
    font-size: 0.98rem;
  }

  .news-feature-logo {
    position: static;
    margin-top: 1rem;
  }
}

@media (max-width: 820px) {
  .news-shell {
    overflow-x: hidden;
  }

  .news-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .news-feature {
    min-height: auto;
  }

  .news-feature-content {
    padding: 1.5rem;
    gap: 1rem;
  }

  .feature-title {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }

  .feature-excerpt {
    font-size: 0.92rem;
  }

  .sector-map {
    position: static;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.75rem;
  }

  .sector-map__tile {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 82px;
    padding: 1rem 1.25rem;
  }

  .sector-map__content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }

  .sector-map__name {
    font-size: 0.95rem;
    max-width: 65%;
  }

  .sector-map__pct {
    position: static;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.65);
  }
}

@media (max-width: 575.98px) {
  .news-shell {
    padding: 1.25rem 1rem 2rem;
    overflow-x: hidden;
  }

  .news-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-hero .card-body {
    padding: 1.5rem;
  }

  .news-hero-title {
    font-size: 1.5rem;
  }

  .news-hero-subtitle {
    font-size: 0.95rem;
  }

  .news-hero-cta {
    width: 100%;
    flex-direction: column;
    gap: 0.65rem;
  }

  .news-hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .news-hero-mini-thermo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .news-hero-mini-thermo--bottom {
    padding: 1.25rem;
  }

  .hero-thermo-compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .news-stream-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .news-feed-row {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .news-feed-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .news-feed-stats {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .news-thermo {
    padding: 1rem;
  }

  .news-feature-content {
    padding: 1.5rem;
  }

  .sector-pill {
    flex: 1 1 100%;
  }

  .news-hero-mini-thermo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-hero-mini-thermo--bottom .news-hero-mini-thermo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .news-hero-mini-thermo,
  .news-hero-mini-thermo--bottom .news-hero-mini-thermo {
    grid-template-columns: 1fr;
  }
}
