.container {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  transition: filter 0.4s ease;
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  gap: 20px;
}

/* 3 columns on large screens */
@media (min-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Card */
.blog-card {
  background: none;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  border: 2px solid #ffffff;
  border-radius: 12px;
  box-shadow: 10px 15px 10px rgba(32, 32, 32, 0.607);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card h2 {
  font-size: 20px;
  margin: 10px;
}

.blog-card p {
  margin: 10px;
  font-size: 14px;
  color: #555;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

/* ===== Overlay Full Blog ===== */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

#overlay.show {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  background: radial-gradient(circle at 70% 50%, #eeaecb 0%, #91a7c0 100%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 30px;
  transform: scale(0.8);
  transition: transform 0.4s ease;
  position: relative;
  border: 2px solid #ffffff;
  box-shadow: 10px 15px 10px rgba(32, 32, 32, 0.607);
}

#overlay.show .overlay-content {
  transform: scale(1);
}

.overlay-content img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 20px;
}

.overlay-content h2 {
  margin-bottom: 15px;
  font-size: 26px;
}

.overlay-content p {
  line-height: 1.7;
  font-size: 15px;
  color: #444;
}

/* Floating close button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #ff5e57;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease;
}

.close-btn:hover {
  background: #ff2e2e;
  transform: scale(1.2);
}

/* Blur background when overlay active */
.container.blur {
  filter: blur(5px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.pagination button {
  background: #fff;
  border: 1px solid #fff;
  margin: 0 5px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.pagination button.active {
  background: #ff2e2e;
  color: white;
  border-color: #ff2e2e;
  box-shadow: 10px 15px 10px rgba(225, 59, 59, 0.607);
}

.pagination button:hover {
  background: none;
  color: white;
  transform: scale(1.05);
  border: 2px solid #ffffff;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 600px) {
  .overlay-content {
    padding: 20px;
  }
  .overlay-content h2 {
    font-size: 22px;
  }
  .blog-card img {
    height: 150px;
  }
}
