/* ===== Blog Listing Page ===== */
#ce-blog-sec {
  background: linear-gradient(180deg, var(--theme-color-9) 0%, var(--primary-color) 320px);
}

.ce-blog-page-title {
  color: var(--theme-color-2);
  font-size: var(--h4-font-size);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 2.5rem;
}

.ce-blog-page-title strong {
  color: var(--theme-color-2);
  font-weight: 800;
}

.ce-blog-page-description {
  color: #6b7280;
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

/* ===== Card ===== */
.ce-blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--primary-color);
  border: 1px solid var(--theme-color-11);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(22, 60, 102, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.ce-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(22, 60, 102, 0.14);
}

/* Thumbnail: fixed aspect box, image cover-cropped so it never overflows. */
.ce-blog-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--theme-color-9);
}

.ce-blog-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ce-blog-card:hover .ce-blog-thumb-img {
  transform: scale(1.05);
}

.ce-blog-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--theme-color-2);
  font-weight: 800;
  font-style: italic;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--theme-color-9) 0%, var(--theme-color-10) 100%);
}

/* Category badge over the thumbnail. */
.ce-blog-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 0.3rem 0.75rem;
  border-radius: 200px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-color);
  background: var(--theme-color-3);
  box-shadow: 0 4px 10px rgba(222, 64, 73, 0.3);
}

.ce-blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.25rem;
}

.ce-blog-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #8a94a6;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.ce-blog-meta i {
  color: var(--theme-color-3);
}

.ce-blog-card-title {
  color: var(--theme-color-2);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  /* Clamp to 3 lines so cards stay even. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ce-blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ce-blog-card-title a:hover {
  color: var(--theme-color-3);
}

.ce-blog-card-excerpt {
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
  /* Clamp to 3 lines. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ce-blog-read-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.35rem;
  border-radius: 200px;
  color: var(--primary-color);
  background: var(--theme-color-3);
  border: none;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.ce-blog-read-btn:hover,
.ce-blog-read-btn:focus {
  background: var(--theme-color-2);
  color: var(--primary-color);
  transform: translateX(2px);
}

.ce-blog-read-btn i {
  transition: transform 0.2s ease;
}

.ce-blog-read-btn:hover i {
  transform: translateX(3px);
}

/* ===== Pagination ===== */
.ce-blog-page-btn {
  border-radius: 200px;
  padding: 0.45rem 0.95rem;
  min-width: 42px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--theme-color-2);
  background: var(--theme-color-9);
  border: 1px solid var(--theme-color-11);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.ce-blog-page-btn:hover {
  background: var(--theme-color-3);
  color: var(--primary-color);
  border-color: var(--theme-color-3);
}

.ce-blog-page-btn-active {
  background: var(--theme-color-3);
  color: var(--primary-color);
  border-color: var(--theme-color-3);
  font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 575.98px) {
  .ce-blog-card-title {
    font-size: 1rem;
  }
}
