/**
 * Blog components styling
 * 
 * @package LeanPress
 */

/* Blog Grid Layout */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

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

@media (min-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .blog-grid--four-columns {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Section headers */
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.15rem);
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--c-fg);
  position: relative;
}

/* Blog Card Component */
.blog-card {
  display: flex;
  flex-direction: column;
  background-color: var(--c-bg);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
}

.blog-card__image-container {
  position: relative;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}

.blog-card__image-link {
  display: block;
  overflow: hidden;
}

.blog-card__image {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  display: block;
}

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

/* Category pill styling */
.blog-card__category--pill {
  position: absolute;
  bottom: 5px;
  left: 10px;
  margin: 0;
  border-radius: 50px;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-card__category--pill span {
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  color: rgba(255, 255, 255, 1);
}

.blog-card__category--post span,
.blog-card__category--toolkit span {
  background: #213D06;
  color: #7ff205;
  font-weight: 500;
}

.blog-card__content {
  padding: 0.75rem 0rem 0rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__category {
  margin-bottom: 0.5rem;
}

.blog-card__title {
  font-size: clamp(1.3rem, 5vw, 1.4rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.blog-card__title a {
  color: var(--c-fg);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.blog-card__excerpt {
  color: var(--c-fg-light);
  font-size: clamp(1rem, 3vw, 1.05rem);
  line-height: 1.5;
  flex-grow: 1;
}

/* Date display removed for cleaner design */

/* Featured Articles Section */
.featured-articles {
  padding: 2rem 0;
}

/* Latest Articles Section */
.latest-articles {
  padding: 5rem 0 3rem;
}

/* Recommended Posts Section */
.recommended-posts {
  padding: 0 0 2rem;
  background-color: var(--c-bg-alt);
}

/* Category filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding-bottom: 2rem;
}

.filter-btn {
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-fg);
  padding: 0.6rem 1.2rem; /* Increased padding */
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem; 
}

.filter-btn:hover {
  background-color: var(--c-bg-alt);
}

.filter-btn.active {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
}

/* Load more button */
.load-more-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

/* No posts found message */
.no-posts-found {
  text-align: center;
  padding: 2rem;
  color: var(--c-fg-light);
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-filter {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
  }
  
  .filter-btn {
    font-size: 0.9rem; /* Smaller font size to prevent breaking */
    padding: 0.7rem 0.8rem;
  }
  
  /* Search pill responsive adjustments */
  .category-filter .search-pill {
    /* Keep on same line with other filter buttons */
    margin-left: 0.5rem;
    justify-content: center;
  }
  
  .category-filter .search-pill .search-input {
    width: 180px; /* Fixed width to match desktop */
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  
  .category-filter .search-pill .search-input:focus {
    width: 100%;
    max-width: 300px;
  }
}

/* Additional responsive adjustments for smaller screens */
@media (max-width: 480px) {
  .category-filter {
    gap: 0.3rem;
  }
  
  /* At smallest screens, search pill goes to its own row */
  .category-filter .search-pill {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

