/* ============================================
   US HOT NEWS - MAIN STYLES & VARIABLES
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Brand Colors - US Flag Theme */
  --red: #B22234;
  --red-dark: #8B1A28;
  --red-light: #D64D5C;
  --navy: #3C3B6E;
  --navy-dark: #2B2B52;
  --white: #FFFFFF;
  --gold: #FFD700;
  --gold-dark: #E6C200;

  /* Gray Scale */
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EBEBEB;
  --gray-300: #E0E0E0;
  --gray-400: #999999;
  --gray-500: #777777;
  --gray-600: #555555;
  --gray-700: #444444;
  --gray-800: #222222;
  --gray-900: #111111;

  /* Category Colors */
  --cat-politics: #3C3B6E;
  --cat-sports: #B22234;
  --cat-crime: #2c2c2c;
  --cat-business: #1a472a;
  --cat-entertainment: #6a0dad;
  --cat-health: #0d6e6e;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;

  /* Font Sizes */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 17px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 28px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  --text-5xl: 48px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Layout */
  --container-max: 1280px;
  --sidebar-width: 300px;
  --navbar-height: 56px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-800);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); font-weight: 600; }
h3 { font-size: var(--text-lg); font-weight: 600; }
h4 { font-size: var(--text-base); font-weight: 600; }

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

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

a:hover {
  color: var(--red-dark);
}

/* Utility Classes */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.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;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--gray-400); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }

/* Badge Component */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  color: var(--white);
}

.badge-red { background-color: var(--red); }
.badge-navy { background-color: var(--navy); }
.badge-gold { background-color: var(--gold); color: var(--gray-800); }

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary {
  background-color: var(--red);
  color: var(--white);
}

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

.btn-secondary {
  background-color: var(--navy);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--navy-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--gray-300);
  color: var(--gray-800);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Card Component */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Image Placeholder */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-400);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

/* Section Styles */
.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 3px solid var(--red);
}

.section-title h2 {
  font-size: var(--text-2xl);
}

/* Page Layout */
.page-wrapper {
  display: flex;
  gap: var(--space-xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.page-main {
  flex: 1;
  min-width: 0;
}

.page-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

/* Ad Placeholders */
.ad-placeholder {
  background: var(--gray-100);
  border: 1px dashed var(--gray-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: var(--text-xs);
  font-family: sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ad-leaderboard {
  width: 100%;
  height: 90px;
}

.ad-rectangle {
  width: 300px;
  height: 250px;
}

.ad-half-page {
  width: 300px;
  height: 600px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Main Content Area */
main {
  flex: 1 0 auto;
  min-height: 70vh;
  width: 100%;
}

/* Focus Styles for Accessibility */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Selection Styles */
::selection {
  background-color: var(--red);
  color: var(--white);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ============================================
   FOOTER POSITION FIX - MUST STAY AT BOTTOM
   ============================================ */
html {
  height: 100%;
}

body {
  height: 100%;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
}

#site-header {
  flex-shrink: 0;
}

#main-content {
  flex: 1 0 auto !important;
  min-height: 70vh;
  width: 100%;
}

#site-footer {
  flex-shrink: 0 !important;
  margin-top: auto !important;
}
