* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #0891b2;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

.page-header::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 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat bottom;
  background-size: cover;
  opacity: 0.5;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.header-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.header-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.95;
  font-weight: 400;
}

/* Blog Container */
.blog-container {
  padding: 60px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Blog Cards */
.blog-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.blog-card .card-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 15px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

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

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Blog Meta */
.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  gap: 15px;
}

.meta-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

.meta-date span:first-child {
  font-size: 1rem;
}

.author-name {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.meta-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-light);
  white-space: nowrap;
}

.meta-views span:first-child {
  font-size: 1rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-light);
  margin: 0;
}

/* Grid System */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.row.g-4 > * {
  padding: 12px;
}

.col-md-6,
.col-lg-4 {
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-6 {
    width: 50%;
  }
}

@media (min-width: 992px) {
  .col-lg-4 {
    width: 33.333333%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .page-header {
    padding: 60px 20px 50px;
    margin-top: 60px;
  }

  .header-content h1 {
    font-size: 2rem;
  }

  .header-content p {
    font-size: 1rem;
  }

  .blog-container {
    padding: 40px 20px 60px;
  }

  .blog-card {
    padding: 25px;
  }

  .blog-title {
    font-size: 1.25rem;
  }

  .blog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .empty-state {
    padding: 60px 20px;
  }

  .empty-state-icon {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .blog-title {
    font-size: 1.15rem;
  }

  .blog-excerpt {
    font-size: 0.9rem;
  }
}

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

.blog-card {
  animation: fadeIn 0.5s ease-out;
}

/* Stagger animation for cards */
.col-md-6:nth-child(1) .blog-card,
.col-lg-4:nth-child(1) .blog-card {
  animation-delay: 0.1s;
}

.col-md-6:nth-child(2) .blog-card,
.col-lg-4:nth-child(2) .blog-card {
  animation-delay: 0.2s;
}

.col-md-6:nth-child(3) .blog-card,
.col-lg-4:nth-child(3) .blog-card {
  animation-delay: 0.3s;
}

.col-md-6:nth-child(4) .blog-card,
.col-lg-4:nth-child(4) .blog-card {
  animation-delay: 0.4s;
}

.col-md-6:nth-child(5) .blog-card,
.col-lg-4:nth-child(5) .blog-card {
  animation-delay: 0.5s;
}

.col-md-6:nth-child(6) .blog-card,
.col-lg-4:nth-child(6) .blog-card {
  animation-delay: 0.6s;
}

/* Accessibility */
.blog-card:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .page-header {
    background: none;
    color: var(--text-dark);
    padding: 20px 0;
  }

  .blog-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin-bottom: 20px;
  }

  .blog-card:hover {
    transform: none;
    box-shadow: none;
  }
}
