/* ============================================
   LAYOUT IMPROVEMENTS - OVERALL SITE DESIGN
   ============================================ */

/* Enhanced Container Spacing */
.max-w-7xl {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .max-w-7xl {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Improved Card Design */
.news-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
              0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.2);
}

.news-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Better Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
}

/* Enhanced Grid Layouts */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .grid-auto-fit {
    gap: 2rem;
  }
}

/* Improved Spacing System */
.section-spacing {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 1024px) {
  .section-spacing {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* Better Category Badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.category-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Enhanced Meta Information */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.post-meta svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

/* Improved Author Cards */
.author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s;
}

.author-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.author-card img {
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Better Content Readability */
.prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: #111827;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

.prose a {
  color: #3b82f6;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  text-underline-offset: 2px;
  transition: all 0.2s;
}

.prose a:hover {
  color: #2563eb;
  text-decoration-color: #2563eb;
}

.prose img {
  border-radius: 0.75rem;
  margin: 2rem 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.prose blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1.5rem;
  font-style: italic;
  color: #4b5563;
  margin: 2rem 0;
}

/* Enhanced Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #3b82f6;
  color: #3b82f6;
}

/* Improved Sidebar */
.sidebar-widget {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s;
}

.sidebar-widget:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111827;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #3b82f6;
}

/* Better Footer */
footer {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
}

footer a {
  color: #cbd5e1;
  transition: color 0.2s;
}

footer a:hover {
  color: #3b82f6;
}

/* Enhanced Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    #f3f4f6 0%,
    #e5e7eb 50%,
    #f3f4f6 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

/* Improved Mobile Navigation */
@media (max-width: 1023px) {
  .mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }

  .mobile-menu.active {
    left: 0;
  }
}

/* Better Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.aspect-video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.aspect-square {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* Enhanced Focus States for Accessibility */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .sidebar,
  .social-share,
  .comments {
    display: none;
  }

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

  a {
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

/* Dark Mode Improvements */
.dark .news-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark .news-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.dark .prose {
  color: #e2e8f0;
}

.dark .prose h2,
.dark .prose h3 {
  color: #f1f5f9;
}

.dark .sidebar-widget {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark .author-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: rgba(255, 255, 255, 0.1);
}
