:root {
  --primary: #2e5470;
  --secondary: #035bcd;
  --text: #333333;
  --light-text: #666666;
  --border: hsl(0, 0%, 88%);
  --bg: #fff;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  margin: 0;
  padding: 0;
}

.blog-container {
  margin: 0 auto;
  padding: 0 2rem;
  padding-bottom: 2rem;
}

/* Blog header styles */
.blog-header {
  padding-top: 15vh;
  text-align: center;
  margin-bottom: 3rem;
}

.blog-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
  line-height: 1.2;
}

.blog-description {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--light-text);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.header-line {
  width: 100px;
  height: 3px;
  background-color: var(--primary);
  margin: 0 auto;
  border-radius: 3px;
}

/* Categories navigation */
.categories {
  display: flex;
  justify-content: left;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  width: 90%;
  margin: 0 auto;
  padding-bottom: 5vh;
}

.category {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background-color: #f5f5f5;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
}

.category:hover {
  background-color: #e0e0e0;
}

.category.active {
  background-color: var(--secondary);
  color: white;
}

/* Blog posts grid */
.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  width: 90%;
  margin: 0 auto;
  padding-bottom: 5vh;
}

.post {
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.post-link {
  text-decoration: none;
}

.post:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--card-shadow-hover);
}

.post-image-container {
  overflow: hidden;
  aspect-ratio: 16/9;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post:hover .post-image {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-date {
  font-size: 0.8rem;
  color: var(--light-text);
  display: block;
  margin-bottom: 0.75rem;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--primary);
  line-height: 1.3;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--light-text);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.read-more {
  color: var(--secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--primary);
  text-decoration: underline;
}

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

.read-more:hover span {
  transform: translateX(0.25rem);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: left;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  width: 90%;
  margin: 0 auto;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--bg);
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.page-number:hover {
  background-color: var(--secondary);
  color: white;
  border-color: var(--secondary);
}

.page-number.active {
  background-color: var(--secondary);
  color: white;
  border-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-container {
    padding: 0 1.5rem;
    padding-bottom: 3rem;
  }

  .blog-header {
    padding-top: 11vh;
    margin-bottom: 2rem;
  }

  .blog-container.banner-active {
    margin-top: 120px;
  }

  .categories {
    margin-bottom: 2rem;
  }

  .blog-posts {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-container {
    padding: 0 1rem;
  }

  .categories {
    justify-content: flex-start;
  }

  .pagination {
    justify-content: flex-start;
  }
}
