* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #ffffff;
  color: #252525;
}

.blog-container {
  max-width: 1280px;
  margin: auto;
  padding: 20px;
}

/* Header */
.blog-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-header h2 {
  font-size: 40px;
  font-weight: 500;
  margin-bottom: 12px;
  color: #353535;
}

.blog-header p {
  font-size: 18px;
}

/* Featured Blog */
.featured-blog {
  background: #f5f5f5;
  border-radius: 32px;
  padding: 40px;
  margin-bottom: 64px;
}

.featured-wrapper {
  display: flex;
  gap: 44px;
  align-items: center;
}

.featured-image img {
  width: 100%;
  border-radius: 24px;
}

.featured-content {
  max-width: 500px;
}

.tag {
  display: inline-block;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  margin-bottom: 12px;
}

.featured-content h3 {
  font-size: 32px;
  margin-bottom: 16px;
  font-weight: 500;
}

.featured-content p {
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: #0040c1;
  color: white;
  padding: 8px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
}

/* Browse By */
.browse-by h3 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 32px;
  font-weight: 500;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.cat {
  padding: 8px 20px;
  border-radius: 16px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
}

.cat.active {
  background: #3054e5;
  color: white;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ALWAYS 3 PER ROW */
  gap: 40px;
  align-items: start;
}

/* Blog Card */
.blog-card {
  cursor: pointer;
}

.blog-image {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.blog-image img {
  width: 100%;
  transition: transform 0.4s ease;
}
blog-card {
  width: 100%;
}

.blog-image {
  width: 100%;
  height: 250px;
  border-radius: 16px;
  overflow: hidden;
  margin: auto;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: auto;
}

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

.arrow {
  background: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  pointer-events: auto;
}

/* Blog Info */
.blog-info {
  padding-top: 12px;
}

.meta {
  display: flex;
  gap: 4px;
  font-size: 12px;
  color: #777;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  border: 1px solid #ccc;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 6px;
  color: #252525;
}

.blog-info h4 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
}

/* View More */
.view-more {
  text-align: center;
  margin: 60px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .featured-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 1024px) {
  .blog-image {
    height: 250px;
  
  }
  .featured-wrapper {
    flex-direction: column;
  }
  .featured-content{
    align-self: start;
  }

}

@media (max-width: 768px) {
  .blog-header h2 {
    font-size: 28px;
  }
  .blog-header {
    text-align: left;
    margin-bottom: 16px;
  }
  .blog-header p {
    font-size: 14px;
  }
  .featured-content {
    align-self: flex-start;
  }

  .featured-content h3 {
    font-size: 20px;
  }
  .featured-wrapper {
    gap: 30px;
  }
  .featured-content p {
    font-size: 14px;
  }
  .featured-blog {
    margin-bottom: 44px;
  }
  .browse-by h3 {
    text-align: left;
    font-size: 20px;
    margin-bottom: 20px;
  }
  .categories {
    justify-content: left;
    margin-bottom: 40px;
    margin-bottom: 32px;
  }
  .blog-info h4 {
    font-size: 16px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 470px) and (max-width: 768px) {
  .blog-image {
    width: 100%;
    max-height: 100%;
    height: 370px;
  }
}
