/* Enhanced Blog Page Styles */

/* CSS Variables */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="1000,100 1000,0 0,100"/></svg>');
  background-size: cover;
  background-position: bottom;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-title i {
  font-size: 3rem;
  opacity: 0.9;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 3rem;
  background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.content-wrapper.blog-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

/* Search Section */
.blog-search-section {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-light);
}

.search-header {
  text-align: center;
  margin-bottom: 2rem;
}

.search-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.search-title i {
  color: var(--primary-color);
}

.search-description {
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-primary);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.filter-controls {
  display: flex;
  gap: 1rem;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Tag Cloud */
.tag-cloud-section {
  text-align: center;
}

.tag-cloud-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tag-cloud-title i {
  color: var(--secondary-color);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tag-cloud-item {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tag-cloud-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.tag-cloud-item:hover::before {
  left: 100%;
}

.tag-cloud-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.results-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.results-count strong {
  color: var(--text-primary);
  font-weight: 600;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

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

/* Blog Section */
.blog-section {
  margin-bottom: 3rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  transition: var(--transition);
}

.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.blog-list .blog-post-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.blog-list .card-header {
  flex: 0 0 200px;
}

.blog-list .card-content {
  flex: 1;
  padding-left: 1.5rem;
}

/* Blog Post Cards */
.blog-post-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 1;
}

.blog-post-card:hover::before {
  transform: scaleX(1);
}

.blog-post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

/* Card Header */
.card-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  height: 200px;
}

.card-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 0.3s ease;
  background: var(--bg-gray-100);
}

/* 智能图片适配样式 */
.card-image img.fit-cover {
  object-fit: cover;
}

.card-image img.fit-contain {
  object-fit: contain;
  background: white;
  padding: 10px;
  box-sizing: border-box;
}

.card-image img.fit-fill {
  object-fit: fill;
}

/* 图片加载状态 */
.card-image img.loading {
  opacity: 0.7;
  filter: blur(2px);
}

.card-image img.loaded {
  opacity: 1;
  filter: none;
}

.card-image img.error {
  display: none;
}

/* 图片骨架屏 */
.image-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  z-index: 1;
}

.skeleton-animation {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* 图片降级占位符 */
.image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  gap: 0.5rem;
}

.fallback-icon {
  font-size: 2rem;
  opacity: 0.9;
}

.fallback-text {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
}

/* 特定图片的优化设置（保留向后兼容） */
.card-image img[src*="MRG"] {
  object-fit: contain;
  object-position: center;
  background: white;
  padding: 10px;
}

.card-image img[src*="cckws"] {
  object-fit: contain;
  object-position: center;
  background: white;
  padding: 10px;
}

.card-image img[src*="change"] {
  object-fit: cover;
  object-position: center top;
}

.card-image img[src*="remotesensing"] {
  object-fit: cover;
  object-position: center;
}

.card-image img[src*="scale"] {
  object-fit: cover;
  object-position: center;
}

/* Image overlay for hover effect */
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay i {
  color: white;
  font-size: 2rem;
}

.blog-post-card:hover .image-overlay {
  opacity: 1;
}

/* Image placeholder with fallback */
.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
}

.image-placeholder i {
  font-size: 2.5rem;
  opacity: 0.5;
}

.card-image.placeholder {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  color: var(--text-muted);
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.card-image.placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Category-specific colors */
.card-image.placeholder[data-category="科研"] {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
}

.card-image.placeholder[data-category="技术"] {
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
}

.card-image.placeholder[data-category="杂谈"] {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.category-icon {
  font-size: 3rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  z-index: 1;
  position: relative;
}

.placeholder-text {
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 1;
  position: relative;
}

/* Image loading states */
.card-image img[src=""] {
  display: none;
}

.card-image img.loading {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite alternate;
}

.card-image img.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Image error fallback */
.card-image img.error {
  display: none;
}

.card-image .image-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  color: var(--text-muted);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.card-image img.error + .image-fallback {
  display: flex;
}

/* Card Content */
.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  display: block;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-color));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0% 100%;
  transition: background-size 0.3s ease;
}

.card-title a:hover {
  color: var(--primary-color);
  background-size: 100% 2px;
}

.card-summary {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.meta-item i {
  color: var(--accent-color);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Card Footer */
.card-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  margin-top: auto;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.read-more-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.read-more-btn:hover::before {
  width: 100%;
}

.read-more-btn:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

.read-more-btn i {
  transition: transform 0.3s ease;
}

.read-more-btn:hover i {
  transform: translateX(4px);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.no-results-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.no-results p {
  margin-bottom: 2rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== Image Preview Modal ===== */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
  to {
    opacity: 1;
  }
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.8);
  animation: modalScaleIn 0.3s ease forwards;
}

@keyframes modalScaleIn {
  to {
    transform: scale(1);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

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

.modal-body {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 75vh;
  overflow: auto;
  background: #000;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-body img {
  max-width: 90vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  cursor: zoom-in;
  background: white;
}

.modal-body img:hover {
  cursor: zoom-out;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-secondary);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-quaternary);
  border-color: var(--border-hover);
}

/* Enhanced card image hover effect */
.card-image {
  cursor: pointer;
}

.card-image:hover .image-overlay {
  opacity: 1;
  cursor: pointer;
}

.image-overlay {
  cursor: pointer;
}

/* Gallery Navigation Styles */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
  left: 1rem;
}

.gallery-nav.next {
  right: 1rem;
}

.gallery-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  backdrop-filter: blur(5px);
}

/* Responsive modal */
@media (max-width: 768px) {
  .image-modal {
    padding: 1rem;
  }
  
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: 60vh;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-title i {
    font-size: 2rem;
  }
  
  .search-controls {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filter-controls {
    justify-content: center;
  }
  
  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 3rem 0;
    margin-bottom: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .hero-title i {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .content-wrapper.blog-page {
    padding: 0 1rem 3rem 1rem;
  }
  
  .blog-search-section {
    padding: 2rem 1.5rem;
  }
  
  .search-title {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .results-info {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-list .blog-post-card {
    flex-direction: column;
  }
  
  .blog-list .card-header {
    flex: none;
    height: 200px;
  }
  
  .blog-list .card-content {
    padding-left: 1.5rem;
  }
  
  .card-header {
    height: 180px;
  }
  
  .filter-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stat-divider {
    display: none;
  }
  
  .content-wrapper.blog-page {
    padding: 0 0.75rem 2rem 0.75rem;
  }
  
  .blog-search-section {
    padding: 1.5rem 1rem;
  }
  
  .search-title {
    font-size: 1.25rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-footer {
    padding: 0 1rem 1rem 1rem;
  }
  
  .card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .no-results {
    padding: 3rem 1rem;
  }
  
  .no-results-icon {
    font-size: 3rem;
  }
  
  .no-results h3 {
    font-size: 1.25rem;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.blog-grid[style*="opacity: 0.5"] {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
.search-input:focus,
.filter-select:focus,
.tag:focus,
.tag-cloud-item:focus,
.view-btn:focus,
.read-more-btn:focus,
.btn-primary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .blog-hero,
  .blog-search-section,
  .results-info {
    display: none !important;
  }
  
  .blog-post-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  
  .card-header {
    height: auto !important;
  }
  
  .card-image {
    display: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-primary: #1f2937;
    --bg-secondary: #374151;
    --bg-tertiary: #4b5563;
    --border-color: #4b5563;
    --border-light: #374151;
  }
  
  .blog-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
  }
  
  .search-input,
  .filter-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  
  .blog-post-card {
    background: var(--bg-secondary);
  }
  
  .category-badge {
    background: rgba(31, 41, 55, 0.95);
    color: var(--primary-light);
  }
  
  .card-image.placeholder {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .blog-post-card {
    border: 2px solid var(--text-primary);
  }
  
  .tag,
  .tag-cloud-item {
    border: 1px solid var(--text-primary);
  }
  
  .btn-primary {
    border: 2px solid var(--primary-color);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .blog-post-card:hover {
    transform: none;
  }
  
  .read-more-btn:hover {
    transform: none;
  }
  
  .tag:hover {
    transform: none;
  }
}
