/* =========================================================
   VIREON NEWS - MODERN EDITORIAL DESIGN SYSTEM & STYLES
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

:root {
  /* Core Color System */
  --navy-900: #070d1e;
  --navy-800: #0b132b;
  --navy-700: #1c2541;
  --navy-600: #2d3a66;
  --red-accent: #e63946;
  --red-hover: #c92a37;
  --red-light: rgba(230, 57, 70, 0.1);
  --cyan-accent: #00b4d8;

  /* Light Mode Theme */
  --bg-page: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f3f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --text-main: #141b2b;
  --text-muted: #5a6474;
  --text-subtle: #8a94a6;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  --header-bg: #0b132b;
  --header-text: #ffffff;
  --header-nav-hover: rgba(255, 255, 255, 0.12);
  --ticker-bg: #070d1e;
  --ticker-text: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container-max: 1280px;
  --header-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

[data-theme="dark"] {
  /* Dark Mode Theme */
  --bg-page: #080c14;
  --bg-surface: #0e1526;
  --bg-surface-alt: #141d33;
  --bg-card: #10192e;
  --bg-card-hover: #16223d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #1e293b;
  --border-light: #25334d;
  --header-bg: #070d1e;
  --header-text: #ffffff;
  --ticker-bg: #050811;
  --ticker-text: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   BASE & RESET
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   TOP UTILITY BAR
   ========================================================= */
.top-bar {
  background-color: #070d1e;
  color: #94a3b8;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.date-indicator, .update-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-indicator span.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.social-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.social-pill-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
.site-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.footer-logo-img {
  height: 38px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

.mobile-drawer .brand-logo-img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

.brand-logo-fallback {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: none; /* Shown via JS/onerror if img fails */
}

.brand-logo-fallback span {
  color: var(--red-accent);
}


.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background-color: var(--header-nav-hover);
}

.nav-link.active {
  border-bottom: 2px solid var(--red-accent);
  border-radius: 4px 4px 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.breaking-ticker-bar {
  background-color: var(--ticker-bg);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.breaking-ticker-inner {
  display: flex;
  align-items: center;
  height: 42px;
}

.breaking-badge {
  background-color: var(--red-accent);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.ticker-content {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.ticker-items {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: tickerScroll 45s linear infinite;
}

.ticker-items:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}


@media (prefers-reduced-motion: reduce) {
  .ticker-items {
    animation: none;
    overflow-x: auto;
  }
}

.ticker-story-link {
  color: var(--ticker-text);
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 32px;
  display: inline-flex;
  align-items: center;
}

.ticker-story-link::before {
  content: "•";
  color: var(--red-accent);
  font-size: 1.2rem;
  margin-right: 8px;
}

.ticker-story-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* =========================================================
   ADSTERRA AD CONTAINERS (Zero CLS layout containment)
   ========================================================= */
.ad-container-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  overflow: hidden;
}

.ad-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.ad-slot-banner-728 {
  width: 728px;
  height: 90px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot-banner-300 {
  width: 300px;
  height: 250px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.ad-slot-banner-320 {
  width: 320px;
  height: 50px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: none; /* Shown on mobile */
  align-items: center;
  justify-content: center;
}

.ad-slot-native {
  width: 100%;
  min-height: 120px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

/* =========================================================
   HERO / FEATURED NEWS SECTION
   ========================================================= */
.hero-section {
  padding: 30px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

/* Primary Hero Card */
.hero-primary-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-primary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-color: #0b132b;
  overflow: hidden;
}

.hero-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-primary-card:hover .hero-img-wrap img {
  transform: scale(1.03);
}

.category-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background-color: var(--navy-800);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  z-index: 2;
}

.hero-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text-main);
}

.hero-headline a:hover {
  color: var(--red-accent);
}

.hero-summary {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
  flex: 1;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.meta-source {
  font-weight: 600;
  color: var(--text-muted);
}

/* Secondary Hero Stack */
.hero-secondary-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.hero-sub-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-sub-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateX(2px);
}

.hero-sub-img {
  width: 110px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background-color: #0b132b;
}

.hero-sub-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-sub-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-sub-title a:hover {
  color: var(--red-accent);
}

/* =========================================================
   MAIN CONTENT & SIDEBAR LAYOUT
   ========================================================= */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--navy-800);
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 20px;
  background-color: var(--red-accent);
  border-radius: 2px;
}

/* Latest News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.news-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: #0b132b;
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--red-accent);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  font-size: 0.75rem;
}

.read-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-accent);
}

.read-full-btn:hover {
  color: var(--red-hover);
  text-decoration: underline;
}

/* Load More Section */
.load-more-wrap {
  text-align: center;
  margin: 36px 0;
}

.load-more-btn {
  background-color: var(--navy-800);
  color: #ffffff;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-more-btn:hover:not(:disabled) {
  background-color: var(--navy-700);
  transform: translateY(-1px);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =========================================================
   SIDEBAR WIDGETS
   ========================================================= */
.sidebar-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ranked-story-list {
  list-style: none;
}

.ranked-story-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.rank-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-600);
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.ranked-story-item:nth-child(1) .rank-number { color: var(--red-accent); }
.ranked-story-item:nth-child(2) .rank-number { color: #f59e0b; }
.ranked-story-item:nth-child(3) .rank-number { color: #3b82f6; }

.ranked-story-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 4px;
}

.ranked-story-title a:hover {
  color: var(--red-accent);
}

/* Newsletter Widget */
.newsletter-card {
  background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

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

.newsletter-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.875rem;
}

.newsletter-input::placeholder {
  color: #94a3b8;
}

.newsletter-btn {
  background-color: var(--red-accent);
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.newsletter-btn:hover {
  background-color: var(--red-hover);
}

.newsletter-feedback {
  font-size: 0.8125rem;
  margin-top: 8px;
  display: none;
}

/* =========================================================
   ARTICLE DETAIL PAGE
   ========================================================= */
.article-container {
  max-width: 860px;
  margin: 30px auto 50px;
  padding: 0 20px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

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

.article-header {
  margin-bottom: 24px;
}

.article-main-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin: 12px 0 16px;
}

.article-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.article-source-badge strong {
  color: var(--text-main);
}

.article-lead-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  background-color: #0b132b;
}

.article-summary-box {
  background-color: var(--bg-card);
  border-left: 4px solid var(--red-accent);
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.article-summary-box p {
  font-size: 1.125rem;
  color: var(--text-main);
  line-height: 1.6;
}

.attribution-card {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}

.attribution-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.primary-outlink-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--red-accent);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.primary-outlink-btn:hover {
  background-color: var(--red-hover);
  transform: translateY(-2px);
  color: #ffffff;
}

.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
}

.share-btn:hover {
  background-color: var(--bg-surface-alt);
}

/* Related Stories Section */
.related-section {
  margin-top: 48px;
}

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

/* =========================================================
   SEARCH & FILTER PAGE
   ========================================================= */
.search-hero {
  background-color: var(--navy-800);
  color: #ffffff;
  padding: 40px 0;
  margin-bottom: 30px;
}

.search-form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: -30px;
}

.search-input-row {
  display: flex;
  gap: 12px;
}

.search-input-main {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background-color: var(--bg-page);
  color: var(--text-main);
}

.search-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-select, .filter-date {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-page);
  color: var(--text-main);
  font-size: 0.875rem;
}

/* =========================================================
   SKELETON LOADERS
   ========================================================= */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-alt) 25%, var(--border-color) 50%, var(--bg-surface-alt) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background-color: #070d1e;
  color: #cbd5e1;
  padding: 50px 0 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #64748b;
}

/* =========================================================
   MOBILE MENU DRAWER
   ========================================================= */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background-color: var(--navy-900);
  color: #ffffff;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav a {
  padding: 10px 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
}

.drawer-nav a:hover, .drawer-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================= */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none; /* Mobile priority: clean viewport */
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-block;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .hero-sub-card {
    grid-template-columns: 90px 1fr;
  }
  .hero-sub-img {
    width: 90px;
    height: 70px;
  }
  .article-main-title {
    font-size: 1.625rem;
  }
  .ad-slot-banner-728 {
    display: none !important;
  }
  .ad-slot-banner-320 {
    display: flex !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
