/* ===========================
   FILE: index.css
   Pixel-accurate index page styles
   Matches the reference screenshot design
=========================== */

/* =============================================
   HERO SECTION
   Left: big rounded story card + 2 secondary cards
   Right: Today's Briefing panel
============================================= */

.idx-hero {
  background: #f2f3f5;
  border-bottom: 1px solid var(--border);
  padding: 20px 0 0;
}

html.theme-dark .idx-hero {
  background: var(--surface-2);
}

.idx-hero-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}

/* ------ LEFT COLUMN ------ */
.idx-hero-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Main featured card (rounded) ---- */
.idx-hero-feature {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1a2535;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.idx-hero-feature:hover {
  text-decoration: none;
}

.idx-hero-feature-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.4s, transform 0.45s;
}

.idx-hero-feature:hover .idx-hero-feature-img {
  opacity: 0.72;
  transform: scale(1.03);
}

/* No-image fallback for hero */
.idx-hero-feature-noimag {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4f7c 40%, #1a2d47 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-hero-feature-noimag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(255, 255, 255, 0.06) 0%, transparent 65%);
}

.idx-hero-feature-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  padding: 24px 26px;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.48) 50%,
      transparent 100%);
  min-height: 320px;
}

/* Yellow "TOP STORY" badge */
.idx-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f5c518;
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 12px;
  width: fit-content;
}

.idx-hero-feature-overlay h1 {
  font-size: 2rem;
  line-height: 1.17;
  color: #fff;
  margin: 0 0 10px;
  max-width: 26ch;
  font-weight: 800;
}

.idx-hero-excerpt {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 58ch;
}

/* ---- Secondary cards row (2 side by side) ---- */
.idx-hero-secondaries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.idx-secondary-card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.idx-secondary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.idx-secondary-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #e8ecf0;
  height: 140px;
  flex-shrink: 0;
}

.idx-secondary-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}

.idx-secondary-card:hover .idx-secondary-img {
  transform: scale(1.05);
}

/* No-image fallback for secondary card */
.idx-secondary-img-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dde3eb 0%, #c8d4e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-secondary-img-ph::after {
  content: '📰';
  font-size: 2.5rem;
  opacity: 0.35;
}

.idx-secondary-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.idx-secondary-label {
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.idx-secondary-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-secondary-excerpt {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Force all text inside secondary card links to correct colors */
.idx-secondary-card .idx-secondary-label {
  color: var(--primary);
}

.idx-secondary-card .idx-secondary-title {
  color: var(--text);
}

.idx-secondary-card .idx-secondary-excerpt {
  color: var(--muted);
}

/* Force briefing row text colors */
.idx-briefing-row .idx-briefing-title {
  color: var(--text);
}

.idx-briefing-row .idx-briefing-meta {
  color: var(--muted);
}


/* ------ RIGHT: Today's Briefing panel ------ */
.idx-briefing-panel {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.idx-briefing-top {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.idx-briefing-top h2 {
  font-size: 0.95rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Lightning bolt icon */
.idx-briefing-top h2::before {
  content: '⚡';
  font-size: 1rem;
  display: inline;
}

/* "Live" badge */
.idx-briefing-live {
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid #22c55e;
  color: #16a34a;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

html.theme-dark .idx-briefing-live {
  color: #4ade80;
  border-color: #4ade80;
}

.idx-briefing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.idx-briefing-list li {
  border-bottom: 1px solid var(--border);
}

.idx-briefing-list li:last-child {
  border-bottom: none;
}

.idx-briefing-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 0.15s;
}

.idx-briefing-row:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.idx-briefing-row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.idx-briefing-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-briefing-meta {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.idx-briefing-meta .idx-bm-cat {
  font-weight: 700;
}

/* Circular thumbnail */
.idx-briefing-circ {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}

.idx-briefing-circ-ph {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dde3eb, #c8d4e0);
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0.5;
}

/* "View All Briefs" button */
.idx-briefing-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.idx-briefing-viewall-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  text-decoration: none;
}

.idx-briefing-viewall-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 37, 37, 0.04);
  text-decoration: none;
}


/* =============================================
   SHARED SECTION HEADER
============================================= */

.idx-sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.idx-sh-title {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 11px;
  position: relative;
}

.idx-sh-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 72%;
  background: var(--primary);
  border-radius: 2px;
}

.idx-sh-more {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.18s;
}

.idx-sh-more:hover {
  color: var(--primary);
  text-decoration: none;
}

/* =============================================
   SECTION PADDING
============================================= */

.idx-sec {
  padding: 36px 0;
}

/* Alternate section background (light gray) */
.idx-sec-alt {
  background: var(--surface-2);
}

/* =============================================
   3-COLUMN CATEGORY GRID
   Politics / Business / News
============================================= */

.idx-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.idx-cat-col {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.idx-cat-col:last-child {
  border-right: none;
}

.idx-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.idx-cat-head h3 {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.idx-cat-head a {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.idx-cat-head a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Lead image card */
.idx-cat-lead {
  position: relative;
  overflow: hidden;
  background: #111;
  height: 160px;
  display: block;
  text-decoration: none;
  flex-shrink: 0;
}

.idx-cat-lead:hover {
  text-decoration: none;
}

.idx-cat-lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transition: opacity 0.3s, transform 0.4s;
}

.idx-cat-lead:hover .idx-cat-lead-img {
  opacity: 0.63;
  transform: scale(1.04);
}

.idx-cat-lead-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.1) 60%, transparent);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.idx-cat-lead-cat {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-bottom: 3px;
}

.idx-cat-lead-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sub-articles list */
.idx-cat-articles {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  background: var(--surface);
}

.idx-cat-articles li {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.idx-cat-articles li:last-child {
  border-bottom: none;
}

.idx-cat-articles a {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s;
}

.idx-cat-articles a:hover {
  color: var(--primary);
  text-decoration: none;
}

.idx-cat-articles p {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-cat-articles time {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}

/* =============================================
   LIFESTYLE & CULTURE
   Left: big image | Right: thumbnail list
============================================= */

.idx-life-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 24px;
  align-items: start;
}

/* Big left image */
.idx-life-main {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
  aspect-ratio: 16/10;
  display: block;
  text-decoration: none;
}

.idx-life-main:hover {
  text-decoration: none;
}

.idx-life-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.74;
  transition: opacity 0.35s, transform 0.45s;
}

.idx-life-main:hover .idx-life-main-img {
  opacity: 0.6;
  transform: scale(1.03);
}

.idx-life-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.3) 55%,
      transparent 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.idx-life-kicker {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
  width: fit-content;
}

.idx-life-overlay h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 8px;
}

.idx-life-excerpt {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

/* Right list */
.idx-life-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.idx-life-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.18s;
}

.idx-life-item:first-child {
  padding-top: 0;
}

.idx-life-item:last-child {
  border-bottom: none;
}

.idx-life-item:hover {
  opacity: 0.8;
  text-decoration: none;
}

.idx-life-item-thumb {
  width: 80px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.idx-life-item-ph {
  width: 80px;
  height: 58px;
  border-radius: 6px;
  background: var(--surface-2);
}

.idx-life-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.idx-life-item-cat {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.idx-life-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-life-item time {
  font-size: 0.7rem;
  color: var(--muted);
}

/* =============================================
   TECH & INNOVATION (3-col cards)
============================================= */

.idx-tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.idx-tech-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.idx-tech-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.idx-tech-img-wrap {
  position: relative;
  overflow: hidden;
  background: #111;
  aspect-ratio: 16/9;
}

.idx-tech-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.idx-tech-card:hover .idx-tech-img {
  transform: scale(1.05);
}

.idx-tech-img-ph {
  width: 100%;
  height: 100%;
  background: var(--surface-2);
}

.idx-tech-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.idx-tech-cat {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.idx-tech-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.32;
}

.idx-tech-excerpt {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-tech-time {
  font-size: 0.7rem;
  color: var(--muted);
}

/* =============================================
   TRENDING VIDEOS (3-col, dark thumbnail + play btn)
============================================= */

.idx-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.idx-video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.idx-video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.idx-video-thumb {
  position: relative;
  overflow: hidden;
  background: #0d1117;
  aspect-ratio: 16/9;
}

.idx-video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.4s;
}

.idx-video-card:hover .idx-video-thumb-img {
  opacity: 0.55;
  transform: scale(1.03);
}

.idx-video-thumb-ph {
  width: 100%;
  height: 100%;
  background: #1a2535;
}

/* Red play button overlay */
.idx-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.idx-video-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

.idx-video-card:hover .idx-video-play-btn {
  transform: scale(1.1);
}

.idx-video-play-btn svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  margin-left: 2px;
}

.idx-video-body {
  padding: 12px 14px;
  background: var(--surface);
}

.idx-video-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idx-video-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Trailing red dot for "Trending" badge */
.idx-trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.idx-trending-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: idx-blink 1.4s ease-in-out infinite;
}

/* =============================================
   MOST READ (numbered list + editor's pick)
============================================= */

.idx-read-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.idx-read-ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.idx-read-ol li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.idx-read-ol li:last-child {
  border-bottom: none;
}

.idx-read-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.idx-read-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.idx-read-cat {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.idx-read-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.18s;
}

.idx-read-title:hover {
  color: var(--primary);
  text-decoration: none;
}

.idx-read-time {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Editor's Pick card */
.idx-pick-box {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idx-pick-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.idx-pick-label::before {
  content: '★';
  font-size: 0.8rem;
}

.idx-pick-box h3 {
  font-size: 1.05rem;
  line-height: 1.28;
}

.idx-pick-box h3 a {
  color: var(--text);
  transition: color 0.18s;
}

.idx-pick-box h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.idx-pick-box p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.idx-pick-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.idx-pick-link:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* =============================================
   EDITORIAL / IN DEPTH
============================================= */

.idx-ed-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}

.idx-ed-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.idx-big-story {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.idx-big-story-label {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.idx-big-story h3 {
  font-size: 1.2rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.idx-big-story h3 a {
  color: var(--text);
}

.idx-big-story h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.idx-big-story p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.idx-big-story-meta {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.idx-block-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.idx-simple-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idx-simple-list li {
  font-size: 0.85rem;
  color: var(--muted);
  padding-left: 10px;
  border-left: 3px solid var(--border);
  line-height: 1.4;
}

.idx-sidebar-panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.idx-sidebar-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
}

.idx-sidebar-panel h4 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.idx-sidebar-panel ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.idx-sidebar-panel li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 9px;
  border-left: 2px solid var(--border);
  line-height: 1.4;
}

.idx-sidebar-panel.subtle p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.idx-sidebar-panel.subtle a {
  color: var(--primary);
  font-weight: 600;
}

/* =============================================
   NEWSLETTER CTA (above footer)
============================================= */

.idx-nl {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
}

.idx-nl-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: center;
}

.idx-nl h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.idx-nl p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.idx-nl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idx-nl-input-row {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s;
}

.idx-nl-input-row:focus-within {
  border-color: var(--primary);
}

.idx-nl-input-row input {
  flex: 1;
  border: none;
  padding: 12px 15px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  outline: none;
  min-width: 0;
}

.idx-nl-input-row input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.idx-nl-btn {
  padding: 12px 24px;
  border: none;
  background: #f5c518;
  color: #000;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.18s;
  white-space: nowrap;
}

.idx-nl-btn:hover {
  opacity: 0.88;
}

.idx-nl-note {
  font-size: 0.78rem;
  color: var(--muted);
}

/* =============================================
   RESPONSIVE
============================================= */

@media (min-width: 768px) and (max-width: 979px) {
  .idx-hero-wrap {
    grid-template-columns: 1fr;
  }

  .idx-briefing-panel {
    border-top: 1px solid var(--border);
    max-height: 280px;
  }

  .idx-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .idx-cat-grid .idx-cat-col:last-child {
    display: none;
  }

  .idx-life-grid {
    grid-template-columns: 1fr;
  }

  .idx-tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .idx-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .idx-read-grid {
    grid-template-columns: 1fr;
  }

  .idx-ed-grid {
    grid-template-columns: 1fr;
  }

  .idx-nl-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .idx-hero-wrap {
    grid-template-columns: 1fr;
  }

  .idx-hero-feature-overlay h1 {
    font-size: 1.45rem;
  }

  .idx-hero-feature-overlay {
    padding: 20px;
  }

  .idx-hero-secondaries {
    grid-template-columns: 1fr;
  }

  .idx-secondary-card:last-child {
    border-top: 1px solid var(--border);
  }

  .idx-briefing-panel {
    border-top: 1px solid var(--border);
    max-height: 320px;
  }

  .idx-cat-grid {
    grid-template-columns: 1fr;
  }

  .idx-life-grid {
    grid-template-columns: 1fr;
  }

  .idx-tech-grid {
    grid-template-columns: 1fr;
  }

  .idx-videos-grid {
    grid-template-columns: 1fr;
  }

  .idx-read-grid {
    grid-template-columns: 1fr;
  }

  .idx-ed-grid {
    grid-template-columns: 1fr;
  }

  .idx-nl-grid {
    grid-template-columns: 1fr;
  }

  .idx-sec {
    padding: 26px 0;
  }
}


/* =============================================
   GLOBAL FIXES — eliminate blue default link
   color in all index-page article sections
============================================= */

/* Any link inside an idx-* section that doesn't
   have an explicit colour class: make it inherit
   or use --text so browser-blue never shows */
[class*="idx-"] a,
[class*="idx-"] a:visited {
  color: inherit;
  text-decoration: none;
}

[class*="idx-"] a:hover {
  text-decoration: none;
}

/* Specific card / list colours that must be explicit */
.idx-cat-articles a,
.idx-cat-articles a:visited {
  color: var(--text);
}

.idx-cat-articles a:hover {
  color: var(--primary);
}

.idx-read-title,
.idx-read-title:visited {
  color: var(--text);
}

.idx-read-title:hover {
  color: var(--primary);
}

.idx-video-title {
  color: var(--text);
}

.idx-video-meta {
  color: var(--muted);
}

.idx-tech-title {
  color: var(--text);
}

.idx-tech-excerpt {
  color: var(--muted);
}

.idx-tech-cat {
  color: var(--primary);
}

.idx-life-item-title {
  color: var(--text);
}

.idx-life-item-cat {
  color: var(--primary);
}

.idx-briefing-title {
  color: var(--text);
}

.idx-briefing-meta,
.idx-bm-cat {
  color: var(--muted);
}

.idx-big-story h3 a,
.idx-big-story h3 a:visited {
  color: var(--text);
}

.idx-big-story h3 a:hover {
  color: var(--primary);
}

.idx-pick-box h3 a,
.idx-pick-box h3 a:visited {
  color: var(--text);
}

.idx-pick-box h3 a:hover {
  color: var(--primary);
}

/* =============================================
   COVERAGE AREAS — card grid
   (these use style.css .card class which may
    not be getting its color right on this page)
============================================= */

.section-coverage .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.section-coverage .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-coverage .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  text-decoration: none;
}

.section-coverage .card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.section-coverage .card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.section-coverage .card .card-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}

/* =============================================
   VIDEO CARDS — final polish
============================================= */

.idx-video-card {
  background: var(--surface);
  border-radius: 12px;
}

/* Ensure play button is always red */
.idx-video-play-btn {
  background: var(--primary) !important;
}

/* =============================================
   MOST READ — polish
============================================= */

.idx-read-num {
  /* lighter colour for the big rank number */
  color: var(--border);
  user-select: none;
}

/* =============================================
   CATEGORY GRID — no-image fallback for lead
============================================= */

.idx-cat-lead-ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3558 0%, #243d6b 50%, #1a2d47 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  opacity: 0.55;
}

/* Fix border-right showing blue on .idx-cat-head links */
.idx-cat-head a,
.idx-cat-head a:visited {
  color: var(--muted);
}

.idx-cat-head a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* =============================================
   LIFESTYLE right-panel thumbnails placeholder
============================================= */

.idx-life-item-ph {
  width: 80px;
  height: 58px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e8edf3 0%, #dbe3ec 100%);
  flex-shrink: 0;
}

/* =============================================
   SECTION STANDARDS / BUILT FOR TRUST
   (fix any blue link colours here too)
============================================= */

.section-standards a,
.section-standards a:visited {
  color: var(--text);
}

.section-standards a:hover {
  color: var(--primary);
}

/* =============================================
   EDITORIAL sidebar items fix
============================================= */

.idx-sidebar-panel li {
  color: var(--muted);
}

.idx-sidebar-panel a,
.idx-sidebar-panel a:visited {
  color: var(--primary);
}

/* =============================================
   LIFESTYLE NO-IMAGE FALLBACKS
============================================= */

/* Big left card without image */
.idx-life-main.no-img {
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: auto;
  /* Remove aspect ratio constraint */
  padding: 36px;
}

.idx-life-main.no-img .idx-life-overlay {
  position: static;
  background: none;
  padding: 0;
  justify-content: flex-start;
}

.idx-life-main.no-img h3 {
  color: var(--text);
  margin-top: 10px;
}

.idx-life-main.no-img .idx-life-excerpt {
  color: var(--muted);
}

/* Right list items without thumbnail */
.idx-life-item.no-img {
  display: flex !important;
}

.idx-life-item.no-img .idx-life-item-body {
  width: 100%;
}

/* =============================================
   NEWSLETTER section minor polish
============================================= */

.idx-nl h2 {
  font-weight: 800;
}

/* =============================================
   CATEGORY LEAD NO-IMAGE FALLBACK
============================================= */

.idx-cat-lead.no-img {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  /* Restore border on bottom so it divides from the rest of the list */
  height: auto;
  /* Override the fixed 160px height */
}

.idx-cat-lead.no-img .idx-cat-lead-overlay {
  position: static;
  background: none;
  padding: 14px;
  justify-content: flex-start;
}

.idx-cat-lead.no-img .idx-cat-lead-title {
  color: var(--text);
  margin-bottom: 6px;
}

.idx-cat-lead-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}