/* ===================================================================
   GregNews Aggregator - Main Styles
   Built on Socialist Design System
   Inspired by: greg4senate.com + liberationnews.org
   =================================================================== */

@import url('design-system.css');

/* ===================================================================
   HEADER STYLES - Red Socialist Header
   =================================================================== */

header {
  background: var(--bg-header);
  border-bottom: none;
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: 0 var(--space-md);
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logo p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  font-weight: var(--font-medium);
  margin-top: var(--space-xs);
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

.header-actions .btn {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-actions .btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--color-white);
}

/* Category Navigation - Clean white bar with red accents */
.category-nav {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  overflow-x: auto;
  padding: 0 var(--space-md);
  margin-bottom: 0;
  background: var(--bg-secondary);
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.category-nav::-webkit-scrollbar {
  height: 4px;
}

.category-nav::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.category-nav::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* Prevent horizontal overflow */
.nav-item {
  flex-shrink: 0;
}

.nav-item {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-item.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border-light);
  margin: 0 var(--space-xs);
}

/* ===================================================================
   HERO SECTION STYLES - Featured articles at the top
   =================================================================== */

.hero-section {
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-md);
  padding: var(--space-md) var(--space-md);
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-header h2 {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--space-xs);
  display: inline-block;
}

.hero-nav {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-tertiary);
  padding: var(--space-xs);
  border-radius: var(--radius-md);
}

.hero-nav-btn {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-nav-btn:hover {
  color: var(--color-primary);
  background: rgba(229, 62, 62, 0.1);
}

.hero-nav-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.hero-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.hero-article-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: row;
  max-height: 110px;
}

.hero-article-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.hero-article-image {
  width: 100px;
  height: 110px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}

.hero-article-content {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  flex: 1;
}

.hero-article-title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-article-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.hero-article-source {
  font-weight: var(--font-semibold);
  color: var(--color-primary);
}

.hero-article-description {
  display: none;
}

.hero-article-badges {
  display: none;
}

.hero-article-score {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===================================================================
   MAIN CONTENT LAYOUT
   =================================================================== */

.main-content {
  display: flex;
  flex-direction: row-reverse;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md);
  gap: var(--space-lg);
}

/* Sidebar - Far right column */
.sidebar {
  width: 260px;
  flex-shrink: 0;
}

.sidebar-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.sidebar-section h3 {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  text-align: left;
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
  font-weight: var(--font-medium);
}

.filter-btn:hover {
  background: var(--bg-tertiary);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.filter-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.source-filter {
  margin-top: var(--space-sm);
}

.source-search {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

.source-search::placeholder {
  color: var(--text-muted);
}

.source-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2);
}

.source-list {
  max-height: 300px;
  overflow-y: auto;
}

.source-list::-webkit-scrollbar {
  width: 6px;
}

.source-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.source-list::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

.source-item {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.source-item::before {
  content: '\2022';
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.2em;
}

.source-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.source-item.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Content Area */
.content-area {
  flex: 1;
  min-width: 0;
}

.toolbar {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  align-items: center;
  flex-wrap: wrap;
}

#search-input {
  flex: 1;
  min-width: 250px;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--text-base);
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

#sort-select {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--text-base);
  cursor: pointer;
  min-width: 150px;
}

#sort-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ===================================================================
   ARTICLE CARD STYLES - Clean newspaper-style cards
   =================================================================== */

.articles-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.loading {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.loading::after {
  content: '...';
  animation: pulse 1.5s infinite;
}

.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.article-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border-left: 4px solid transparent;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  gap: var(--space-md);
  animation: fadeIn 0.3s ease-out;
}

.article-card:hover {
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.article-card.unread {
  border-left-color: var(--color-primary-light);
}

.article-card.important {
  border-left-color: var(--color-danger);
}

.article-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
}

.article-content {
  flex: 1;
  min-width: 0;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.article-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xs);
  word-break: break-word;
  overflow-wrap: anywhere;
}

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

.article-source {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: var(--font-medium);
}

.article-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Category Badges - Strong colors matching Liberation News */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.category-badge.breaking { background: var(--category-breaking); color: white; }
.category-badge.economy { background: var(--category-economy); color: white; }
.category-badge.foreign-policy { background: var(--category-foreign-policy); color: white; }
.category-badge.domestic-policy { background: var(--category-domestic-policy); color: white; }
.category-badge.trump-admin { background: var(--category-trump-admin); color: white; }
.category-badge.sherrod-brown { background: var(--category-sherrod-brown); color: white; }
.category-badge.ohio-senate { background: var(--category-ohio-senate); color: white; }
.category-badge.ohio-statewide { background: var(--category-ohio-statewide); color: var(--text-primary); font-weight: var(--font-bold); }
.category-badge.ohio-cities { background: var(--category-ohio-cities); color: var(--text-primary); font-weight: var(--font-bold); }
.category-badge.socialism { background: var(--category-socialism); color: white; }
.category-badge.polls { background: var(--category-polls); color: white; }
.category-badge.columbus-government { background: var(--category-columbus-government); color: white; }
.category-badge.columbus-local { background: var(--category-columbus-local); color: white; }
.category-badge.central-ohio { background: var(--category-central-ohio); color: white; }
.category-badge.franklin-county { background: var(--category-franklin-county); color: white; }

.article-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.article-action-btn {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.article-action-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(229, 62, 62, 0.05);
}

.article-action-btn.mark-important {
  background: rgba(229, 62, 62, 0.1);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.article-action-btn.mark-important:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.article-action-btn.mark-important.active {
  background: var(--category-economy);
  color: white;
  border-color: var(--category-economy);
}

.load-more {
  padding: var(--space-md);
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: var(--font-semibold);
  margin-top: var(--space-md);
}

.load-more:hover {
  background: var(--bg-tertiary);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===================================================================
   MODAL STYLES - Focused reading experience
   =================================================================== */

article-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

article-modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--color-danger);
  color: var(--color-white);
  border-color: var(--color-danger);
}

.modal-body h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.modal-body .article-meta {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.modal-body .article-content-full {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

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

.modal-body .article-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-bold);
  transition: all var(--transition-fast);
}

.modal-body .article-link:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-red);
}

.modal-body .article-link::before {
  content: '\1F517';
  font-size: 1.1em;
}

/* Stats display in header */
#stats-badge {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-white);
}

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

/* Large Desktop (1200px and below) */
@media (max-width: 1200px) {
  .main-content {
    max-width: 1000px;
  }
}

/* Desktop (1024px and below) */
@media (max-width: 1024px) {
  .main-content {
    padding: var(--space-md);
    gap: var(--space-lg);
  }
  
  .sidebar {
    width: 250px;
  }
  
  .hero-articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet Landscape (900px and below) */
@media (max-width: 900px) {
  .hero-section {
    padding: var(--space-md);
  }
  
  .hero-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-articles {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-content {
    flex-direction: column;
    padding: var(--space-md);
  }
  
  .sidebar {
    width: 100%;
    order: -1;
    margin-bottom: var(--space-lg);
  }
  
  .sidebar-section {
    display: block;
  }
  
  .category-nav {
    overflow-x: auto;
    padding-bottom: var(--space-md);
  }
  
  .article-card {
    flex-direction: column;
  }
  
  .article-image {
    width: 100%;
    height: 180px;
  }
  
  .article-actions {
    flex-wrap: wrap;
  }
  
  .source-list {
    max-height: 200px;
  }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: stretch;
    margin-top: var(--space-sm);
    gap: var(--space-sm);
  }
  
  .header-actions .btn {
    flex: 1;
    min-width: 0;
  }
  
  .hero-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .hero-nav {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .hero-nav-btn {
    flex: 1;
    min-width: 100px;
  }
  
  .hero-articles {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .hero-article-image {
    height: 140px;
  }
  
  .toolbar {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  #search-input {
    width: 100%;
  }
  
  #sort-select {
    width: 100%;
  }
  
  .nav-item {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    white-space: nowrap;
  }
  
  .category-badge {
    font-size: var(--text-xs);
    padding: 2px 6px;
  }
  
  /* Make sidebar scrollable but keep it visible */
  .sidebar {
    order: 0;
    margin-bottom: var(--space-lg);
  }
  
  .sidebar-section {
    margin-bottom: var(--space-md);
  }
}

/* Mobile Landscape / Small Tablet (600px and below) */
@media (max-width: 600px) {
  html {
    font-size: 14px;
  }
  
  .logo h1 {
    font-size: var(--text-xl);
  }
  
  .logo p {
    font-size: var(--text-xs);
  }
  
  .hero-header h2 {
    font-size: var(--text-xl);
  }
  
  .hero-nav {
    flex-direction: row;
    flex-wrap: wrap;
    background: transparent;
    padding: 0;
    gap: var(--space-xs);
  }
  
  .hero-nav-btn {
    padding: var(--space-sm) var(--space-md);
    flex: 1;
    min-width: 80px;
  }
  
  .hero-articles {
    grid-template-columns: 1fr;
  }
  
  .hero-article-title {
    font-size: var(--text-lg);
  }
  
  .hero-article-image {
    height: 160px;
  }
  
  .article-title {
    font-size: var(--text-base);
  }
  
  .article-card {
    padding: var(--space-md);
  }
  
  .article-description {
    font-size: var(--text-sm);
    -webkit-line-clamp: 2;
  }
  
  .article-action-btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
  
  .load-more {
    padding: var(--space-lg);
  }
  
  .modal-content {
    padding: var(--space-md);
    margin: var(--space-sm);
    width: calc(100% - var(--space-md));
  }
  
  .modal-body h1 {
    font-size: var(--text-xl);
  }
  
  .modal-body .article-link {
    padding: var(--space-md);
  }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
  .header-content {
    padding: 0 var(--space-sm);
  }
  
  .header-actions {
    gap: var(--space-xs);
  }
  
  .header-actions .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
  
  #stats-badge {
    font-size: var(--text-xs);
  }
  
  .nav-item {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }
  
  .nav-divider {
    display: none;
  }
  
  .category-nav {
    padding: 0 var(--space-sm);
  }
  
  .main-content {
    padding: var(--space-sm);
  }
  
  .hero-section {
    padding: var(--space-sm);
  }
  
  .hero-header h2 {
    font-size: var(--text-lg);
  }
  
  .hero-nav {
    gap: var(--space-xs);
  }
  
  .hero-nav-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
    min-width: 60px;
  }
  
  .hero-article-content {
    padding: var(--space-sm);
  }
  
  .hero-article-title {
    font-size: var(--text-base);
  }
  
  .hero-article-description {
    font-size: var(--text-sm);
    -webkit-line-clamp: 2;
  }
  
  .hero-article-meta {
    font-size: var(--text-xs);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  
  .hero-article-badges {
    padding-top: var(--space-xs);
  }
  
  .hero-article-badges .category-badge {
    font-size: var(--text-xs);
    padding: 2px 4px;
  }
  
  .article-card {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
  }
  
  .article-header {
    gap: var(--space-xs);
  }
  
  .article-title {
    font-size: var(--text-sm);
    line-height: 1.4;
  }
  
  .article-source {
    font-size: var(--text-xs);
  }
  
  .article-meta {
    font-size: var(--text-xs);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
  
  .article-meta span {
    flex-direction: column;
  }
  
  .article-description {
    font-size: var(--text-xs);
    -webkit-line-clamp: 2;
  }
  
  .article-image {
    height: 120px;
  }
  
  .article-action-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
    flex: 1;
    min-width: 0;
  }
  
  .article-actions {
    gap: var(--space-xs);
  }
  
  .toolbar {
    gap: var(--space-sm);
  }
  
  #search-input {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }
  
  #sort-select {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }
  
  /* Ensure touch targets are minimum 44x44px */
  .nav-item,
  .hero-nav-btn,
  .filter-btn,
  .article-action-btn,
  .load-more {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Make sidebar more compact */
  .sidebar-section {
    padding: var(--space-sm);
  }
  
  .sidebar-section h3 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    padding-bottom: var(--space-xs);
  }
  
  .source-item {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .source-search {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
  .hero-articles {
    gap: var(--space-sm);
  }
  
  .hero-article-image {
    height: 120px;
  }
  
  .article-image {
    height: 100px;
  }
  
  .modal-content {
    width: calc(100% - var(--space-sm));
    margin: var(--space-xs);
    padding: var(--space-sm);
  }
  
  .modal-body h1 {
    font-size: var(--text-lg);
  }
  
  .modal-close {
    width: 32px;
    height: 32px;
    top: var(--space-sm);
    right: var(--space-sm);
  }
}
