/* ==============================
   BLOGS PAGE — CIRL Theme
   Colors: #29149C (blue), #00B04E (green), #fffaf8 (bg)
   Font: Poppins
================================= */

/* ── Hero Banner ── */
.blog-hero {
  background: url("../images/blog-bg.png") , linear-gradient(0deg, rgba(99, 213, 150, 0.19) -50%, rgba(255, 250, 247, 0) 92%);
  background-position: top;
  background-repeat: no-repeat;
  padding: 80px 20px 60px 20px;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.blog-hero p {
  color: #555;
  font-size: 1rem;
  max-width: 550px;
}


/* ── Blog Grid ── */
#blogContainer {
  padding: 60px 20px 80px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}

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

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Blog Card ── */
/* ───────── PROFESSIONAL 3D BLOG CARD ───────── */

.blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #e6e8f2;
  overflow: hidden;
  box-shadow:
    0 4px 10px rgba(41, 20, 156, 0.05),
    0 10px 25px rgba(41, 20, 156, 0.08);
  transition: all 0.35s ease;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 20px rgba(41, 20, 156, 0.08),
    0 20px 45px rgba(41, 20, 156, 0.15);
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #29149C, #00B04E);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Top meta */
.blog-top-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.blog-date {
  color: #00B04E;
}

.blog-category {
  color: #29149C;
}

/* Image */
.blog-image-wrap {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 16px;
  transition: transform 0.5s ease;
}

.blog-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5);
  transition:  0.5s ease;
}

.blog-card:hover .blog-image-wrap {
  transform: translateY(-10px);
}
.blog-card:hover .blog-image-wrap img {
  transform: scale(1.05);
  filter: saturate(1);
}

/* Content */
.blog-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Title */
.blog-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: #29149C;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
  color: #00B04E;
}

/* Excerpt */
.blog-excerpt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #555;
  flex-grow: 1;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.blog-footer {
  margin-top: auto;
}

/* Button */
.blog-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #00B04E;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 6px;

  box-shadow: 0 4px 12px rgba(41, 20, 156, 0.2);
  transition: all 0.3s ease;
}

.blog-btn:hover {
  background: #1a0d6b;
  box-shadow: 0 6px 18px rgba(0, 176, 78, 0.3);
}

/* Category pill on card */
.blog-card-image-wrapper::after {
  content: "Article";
  position: absolute;
  top: 14px;
  left: 14px;
  background: #00B04E;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

.blog-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: black;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-date::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: black;
  border-radius: 2px;
}

.blog-title {
  font-size: 1rem;
  font-weight: 600;
  color: #29149C;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.blog-card:hover .blog-title {
  color: #00B04E;
}

.blog-excerpt {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}

.blog-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 176, 78, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-more {
  color: #29149C;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}

.read-more::after {
  content: "→";
  transition: transform 0.2s;
}

.read-more:hover {
  color: #00B04E;
  gap: 10px;
}

.read-more:hover::after {
  transform: translateX(3px);
}

/* ── Loading / Empty States ── */
.loading-state,
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #555;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #ecf5f0;
  border-top-color: #00B04E;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state p,
.empty-state p {
  color: #888;
  font-size: 0.9rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.page-btn {
  min-width: 35px;
  height: 35px;
  padding: 0 14px;
  border: 2px solid #e8e0f8;
  background: #fff;
  color: #29149C;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: "Poppins", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  color: black;
  border-color: #1a0d6b;
}

.page-btn.active {
  background: #1a0d6b;
  color: #fff;
  border-color: #1a0d6b;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── Responsive Hero ── */
@media (max-width: 768px) {
  .blog-hero {
    padding: 60px 0 44px;
  }
  .blog-hero h1 {
    font-size: 2rem;
  }
  #blogContainer {
    padding: 40px 20px 60px 20px;
  }
}