/* ==========================================================================
   Tin Tức Tài Chính (Investing.com-inspired layout + Thông Tin Sàn identity)
   ========================================================================== */

/* Sub-Category Bar (right below sticky header, Investing.com style) */
.news-subnav-bar {
  background-color: #ffffff;
  border-block-end: 1px solid var(--border-subtle);
  box-shadow: 0 1px 2px rgba(11, 31, 58, 0.03);
}

.news-subnav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 9px;
}

.news-subnav-list::-webkit-scrollbar {
  display: none;
}

.subnav-chip {
  flex-shrink: 0;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.subnav-chip:hover {
  background-color: var(--surface-canvas);
  color: var(--navy-900);
}

.subnav-chip.is-active {
  background-color: var(--navy-900);
  color: var(--gold-300);
  border-color: var(--navy-900);
}

/* Main 2-Column Investing.com Editorial Grid */
.news-main-shell {
  padding: 26px 0 72px;
}

.news-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 32px;
  align-items: start;
}

.news-primary-col,
.news-sidebar,
.all-news-box {
  min-inline-size: 0;
  max-inline-size: 100%;
}

/* Section Heading */
.news-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 12px;
  margin-block-end: 20px;
  border-block-end: 2px solid var(--navy-900);
}

.news-page-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  color: var(--navy-900);
}

.news-section-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Featured Hero Story (Investing.com Top Story) */
.featured-story-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  margin-block-end: 20px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.featured-story-card:hover {
  border-color: var(--gold-500);
  box-shadow: var(--shadow-md);
}

.featured-thumb-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--navy-900);
}

.featured-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.featured-story-card:hover .featured-thumb-wrap img {
  transform: scale(1.03);
}

.story-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-600);
  background-color: var(--gold-50);
  border: 1px solid #ead48b;
  border-radius: 4px;
  margin-block-end: 10px;
}

.featured-story-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--navy-900);
  margin-block-end: 12px;
}

.featured-story-card:hover .featured-story-title {
  color: var(--accent-crimson);
}

.featured-story-excerpt {
  margin: 0 0 14px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.story-meta strong {
  color: var(--navy-800);
  font-weight: 600;
}

/* 4-Card Sub-Hero Strip (Investing.com 4 cards under Hero) */
.subhero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-block-end: 36px;
}

.subhero-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.subhero-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.subhero-thumb {
  aspect-ratio: 16 / 10;
  background-color: var(--navy-900);
  overflow: hidden;
}

.subhero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.subhero-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.subhero-title {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--navy-900);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subhero-card:hover .subhero-title {
  color: var(--accent-crimson);
}

.subhero-time {
  margin-block-start: auto;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Section 2: "Tất cả các Tin Tức" Tabbed List (Investing.com Screenshot 2) */
.all-news-box {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px 10px;
  box-shadow: var(--shadow-xs);
}

.all-news-heading {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 900;
  color: var(--navy-900);
  margin-block-end: 16px;
}

.news-tabs-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-block-end: 1px solid var(--border-subtle);
  margin-block-end: 6px;
}

.news-tabs-bar::-webkit-scrollbar {
  display: none;
}

.news-tab-btn {
  position: relative;
  flex-shrink: 0;
  padding: 10px 2px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.news-tab-btn:hover {
  color: var(--navy-900);
}

.news-tab-btn.is-active {
  color: var(--navy-900);
  font-weight: 700;
}

.news-tab-btn.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  block-size: 2.5px;
  background-color: var(--gold-500);
  border-radius: 2px;
}

/* Editorial Feed Rows */
.news-feed-list {
  display: flex;
  flex-direction: column;
}

.news-feed-item {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-block: 18px;
  border-block-end: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.news-feed-item:last-child {
  border-block-end: 0;
}

.news-feed-thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--navy-900);
}

.news-feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-feed-title {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy-900);
  margin: 0 0 7px;
}

.news-feed-item:hover .news-feed-title {
  color: var(--accent-crimson);
}

.news-feed-excerpt {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.58;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14.5px;
}

/* ==========================================================================
   RIGHT SIDEBAR (Market Quotes + Top 4 IB Brokers Conversion Widget)
   ========================================================================== */

.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  inset-block-start: 92px;
}

.sidebar-widget {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-xs);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 12px;
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-900);
}

.widget-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.market-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border-block-end: 1px solid var(--border-subtle);
  margin-block-end: 10px;
}

.market-tab-btn {
  padding: 7px 4px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-block-end: 2px solid transparent;
  cursor: pointer;
}

.market-tab-btn:hover {
  color: var(--navy-900);
}

.market-tab-btn.is-active {
  color: var(--navy-900);
  font-weight: 700;
  border-block-end-color: var(--gold-500);
}

.market-quotes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.market-quotes-table tr + tr {
  border-block-start: 1px solid #f1f4f8;
}

.market-quotes-table td {
  padding: 9px 2px;
}

.quote-symbol {
  font-weight: 700;
  color: var(--navy-900);
}

.quote-price {
  text-align: end;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-change {
  text-align: end;
  font-weight: 700;
  white-space: nowrap;
}

.quote-up { color: #059669; }
.quote-down { color: #dc2626; }

.widget-disclaimer {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: end;
}

/* Sidebar Top 4 Brokers IB Conversion Box */
.sidebar-brokers-widget {
  border-block-start: 3px solid var(--gold-500);
}

.sidebar-broker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-broker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.sb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-inline-size: 0;
}

.sb-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sb-info {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.sb-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy-900);
  line-height: 1.2;
}

.sb-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.sb-cta {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--accent-crimson);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.sb-cta:hover {
  background-color: var(--accent-crimson-hover);
}

.sb-all-link {
  display: block;
  margin-block-start: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.sb-all-link:hover {
  background-color: var(--gold-50);
  border-color: var(--gold-500);
}

/* ==========================================================================
   FULL ARTICLE READER DIALOG
   ========================================================================== */

.article-dialog {
  inline-size: min(94dvw, 820px);
}

.article-cover-wrap {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-block-end: 18px;
  background-color: var(--navy-900);
}

.article-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-highlights {
  padding: 16px 18px;
  margin-block-end: 20px;
  background-color: var(--gold-50);
  border-inline-start: 3.5px solid var(--gold-500);
  border-radius: var(--radius-sm);
}

.article-highlights h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-600);
  margin-block-end: 8px;
}

.article-highlights ul {
  margin: 0;
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--navy-900);
}

.article-content p {
  margin: 0 0 15px;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--text-primary);
}

.article-subheading {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 22px 0 10px;
}

.article-quote {
  margin: 16px 0;
  padding: 12px 16px;
  background-color: var(--surface-subtle);
  border-inline-start: 3px solid var(--navy-800);
  font-style: italic;
  color: var(--text-secondary);
}

.article-body-list {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.article-ib-banner {
  margin-block-start: 24px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.article-ib-banner h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold-300);
  margin-block-end: 6px;
}

.article-ib-banner p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: #cbd5e1;
}

.article-ib-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-ib-btn {
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--accent-crimson);
  border-radius: var(--radius-sm);
}

.article-ib-btn:hover {
  background-color: var(--accent-crimson-hover);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS FOR NEWS PAGE
   ========================================================================== */

@media (max-width: 1080px) {
  .news-layout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .featured-story-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .featured-story-title {
    font-size: 19px;
  }

  .subhero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .news-feed-item {
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 14px;
  }

  .news-feed-title {
    font-size: 15px;
  }

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

@media (max-width: 520px) {
  .news-main-shell {
    padding: 18px 0 48px;
  }

  .all-news-box {
    padding: 16px 14px 8px;
  }

  .news-feed-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .subhero-grid {
    grid-template-columns: 1fr;
  }
}
