/* stylelint-disable @stylistic/selector-list-comma-newline-after */

/*.blog-header-logo {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif rtl:Amiri, Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
}*/

.blog-header-logo:hover {
  text-decoration: none;
}

/* h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif/*rtl:Amiri, Georgia, "Times New Roman", serif ;
} */

.flex-auto {
  flex: 0 0 auto;
}

.h-250 { height: 250px; }
@media (min-width: 768px) {
  .h-md-250 { height: 250px; }
}

/* Pagination */
.blog-pagination {
  margin-bottom: 4rem;
}

/*
 * Blog posts
 */
.blog-post {
  margin-bottom: 4rem;
}
.blog-post-meta {
  margin-bottom: 1.25rem;
  color: #727272;
}
/* Featured blog card */
.custom-blog-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 100%; /* Prevent zooming beyond container width */
  font-size: 16px; /* Base font size */
}

.custom-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.15);
}

.custom-blog-card__image-container {
  position: relative;
  overflow: hidden;
  height: 200px;
  min-height: 200px; /* Prevent shrinking */
}

.custom-blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.custom-blog-card:hover .custom-blog-card__image {
  transform: scale(1.05);
}

.custom-blog-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.custom-blog-card__title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  font-size: 1.25em; /* Use em instead of rem */
  /* font-weight: 700; */
  color: #ffffff;
  margin: 0;
  z-index: 1;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.custom-blog-card__content {
  padding: 1.5em;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.custom-blog-card__text {
  color: #333;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
  margin-bottom: 1em; /* Add space before footer */
}

.custom-blog-card__footer {
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Align items to top */
  margin-top: auto; /* Push footer to bottom */
  padding-top: 0.5em;
  border-top: 1px solid #eee;
  width: 100%;
  flex-shrink: 0;
  gap: 0.75em;
  /*  min-height: 2.5em; Minimum height for footer */
}

.custom-blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.25em;
  color: #777;
  flex-wrap: wrap; /* Allow wrapping for long text */
  max-width: 60%; /* Limit width to prevent overlap */
}

.custom-blog-card__date {
  color: #888888;
  white-space: nowrap; /* Keep date on one line */
}

.custom-blog-card__author {
  display: flex;
  align-items: center;
}

.custom-blog-card__author-image {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 0.35em;
  flex-shrink: 0; /* Prevent image from shrinking */
}

.custom-blog-card__author-name {
  font-size: 0.75em;
  color: #888888;
}

.custom-blog-card__read-more {
  display: inline-flex;
  align-items: center;
  color: #838383;
  text-decoration: none;
  font-family: 'Proxima Nova', sans-serif !important;
  font-weight: 600;
  font-size: 0.75em;
  transition: color 0.3s ease;
  position: relative;
  padding-right: 20px;
}

.custom-blog-card__read-more::after {
  content: "→";
  position: absolute;
  right: 5px;
  top: -1px;
  opacity: 0;
  transform: translateX(-10px);
  font-family: 'Proxima Nova', sans-serif !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-blog-card:hover .custom-blog-card__read-more {
  color: #6a11cb;
}

.custom-blog-card:hover .custom-blog-card__read-more::after {
  opacity: 1;
  transform: translateX(0);
}

/* Dark mode styles */
body.dark-mode .custom-blog-card {
  background-color: #261a3c;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .custom-blog-card__text {
  color: #ccc;
}

body.dark-mode .custom-blog-card__author-name {
  color: #aaa;
}

body.dark-mode .custom-blog-card__read-more {
  background-color: #362952;
}

body.dark-mode .custom-blog-card__read-more:hover {
  background-color: #443366;
}

body.dark-mode .custom-blog-card__footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .custom-blog-card__meta,
body.dark-mode .custom-blog-card__date {
  color: #aaa;
}

/* Responsive styles */
@media (max-width: 768px) {
  .custom-blog-card__image-container {
    height: 150px;
  }

  .custom-blog-card__title {
    font-size: 1rem;
    bottom: 10px;
    left: 10px;
    right: 10px;
  }

  .custom-blog-card__content {
    padding: 1rem;
  }

  .custom-blog-card__text {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .custom-blog-card__footer {
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    gap: 0.75rem;
  }

  .custom-blog-card__meta {
    font-size: 0.7rem;
  }

  .custom-blog-card__read-more {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}