/* Custom Light Blue Global Environment Background */
.bg-light-blue {
  background-color: #eef7fc !important;
}

/* Section Main Heading Style */
.bi-section-title {
  color: #1a1a1a;
  font-size: 1.75rem;
  letter-spacing: -0.025em;
}

/* Card General Architectures */
.bi-card,
.bi-cat-card {
  background-color: #ffffff;
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

.bi-card:hover,
.bi-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 114, 255, 0.06) !important;
}

/* Outer image containment frames with matched paddings */
.bi-card-img-wrap,
.bi-cat-img-wrap {
  height: 200px;
  background-color: #f8fafc;
}

.bi-blog-img,
.img-animate {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text Element Truncations & Custom Sizing setups */
.bi-card-title-link,
.bi-cat-name {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #212529;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7rem; /* Fixes grid dynamic shifts */
}

.bi-card-title-link:hover {
  color: #0d6efd !important;
}

.card-text {
  color: #6c757d !important;
  line-height: 1.5;
}

/* Links Action Buttons styling matching the screen specs */
.bi-read-more,
.bi-cat-link {
  color: #0d6efd !important;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  position: relative;
}

.bi-read-more:hover,
.bi-cat-link:hover {
  text-decoration: underline !important;
}

/* Fallback Container Blocks */
.bi-cat-img-placeholder {
  height: 100%;
  background-image: linear-gradient(135deg, #e0f2fe 0%, #06b6d4 100%);
}

/* Template Pagination Controls Styling overrides */
.pagination {
  font-size: 0.85rem;
  text-align: center;
}
.pagination .page-link {
  padding: 2px 8px;
  transition: color 0.2s;
}
.pagination .page-link:hover {
  color: #0d6efd !important;
}

/* Center alignment structure for uneven rows (like 5 items) */
.justify-content-center .col {
  display: flex;
  flex-direction: column;
}

/* Category Specific Link Hover Transition */
.bi-cat-card {
  cursor: pointer;
}

.bi-cat-card:hover .bi-card-title {
  color: #059eff !important; /* Changes the category title color cleanly on card hover */
}

.bi-cat-card:hover .bi-read-more {
  text-decoration: underline !important;
}

/* Fallback default background pattern if category has no image uploaded */
.bi-cat-img-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eef7fc 0%, #def3ff 100%);
}

.bi-header-banner {
  background-image: url(/img/blogfeatureimage.webp);
  background-size: cover;
  background-position: center;
  padding: 100px 0 90px;
  text-align: center;
  position: relative;
}

.bi-page-title {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.bi-pagination .pagination {
  gap: 8px;
}

.bi-pagination .page-link {
  border-radius: 50px;
  color: #014876;
  border: 1px solid #014876;
  padding: 8px 14px;
  transition: all 0.3s ease;
}

.bi-pagination .page-link:hover {
  background: #014876;
  color: #fff;
}

.bi-pagination .active .page-link {
  background: #014876;
  border-color: #014876;
  color: #fff;
}

.bi-pagination .disabled .page-link {
  opacity: 0.5;
}

.bi-hlist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.bi-hcard {
  background: white !important;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: row;

  gap: 0;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.bi-hcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: #0d6efd;
}

.bi-hcard-img {
  flex-shrink: 0;
  width: 170px;
  height: 170px;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  margin: 12px 0 12px 12px;
}

.bi-hcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.bi-hcard:hover .bi-hcard-img img {
  transform: scale(1.05);
}

.bi-hcard-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.bi-hcard-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.4;
}

.bi-hcard-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.25s;
}

.bi-hcard-title a:hover {
  color: var(--primary-dark);
}

.bi-hcard-excerpt {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.65;
  margin: 0 0 14px;
  flex-grow: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .bi-hlist {
    grid-template-columns: 1fr;
  }

  .bi-hcard {
    flex-direction: column;
  }

  .bi-hcard-img {
    width: auto;
    height: 200px;
    margin: 10px 10px 0 10px;
  }
}
