/* ==========================================================================
   DailyMY Design System
   Malaysia & Singapore Trending News
   Version: 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand colours */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #e94560;
  --color-accent-hover: #d63851;
  --color-bg: #ffffff;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-border: #e0e0e0;

  /* Category colours */
  --cat-business: #2d6a4f;
  --cat-tech: #457b9d;
  --cat-entertainment: #e76f51;
  --cat-sports: #e94560;
  --cat-lifestyle: #9b5de5;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.14);

  /* Transitions */
  --transition: 0.3s ease;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

small {
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.grid-3 {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

section {
  padding: var(--space-lg) 0;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-daily {
  color: var(--color-white);
}

.logo-my {
  color: var(--color-accent);
}

/* Desktop nav */
.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-desktop a {
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--color-accent);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background-color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.nav-mobile a {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color var(--transition);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--color-accent);
}

.nav-mobile .close-btn {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   5. Lead Story Section
   -------------------------------------------------------------------------- */
.lead-story {
  background-color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-lg);
}

.lead-story .container {
  background-color: #f8f9fb;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.lead-story__link {
  display: block;
  max-width: 780px;
}

.lead-story__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.lead-story__date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.lead-story__title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  transition: color var(--transition);
}

.lead-story__link:hover .lead-story__title {
  color: var(--color-accent);
}

.lead-story__excerpt {
  font-size: 1.125rem;
  line-height: 1.65;
  color: #555555;
  max-width: 680px;
  margin-bottom: var(--space-md);
}

.lead-story__byline {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.lead-story__byline span + span::before {
  content: '\00B7';
  margin-right: var(--space-sm);
}

/* --------------------------------------------------------------------------
   5b. Category Label (dot + text pattern)
   -------------------------------------------------------------------------- */
.category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--color-text-light);
}

.category-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--color-text-muted);
}

.category-label--business { color: var(--cat-business); }
.category-label--business::before { background-color: var(--cat-business); }
.category-label--tech { color: var(--cat-tech); }
.category-label--tech::before { background-color: var(--cat-tech); }
.category-label--entertainment { color: var(--cat-entertainment); }
.category-label--entertainment::before { background-color: var(--cat-entertainment); }
.category-label--sports { color: var(--cat-sports); }
.category-label--sports::before { background-color: var(--cat-sports); }
.category-label--lifestyle { color: var(--cat-lifestyle); }
.category-label--lifestyle::before { background-color: var(--cat-lifestyle); }

/* --------------------------------------------------------------------------
   5c. Section Heading
   -------------------------------------------------------------------------- */
.section-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-text);
}

/* --------------------------------------------------------------------------
   5d. Content Grid (stories + sidebar)
   -------------------------------------------------------------------------- */
.content-section {
  padding: var(--space-xl) 0;
  background-color: #f5f6f8;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

/* --------------------------------------------------------------------------
   5e. Story Items (text-only list)
   -------------------------------------------------------------------------- */
.stories-main {
  min-width: 0;
}

.story-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  transition: border-left-color var(--transition), box-shadow var(--transition);
}

.story-item[data-category="business"] { border-left-color: var(--cat-business); }
.story-item[data-category="tech"] { border-left-color: var(--cat-tech); }
.story-item[data-category="entertainment"] { border-left-color: var(--cat-entertainment); }
.story-item[data-category="sports"] { border-left-color: var(--cat-sports); }
.story-item[data-category="lifestyle"] { border-left-color: var(--cat-lifestyle); }

.story-item:last-child {
  margin-bottom: 0;
}

.story-item:hover {
  box-shadow: var(--shadow-sm);
}

.story-item a {
  display: block;
  padding: var(--space-md) var(--space-lg);
}

.story-item__meta {
  margin-bottom: var(--space-xs);
}

.story-item__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  transition: color var(--transition);
}

.story-item a:hover .story-item__title {
  color: var(--color-accent);
}

.story-item__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-item__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.story-item__footer span + span::before {
  content: '\00B7';
  margin-right: var(--space-sm);
}

/* --------------------------------------------------------------------------
   5f. Trending Sidebar
   -------------------------------------------------------------------------- */
.trending-sidebar {
  display: none;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.trending-item__number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
  flex-shrink: 0;
  min-width: 1.5rem;
}

.trending-item__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  transition: color var(--transition);
  padding-top: 0.2rem;
}

.trending-item__title:hover {
  color: var(--color-accent);
}

/* Old hero styles retained for reference on other pages */
/* .hero { ... } */

/* --------------------------------------------------------------------------
   6. Article Cards — Text-Only Design (used on category index pages)
   -------------------------------------------------------------------------- */
.article-card {
  background-color: var(--color-white);
  border-radius: 0;
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  border-left: 3px solid var(--color-border);
  padding-left: var(--space-md);
}

.article-card:hover {
  border-left-color: var(--color-accent);
}

/* Category-coloured left borders */
.article-card[data-category="business"] { border-left-color: var(--cat-business); }
.article-card[data-category="tech"] { border-left-color: var(--cat-tech); }
.article-card[data-category="entertainment"] { border-left-color: var(--cat-entertainment); }
.article-card[data-category="sports"] { border-left-color: var(--cat-sports); }
.article-card[data-category="lifestyle"] { border-left-color: var(--cat-lifestyle); }

.article-card__body {
  padding: var(--space-xs) 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__title a:hover {
  color: var(--color-accent);
}

.article-card__excerpt {
  color: var(--color-text-light);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.article-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.article-card__meta span + span::before {
  content: '\00B7';
  margin-right: var(--space-sm);
}

/* --------------------------------------------------------------------------
   7. Category Tags
   -------------------------------------------------------------------------- */
.category-tag {
  display: inline-block;
  padding: 0.2em 0.75em;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  color: var(--color-white);
  background-color: var(--color-accent);
}

.category-tag--business { background-color: var(--cat-business); }
.category-tag--tech { background-color: var(--cat-tech); }
.category-tag--entertainment { background-color: var(--cat-entertainment); }
.category-tag--sports { background-color: var(--cat-sports); }
.category-tag--lifestyle { background-color: var(--cat-lifestyle); }

/* --------------------------------------------------------------------------
   8. Category Pills (horizontal scroll)
   -------------------------------------------------------------------------- */
.category-pills {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 0.4em 1.2em;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-text-light);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.category-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.category-pill.is-active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.category-pill--business.is-active { background-color: var(--cat-business); border-color: var(--cat-business); }
.category-pill--tech.is-active { background-color: var(--cat-tech); border-color: var(--cat-tech); }
.category-pill--entertainment.is-active { background-color: var(--cat-entertainment); border-color: var(--cat-entertainment); }
.category-pill--sports.is-active { background-color: var(--cat-sports); border-color: var(--cat-sports); }
.category-pill--lifestyle.is-active { background-color: var(--cat-lifestyle); border-color: var(--cat-lifestyle); }

/* --------------------------------------------------------------------------
   9. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  padding: var(--space-sm) 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-light);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb li + li::before {
  content: '\203A';
  margin-right: 0.4em;
  color: var(--color-text-muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   10. Article Page — Header
   -------------------------------------------------------------------------- */
.article-header {
  padding: var(--space-lg) 0 var(--space-md);
  max-width: 740px;
  margin: 0 auto;
}

.article-header .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.article-header .article-meta .category-tag {
  margin-right: var(--space-xs);
}

.article-header h1 {
  font-size: 1.75rem;
  line-height: 1.25;
}

/* --------------------------------------------------------------------------
   11. Article Page — Content
   -------------------------------------------------------------------------- */
.article-content {
  max-width: 740px;
  margin: 0 auto;
  padding-bottom: var(--space-xl);
}

.article-content p {
  margin-bottom: var(--space-md);
}

.article-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 3px solid var(--color-accent);
}

.article-content h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.article-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--color-accent-hover);
}

.article-content blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
  border-left: 4px solid var(--color-accent);
  background-color: rgba(233, 69, 96, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-light);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: var(--space-xs);
}

.article-content li::marker {
  color: var(--color-accent);
}

.article-content img {
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
}

.article-content figure {
  margin: var(--space-lg) 0;
}

.article-content figcaption {
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.article-content th {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

.article-content tbody tr:hover {
  background-color: rgba(233, 69, 96, 0.04);
}

/* Code blocks */
.article-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  background-color: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

.article-content pre {
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background-color: var(--color-primary);
  color: #e0e0e0;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* --------------------------------------------------------------------------
   12. Share Buttons
   -------------------------------------------------------------------------- */
.share-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
}

.share-buttons__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-right: var(--space-xs);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  color: var(--color-text-light);
  font-size: 1rem;
  transition: all var(--transition);
}

.share-btn:hover {
  color: var(--color-white);
  border-color: transparent;
}

.share-btn--facebook:hover { background-color: #1877f2; }
.share-btn--twitter:hover { background-color: #1da1f2; }
.share-btn--whatsapp:hover { background-color: #25d366; }
.share-btn--telegram:hover { background-color: #0088cc; }
.share-btn--linkedin:hover { background-color: #0a66c2; }
.share-btn--copy:hover { background-color: var(--color-text); }

/* Desktop sticky sidebar share */
.share-sidebar {
  display: none;
}

/* --------------------------------------------------------------------------
   13. Author Box
   -------------------------------------------------------------------------- */
.author-box {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.author-box__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.25rem;
}

.author-box__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.author-box__info {
  flex: 1;
  min-width: 0;
}

.author-box__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15em;
}

.author-box__role {
  font-size: 0.8125rem;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.author-box__bio {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   14. FAQ Section (details/summary accordion)
   -------------------------------------------------------------------------- */
.faq-section {
  max-width: 740px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.faq-section h2 {
  margin-bottom: var(--space-lg);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  margin-left: var(--space-sm);
  transition: transform var(--transition), background-color var(--transition);
}

.faq-item[open] summary::after {
  content: '\2212';
  background-color: var(--color-accent);
  color: var(--color-white);
  transform: rotate(180deg);
}

.faq-item summary:hover {
  color: var(--color-accent);
}

.faq-item__answer {
  padding-bottom: var(--space-md);
  color: var(--color-text-light);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   15. Related Articles
   -------------------------------------------------------------------------- */
.related-articles {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.related-articles h2 {
  margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   16. Newsletter Section
   -------------------------------------------------------------------------- */
.newsletter {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, #1a2744 100%);
  border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}

.newsletter h2 {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.newsletter p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  padding: 0.85rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  transition: border-color var(--transition), background-color var(--transition);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--color-accent);
  background-color: rgba(255, 255, 255, 0.12);
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.newsletter-form button {
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.newsletter-form button:hover {
  background-color: var(--color-accent-hover);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 0;
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-xl);
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.footer-col p {
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.footer-col a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
}

.footer-social a:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  font-size: 0.8125rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* --------------------------------------------------------------------------
   18. 404 Page
   -------------------------------------------------------------------------- */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: var(--space-2xl) var(--space-md);
}

.page-404__code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.page-404 h1 {
  margin-bottom: var(--space-sm);
}

.page-404 p {
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  max-width: 420px;
}

.page-404 .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.8rem 2rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  transition: background-color var(--transition);
}

.page-404 .btn:hover {
  background-color: var(--color-accent-hover);
}

/* --------------------------------------------------------------------------
   19. Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

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

/* --------------------------------------------------------------------------
   20. Responsive — Small Tablet (640px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .lead-story__title {
    font-size: 2.5rem;
  }

  .lead-story__excerpt {
    font-size: 1.125rem;
  }

  .story-item__title {
    font-size: 1.3rem;
  }

  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form input[type="email"] {
    flex: 1;
  }

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

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   21. Responsive — Tablet (768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }

  .lead-story {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .lead-story__title {
    font-size: 2.75rem;
  }

  .article-header h1 {
    font-size: 2rem;
  }

  section {
    padding: var(--space-xl) 0;
  }

  .page-404__code {
    font-size: 8rem;
  }

  /* Show trending sidebar on tablet as horizontal strip below stories */
  .trending-sidebar {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   22. Responsive — Desktop (1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  h4 {
    font-size: 1.25rem;
  }

  .site-header .container {
    height: 64px;
  }

  /* Show desktop nav, hide hamburger */
  .nav-desktop {
    display: block;
  }

  .hamburger {
    display: none;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Lead story — full-width large typography */
  .lead-story {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .lead-story__title {
    font-size: 3.25rem;
  }

  .lead-story__excerpt {
    font-size: 1.1875rem;
  }

  /* Content grid — two columns: stories + sidebar */
  .content-grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
  }

  /* Trending sidebar — sticky on desktop */
  .trending-sidebar {
    display: block;
    position: sticky;
    top: 80px;
    align-self: start;
    background-color: #f8f9fb;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
  }

  .trending-sidebar .section-heading {
    margin-bottom: var(--space-md);
  }

  .story-item__title {
    font-size: 1.35rem;
  }

  .article-header h1 {
    font-size: 2.5rem;
  }

  /* Sticky share sidebar */
  .share-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    position: sticky;
    top: 100px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .page-404__code {
    font-size: 10rem;
  }
}

/* --------------------------------------------------------------------------
   23. Responsive — Large Desktop (1280px)
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .lead-story__title {
    font-size: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   24. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .nav-desktop,
  .nav-mobile,
  .hamburger,
  .share-buttons,
  .share-sidebar,
  .newsletter,
  .category-pills,
  .trending-sidebar,
  .related-articles {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.6;
  }

  .article-content {
    max-width: 100%;
  }

  .article-content a {
    color: black;
    text-decoration: underline;
  }

  .article-content a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  .lead-story__title {
    font-size: 2rem;
  }

  .lead-story__excerpt,
  .story-item__title,
  .story-item__excerpt {
    color: black;
  }
}
