/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --red:      #C90000;
  --red-dark: #990000;
  --gold:     #FFD400;
  --ink:      #111111;
  --body:     #1F2937;
  --muted:    #6B7280;
  --line:     #E5E7EB;
  --soft:     #F9FAFB;
  --paper:    #FFFFFF;
  --max:      1200px;
}

/* ── Reset + Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: Arial, Helvetica, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
.logo-malaysia, .nav-link, .mob-link, .strip-label,
.section-title, .footer-heading, .newsletter-title {
  font-family: 'Poppins', Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button, input { font: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; overflow-wrap: anywhere; }

/* ── Layout Utilities ───────────────────────────────────────────────────── */
.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Top Bar ────────────────────────────────────────────────────────────── */
.top-bar {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.top-bar-flag { margin-right: 6px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: #090909;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none;
  transition: box-shadow 200ms ease;
}
.site-header.is-compact {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 106px;
  transition: min-height 200ms ease;
}
.site-header.is-compact .header-inner { min-height: 68px; }

.menu-btn,
.search-toggle {
  display: inline-flex;
  width: 42px; height: 44px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.menu-btn {
  flex-direction: column;
  gap: 5px;
}
.menu-btn span {
  display: block; width: 18px; height: 2px;
  background: currentColor; border-radius: 1px;
}
.search-toggle svg {
  width: 19px;
  height: 19px;
}
.menu-btn:hover,
.search-toggle:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Logo */
.logo {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  text-align: center;
}
.logo-badge {
  width: 40px; height: 40px;
  background: var(--red);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: width 200ms ease, height 200ms ease;
}
.site-header.is-compact .logo-badge { width: 32px; height: 32px; }
.logo-text {
  display: flex; flex-direction: column; line-height: 1.1;
}
.logo-good {
  font-size: 12px; font-weight: 400;
  color: var(--muted); letter-spacing: 0.3px;
}
.logo-malaysia {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: clamp(31px, 4.2vw, 48px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.4px;
  line-height: 0.95;
  text-transform: none;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  transition: font-size 200ms ease, color 200ms ease;
}
.site-header.is-compact .logo-malaysia {
  font-size: clamp(22px, 2.5vw, 30px);
}

/* Social buttons */
.social-links {
  grid-column: 3;
  display: flex; gap: 8px;
  justify-self: end;
}
.social-btn {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.28); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover { background: #fff; border-color: #fff; color: var(--red); }

/* ── Main Navigation ────────────────────────────────────────────────────── */
.main-nav {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-height: 46px;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition:
    max-height 90ms ease,
    opacity 70ms ease,
    transform 90ms ease,
    border-width 70ms ease;
}
.site-header.is-nav-hidden .main-nav {
  border-top-width: 0;
  border-bottom-width: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}
.nav-inner {
  display: flex; align-items: stretch; justify-content: center; min-height: 44px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: stretch;
  min-height: 44px;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center;
  padding: 0 16px; white-space: nowrap;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.nav-link:hover, .nav-link.is-active {
  background: #f8f8f8;
  color: var(--red); border-bottom-color: var(--red);
}
.nav-cta {
  background: rgba(255,255,255,0.15);
  border-radius: 3px; margin-top: 6px; margin-bottom: 6px;
  padding: 0 12px; border-bottom: 3px solid transparent;
}
.nav-cta:hover { background: rgba(255,255,255,0.28); border-bottom-color: transparent; }

/* Slide-out menu */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.46);
  opacity: 0;
  transition: opacity 180ms ease;
}
.menu-backdrop.is-open {
  opacity: 1;
}
.menu-open {
  overflow: hidden;
}
.mobile-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: min(360px, 88vw);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 40px rgba(0,0,0,0.22);
  transform: translateX(-102%);
  transition: transform 220ms ease;
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu-inner { padding: 0 24px 26px; }
.drawer-head {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 4px solid var(--red);
}
.drawer-head strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}
.drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.drawer-section {
  padding-top: 20px;
}
.drawer-label {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.mob-link {
  display: block; padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--ink);
  transition: color 150ms ease;
}
.mob-link:last-child { border-bottom: 0; }
.mob-link:hover { color: var(--red); }
.drawer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 22px;
}
.drawer-social a {
  border: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.drawer-social a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Search panel */
.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.52);
  opacity: 0;
  transition: opacity 180ms ease;
}
.search-backdrop.is-open {
  opacity: 1;
}
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.search-panel.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.search-form {
  position: relative;
  width: min(680px, 100%);
  background: #fff;
  border-top: 5px solid var(--red);
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  padding: 38px 32px 32px;
}
.search-label {
  display: block;
  margin-bottom: 14px;
  padding-right: 46px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1;
}
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 2px solid var(--ink);
}
.search-input {
  min-width: 0;
  border: 0;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}
.search-submit {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 0 20px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}
.search-submit:hover {
  background: var(--red-dark);
}
.search-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.search-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.search-close:hover {
  background: var(--red);
}
.search-open {
  overflow: hidden;
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.hero-section { padding: 28px 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
}

.lead-card { display: flex; flex-direction: column; }
.lead-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 3 / 2;
}
.lead-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.lead-card:hover .lead-media img { transform: scale(1.03); }
.lead-body { padding: 16px 0 8px; }
.lead-title {
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 900; line-height: 1.08;
  color: var(--ink); margin: 8px 0;
  transition: color 150ms ease;
}
.lead-card:hover .lead-title { color: var(--red); }
.lead-excerpt {
  color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 4px;
}

.hero-side { display: flex; flex-direction: column; }
.side-card {
  display: flex; flex-direction: column;
  padding-bottom: 20px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.side-card:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.side-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 16 / 10;
}
.side-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.side-card:hover .side-media img { transform: scale(1.03); }
.side-body { padding: 10px 0 0; }
.card-title {
  font-size: 19px; font-weight: 700; line-height: 1.2;
  color: var(--ink); margin: 6px 0 0;
  transition: color 150ms ease;
}
.side-card:hover .card-title { color: var(--red); }

/* ── Card Meta ──────────────────────────────────────────────────────────── */
.card-meta {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.cat-pill {
  display: inline-block;
  padding: 3px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.3px; color: #fff; white-space: nowrap;
}
.cat-news          { background: #C90000; }
.cat-social-stories{ background: #E11D48; }
.cat-people        { background: #D97706; }
.cat-lifestyle     { background: #059669; }
.cat-culture       { background: #2563EB; }
.cat-opinion       { background: #111111; }
.cat-videos        { background: #111827; }

.time-ago { font-size: 11px; color: var(--muted); font-weight: 500; }

.video-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: #111827; color: #fff;
  font-size: 10px; font-weight: 900; text-transform: uppercase;
  padding: 3px 7px; border-radius: 3px;
}

/* ── Trending Strip ─────────────────────────────────────────────────────── */
.trending-section { margin-top: 22px; }
.trending-strip {
  display: grid;
  grid-template-columns: 160px 1fr;
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--line);
}
.strip-label {
  background: var(--red); color: #fff;
  display: flex; align-items: center; gap: 7px;
  padding: 14px 16px;
  font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.3px;
}
.strip-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.strip-item {
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px 14px;
  border-left: 1px solid var(--line);
  transition: background 150ms ease;
}
.strip-item:hover { background: var(--soft); }
.strip-item strong {
  font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.strip-item:hover strong { color: var(--red); }

/* ── Ad Placements ──────────────────────────────────────────────────────── */
.ad-banner {
  margin: 24px auto 32px; min-height: 90px;
  border: 1px dashed #cbd5e1; border-radius: 4px;
  background: repeating-linear-gradient(135deg, #f8fafc, #f8fafc 12px, #eef2f7 12px, #eef2f7 24px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: var(--muted);
}
.ad-label {
  display: block; font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 1px;
  color: #94a3b8; margin-bottom: 5px;
}
.ad-banner strong { color: var(--body); font-size: 14px; }
.ad-box {
  min-height: 250px;
  border: 1px dashed #cbd5e1; border-radius: 4px;
  background: repeating-linear-gradient(135deg, #f8fafc, #f8fafc 12px, #eef2f7 12px, #eef2f7 24px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: var(--muted); padding: 16px;
}
.ad-box strong { color: var(--body); font-size: 14px; margin-top: 4px; display: block; }

/* ── Content Layout ─────────────────────────────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px; align-items: start;
  padding-bottom: 60px;
}
.main-feed { display: flex; flex-direction: column; gap: 44px; }

/* ── Section Headers ────────────────────────────────────────────────────── */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
  border-top: 3px solid var(--ink); padding-top: 10px;
}
.section-title {
  font-size: 18px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.section-bar {
  display: inline-block; width: 4px; height: 20px;
  background: var(--red); border-radius: 2px; flex-shrink: 0;
}
.see-all {
  font-size: 12px; font-weight: 700; color: var(--red);
  white-space: nowrap;
}
.see-all:hover { text-decoration: underline; }

/* Tabs */
.tab-group {
  display: inline-flex;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
.tab-btn {
  min-width: 90px; min-height: 34px; border: 0;
  background: var(--soft); color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}
.tab-btn.is-active { background: var(--red); color: #fff; }
.tab-btn:not(.is-active):hover { background: var(--line); color: var(--ink); }

/* ── List Feed ──────────────────────────────────────────────────────────── */
.list-feed { display: flex; flex-direction: column; }
.list-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px; padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.list-card:first-child { padding-top: 0; }
.list-card:last-child { border-bottom: 0; }
.list-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 16 / 10; align-self: start;
}
.list-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.list-card:hover .list-media img { transform: scale(1.03); }
.list-body { display: flex; flex-direction: column; gap: 4px; }
.list-title {
  font-size: clamp(17px, 2vw, 21px); font-weight: 700;
  line-height: 1.2; color: var(--ink); margin: 4px 0;
  transition: color 150ms ease;
}
.list-card:hover .list-title { color: var(--red); }
.list-excerpt {
  font-size: 14px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Featured Card Grid ─────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.std-card { display: flex; flex-direction: column; }
.std-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 16 / 10;
}
.std-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.std-card:hover .std-media img { transform: scale(1.03); }
.std-body { padding: 12px 0 4px; }
.std-title {
  font-size: 16px; font-weight: 700; line-height: 1.25;
  color: var(--ink); margin: 6px 0 0;
  transition: color 150ms ease;
}
.std-card:hover .std-title { color: var(--red); }

/* ── Category Sections ──────────────────────────────────────────────────── */
.cat-section { scroll-margin-top: 72px; }
.cat-section + .cat-section { padding-top: 44px; }
.cat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
}
.cat-lead-card { display: flex; flex-direction: column; }
.cat-lead-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 16 / 10;
}
.cat-lead-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.cat-lead-card:hover .cat-lead-media img { transform: scale(1.03); }
.cat-lead-body { padding: 12px 0 4px; }
.cat-lead-title {
  font-size: 21px; font-weight: 700; line-height: 1.2;
  color: var(--ink); margin: 8px 0;
  transition: color 150ms ease;
}
.cat-lead-card:hover .cat-lead-title { color: var(--red); }
.cat-lead-excerpt {
  font-size: 14px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.cat-aside { display: flex; flex-direction: column; }
.mini-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mini-card:first-child { padding-top: 0; }
.mini-card:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-media {
  overflow: hidden; background: var(--soft);
  aspect-ratio: 4 / 3;
}
.mini-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 320ms ease;
}
.mini-card:hover .mini-media img { transform: scale(1.03); }
.mini-body { display: flex; flex-direction: column; gap: 4px; }
.mini-title {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  color: var(--ink); margin: 4px 0 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color 150ms ease;
}
.mini-card:hover .mini-title { color: var(--red); }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  position: sticky; top: 72px;
  display: flex; flex-direction: column; gap: 24px;
}

.trend-list { display: flex; flex-direction: column; }
.trend-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.trend-item:first-child { padding-top: 0; }
.trend-item:last-child { border-bottom: 0; }
.trend-num {
  width: 30px; height: 30px;
  background: var(--gold); color: var(--ink);
  font-weight: 900; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border-radius: 3px;
}
.trend-body { display: flex; flex-direction: column; gap: 2px; }
.trend-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--red); }
.trend-title {
  font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  transition: color 150ms ease;
}
.trend-item:hover .trend-title { color: var(--red); }

/* Newsletter */
.newsletter-widget {
  background: var(--soft);
  border: 1px solid var(--line); border-top: 3px solid var(--red);
  border-radius: 4px; padding: 20px;
}
.newsletter-title { font-size: 16px; font-weight: 900; color: var(--ink); margin-bottom: 8px; }
.newsletter-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px;
  font-size: 14px; outline: none; width: 100%;
  transition: border-color 150ms ease;
}
.newsletter-input:focus { border-color: var(--red); }
.newsletter-btn {
  background: var(--red); color: #fff; border: 0;
  padding: 10px; font-weight: 700; font-size: 14px; cursor: pointer;
  border-radius: 4px; transition: background 150ms ease;
}
.newsletter-btn:hover { background: var(--red-dark); }

/* Category link badges */
.category-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-link {
  padding: 6px 12px; border-radius: 3px;
  font-size: 11px; font-weight: 900; text-transform: uppercase;
  color: #fff; transition: opacity 150ms ease;
}
.cat-link:hover { opacity: 0.82; }
.cat-link-news          { background: #C90000; }
.cat-link-social-stories{ background: #E11D48; }
.cat-link-people        { background: #D97706; }
.cat-link-lifestyle     { background: #059669; }
.cat-link-culture       { background: #2563EB; }
.cat-link-opinion       { background: #111111; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #e5e7eb; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px; padding: 48px 0 40px;
}
.footer-logo {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-tagline {
  font-size: 14px; color: #9ca3af; line-height: 1.65;
  margin: 0 0 20px; max-width: 280px;
}
.footer-social { display: flex; gap: 10px; }
.social-btn-footer { border-color: #374151; color: #9ca3af; }
.footer-heading {
  font-size: 12px; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.5px; color: #fff; margin: 0 0 16px;
}
.footer-link {
  display: block; font-size: 14px; color: #9ca3af;
  padding: 4px 0; transition: color 150ms ease;
}
.footer-link:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #374151; padding: 16px 0;
  font-size: 13px; color: #6b7280;
}
.footer-bottom strong { color: #9ca3af; }

/* ── Responsive: Tablet (≤ 1023px) ─────────────────────────────────────── */
@media (max-width: 1023px) {
  .social-links { display: none; }

  .header-inner {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: 78px;
    position: relative;
  }
  .site-header.is-compact .header-inner { min-height: 58px; }
  .logo { grid-column: 2; justify-self: center; }
  .logo-malaysia { font-size: clamp(24px, 5vw, 34px); }
  .site-header.is-compact .logo-malaysia { font-size: clamp(20px, 4vw, 26px); }

  .main-nav {
    height: 0;
    max-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header.is-nav-hidden .main-nav {
    opacity: 1;
    transform: none;
  }
  .nav-shell {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    width: min(var(--max), calc(100% - 32px));
    min-height: 78px;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
  }
  .site-header.is-compact .nav-shell {
    min-height: 58px;
  }
  .menu-btn,
  .search-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.26);
    background: rgba(255,255,255,0.08);
    color: #fff;
    pointer-events: auto;
  }
  .menu-btn:hover,
  .search-toggle:hover {
    background: #fff;
    border-color: #fff;
    color: var(--red);
  }
  .nav-inner { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .side-card { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

  .trending-strip { grid-template-columns: 1fr; }
  .strip-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip-item { border-left: 0; border-top: 1px solid var(--line); }
  .strip-item:nth-child(3n+2),
  .strip-item:nth-child(3n+3) { border-left: 1px solid var(--line); }

  .content-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px; align-items: start;
  }

  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .cat-grid { grid-template-columns: 1fr; }
  .cat-lead-title { font-size: 20px; }
  .cat-aside {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .mini-card { grid-template-columns: 1fr; border-bottom: 0; padding: 0; }
  .mini-media { aspect-ratio: 16 / 10; }
}

/* ── Responsive: Mobile (≤ 639px) ──────────────────────────────────────── */
@media (max-width: 639px) {
  .wrap { width: min(var(--max), calc(100% - 24px)); }

  .top-bar { display: none; }

  .header-inner { min-height: 68px; gap: 10px; }
  .site-header.is-compact .header-inner { min-height: 54px; }
  .nav-shell {
    width: min(var(--max), calc(100% - 24px));
    min-height: 68px;
  }
  .site-header.is-compact .nav-shell { min-height: 54px; }
  .menu-btn,
  .search-toggle {
    width: 36px;
    height: 36px;
  }
  .search-toggle svg {
    width: 17px;
    height: 17px;
  }
  .mobile-menu { width: min(330px, 90vw); }
  .mobile-menu-inner { padding-inline: 20px; }
  .search-panel { padding: 18px; }
  .search-form { padding: 54px 20px 22px; }
  .search-label {
    padding-right: 0;
    font-size: 22px;
  }
  .search-row { grid-template-columns: 1fr; }
  .search-submit {
    min-height: 44px;
    padding: 0 16px;
  }

  .hero-side { grid-template-columns: 1fr; gap: 0; }
  .side-card { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
  .side-card:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

  .strip-items {
    display: flex; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
    grid-template-columns: unset;
  }
  .strip-items::-webkit-scrollbar { display: none; }
  .strip-item {
    min-width: 165px; max-width: 200px; flex-shrink: 0;
    border-top: 0; border-left: 1px solid var(--line);
  }
  .strip-item:first-child { border-left: 0; }

  .list-card { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .list-title { font-size: 16px; }

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

  .cat-aside { grid-template-columns: 1fr; gap: 0; }
  .mini-card {
    display: grid; grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .mini-card:first-child { padding-top: 0; }
  .mini-card:last-child { border-bottom: 0; padding-bottom: 0; }
  .mini-media { aspect-ratio: 4 / 3; }

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

  .section-head.tab-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tab-group { width: 100%; }
  .tab-btn { flex: 1; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; padding: 36px 0 28px; }
  .footer-bottom { text-align: center; }
}

/* ── Extra small (≤ 400px) ──────────────────────────────────────────────── */
@media (max-width: 400px) {
  .list-card { grid-template-columns: 95px minmax(0, 1fr); }
  .logo-malaysia { font-size: 20px; }
}
