/*========== Blog Archive Style ============*/
.container {
  width: 95% !important;
}
.blog-section {
  background-color: var(--bg-light);
}

/* Main Blog Card */
.blog-main-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  border-radius: 1.5rem;
}

.blog-main-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-main-card:hover .blog-main-img {
  transform: scale(1.1);
}

.blog-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  z-index: 2;
  border-bottom-left-radius: 1.5rem;
  border-bottom-right-radius: 1.5rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Blog Title Hover Effects */
.blog-title {
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-main-card:hover .blog-main-img {
  transform: scale(1.08);
}
.blog-main-card:hover .blog-title {
  color: var(--blue);
}

@media (min-width: 1200px) {
  .blog-main-card {
    max-width: 840px;
  }
}

/* Featured Blog Items */
.featured-blog {
  border-bottom: 1px solid var(--gray-light);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.featured-thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 1rem;
  flex-shrink: 0;
}

.featured-thumb img.scaled-image {
  border: none !important;
}

.recent-post-card .p-3 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-post-card {
  background-color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #eee;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
  min-height: 430px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .recent-post-card {
    display: flex;
    flex-direction: column;
    min-height: 430px; /* <-- set your desired uniform height */
  }
}

.recent-posts-section .row.g-4 > [class*="col-"] {
  display: flex;
}

.recent-post-card .p-3 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-posts-section .row.g-4 > [class^="col-"],
.recent-posts-section .row.g-4 > [class*=" col-"] {
  display: flex;
}
.recent-post-card .p-3 p {
  margin-top: auto;
}

.post-image-wrapper {
  overflow: hidden;
  height: 200px;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recent-post-card:hover .post-image {
  transform: scale(1.08);
}

.post-title {
  transition: color 0.3s ease;
  cursor: pointer;
}

.post-title:hover {
  color: var(--blue);
  text-decoration: underline;
}

.author-thumb {
  width: 24px;
  height: 24px;
  object-fit: cover;
}

iconify-icon {
  vertical-align: middle;
  font-size: 16px;
  color: var(--text-secondary);
}

/*Pagination*/
.pagination-container {
  text-align: center;
  margin-bottom: 8rem !important;
}

/* Remove default Bootstrap border + background */
.page-link {
  border: none !important;

  box-shadow: none;
  outline: none;
  color: var(--gray-dark);
  font-weight: 500;
  padding: 6px 12px;
  transition: all 0.3s ease;
}

/* Active page - yellow circle */
.page-number.active {
  background-color: var(--off-white) !important;
  color: var(--blue-dark) !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-weight: bold;
}

/* Normal pages - round hover */
.page-number {
  color: var(--text-secondary) !important;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
}

.page-number:hover {
  background-color: var(--blue-light) !important;
  color: var(--blue) !important;
  text-decoration: none;
}

/* Previous / Next links */
.custom-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-dark) !important;
  padding: 6px 12px;
}

.custom-nav-link:hover {
  color: var(--blue-dark);
  text-decoration: none;
}

/*Explore Section*/
.resources-section {
  background-color: var(--blue-background-light);
}

.resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
}

.resource-icon {
  font-size: 32px;
  color: #facc15; /* Tailwind-style yellow */
}

.btn-primary-dark {
  background-color: var(--blue-dark) !important;
  color: #ffffff !important;
  border-radius: 100px !important;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-primary-dark:hover {
  background-color: var(--blue-darker) !important;
}


/* Limit images inside blog content */


/* Create a fixed ratio box */
.post-single-img .img-container {
  aspect-ratio: 16 / 9;     /* or remove and use explicit height below */
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* If you prefer a fixed height instead of aspect-ratio, use:
.post-single-img .img-container { height: clamp(240px, 40vw, 520px); }
*/

.post-single-img .img-container img.img-styled,
.post-single-img .img-container img.wp-post-image {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* show full image, letterboxing possible */
  display: block;
}
