/*--------------------------------------------------------------
# Blog Hero Section
--------------------------------------------------------------*/
.blog-hero {
  width: 100%;
  height: 400px;
  background: linear-gradient(rgba(108, 7, 15, 0.8), rgba(29, 29, 29, 0.8)), url('../img/jeunes-unis-contre-paludisme-rdc.jpg') center center;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-hero .hero-container {
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 0 20px;
}

.blog-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.blog-hero p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/*--------------------------------------------------------------
# Blog Content Section
--------------------------------------------------------------*/
.blog-content {
  padding: 80px 0;
  background-color: #f8f9fa;
}

/*--------------------------------------------------------------
# Blog Filters
--------------------------------------------------------------*/
.blog-filters {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-right: 50px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  padding: 12px 20px;
}

.search-box input:focus {
  border-color: var(--primay-color);
  box-shadow: none;
}

.search-box .btn-search {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primay-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-box .btn-search:hover {
  background-color: var(--secondary-color);
}

.category-filter select {
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  padding: 12px 20px;
  cursor: pointer;
}

.category-filter select:focus {
  border-color: var(--primay-color);
  box-shadow: none;
}

/*--------------------------------------------------------------
# Articles Grid
--------------------------------------------------------------*/
.articles-grid {
  margin-bottom: 40px;
}

.article-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(108, 7, 15, 0.2);
}

.article-card .article-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.article-card .article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.article-card:hover .article-img img {
  transform: scale(1.1);
}

.article-card .category-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--primay-color);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.article-card .article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-card .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: #666;
}

.article-card .article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-card .article-meta i {
  color: var(--primay-color);
}

.article-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 15px;
  line-height: 1.4;
  font-family: 'Raleway', sans-serif;
}

.article-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.article-card .read-more {
  color: var(--primay-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.article-card .read-more:hover {
  color: var(--secondary-color);
}

.article-card .read-more i {
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.article-card .read-more:hover i {
  margin-left: 10px;
}

/*--------------------------------------------------------------
# Pagination
--------------------------------------------------------------*/
.blog-pagination {
  margin-top: 40px;
}

.blog-pagination .pagination .page-link {
  color: var(--primay-color);
  border: 2px solid #e0e0e0;
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.blog-pagination .pagination .page-link:hover {
  background-color: var(--primay-color);
  color: #fff;
  border-color: var(--primay-color);
}

.blog-pagination .pagination .page-item.active .page-link {
  background-color: var(--primay-color);
  border-color: var(--primay-color);
  color: #fff;
}

.blog-pagination .pagination .page-item.disabled .page-link {
  color: #999;
  border-color: #e0e0e0;
  background-color: #f8f9fa;
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.sidebar-widget .widget-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primay-color);
  font-family: 'Raleway', sans-serif;
}

/* Recent Posts */
.recent-posts .recent-post-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.recent-posts .recent-post-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-posts .recent-post-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.recent-posts .post-info {
  flex: 1;
}

.recent-posts .post-info h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.recent-posts .post-info h4 a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.recent-posts .post-info h4 a:hover {
  color: var(--primay-color);
}

.recent-posts .post-date {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 5px;
}

.recent-posts .post-date i {
  color: var(--primay-color);
}

/* Categories */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-list li {
  margin-bottom: 15px;
}

.categories-list li:last-child {
  margin-bottom: 0;
}

.categories-list li a {
  color: var(--secondary-color);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.categories-list li a:hover {
  background-color: var(--primay-color);
  color: #fff;
  padding-left: 20px;
}

.categories-list li a span {
  background-color: var(--primay-color);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.categories-list li a:hover span {
  background-color: #fff;
  color: var(--primay-color);
}

/* Tags */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags-cloud a {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f8f9fa;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tags-cloud a:hover {
  background-color: var(--primay-color);
  color: #fff;
  transform: translateY(-3px);
}

/*--------------------------------------------------------------
# Popular Articles Section
--------------------------------------------------------------*/
.popular-articles {
  padding: 80px 0;
  background-color: #fff;
}

.popular-articles .section-title {
  text-align: center;
}

.popular-articles .section-title h2 {
  color: var(--primay-color);
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.popular-articles .section-title p {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.popular-slider-container {
  position: relative;
  margin-bottom: 30px;
}

.popular-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.popular-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(108, 7, 15, 0.2);
}

.popular-card .popular-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.popular-card .popular-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.popular-card:hover .popular-img img {
  transform: scale(1.1);
}

.popular-card .trending-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ff6b35;
  color: #fff;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.popular-card .trending-badge i {
  animation: fire 1s ease-in-out infinite;
}

@keyframes fire {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

.popular-card .popular-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.popular-card .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: #666;
}

.popular-card .article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.popular-card .article-meta i {
  color: var(--primay-color);
}

.popular-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 15px;
  line-height: 1.4;
  font-family: 'Raleway', sans-serif;
}

.popular-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.popular-card .read-more {
  color: var(--primay-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.popular-card .read-more:hover {
  color: var(--secondary-color);
}

.popular-card .read-more i {
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.popular-card .read-more:hover i {
  margin-left: 10px;
}

/* Carousel Controls for Popular Articles */
#popularCarousel .carousel-control-prev,
#popularCarousel .carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: var(--primay-color);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

#popularCarousel .carousel-control-prev {
  left: -25px;
}

#popularCarousel .carousel-control-next {
  right: -25px;
}

#popularCarousel .carousel-control-prev:hover,
#popularCarousel .carousel-control-next:hover {
  opacity: 1;
}

#popularCarousel .carousel-control-prev-icon,
#popularCarousel .carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

/*--------------------------------------------------------------
# Responsive Design
--------------------------------------------------------------*/

/* Tablette */
@media (max-width: 991px) {
  .blog-hero h1 {
    font-size: 2.5rem;
  }

  .blog-hero p {
    font-size: 1rem;
  }

  .blog-sidebar {
    margin-top: 40px;
    position: relative;
    top: 0;
  }

  /* Popular Articles - 2 colonnes sur tablette */
  .popular-articles .carousel-item .row .col-lg-4:nth-child(3) {
    display: none;
  }

  #popularCarousel .carousel-control-prev {
    left: -15px;
  }

  #popularCarousel .carousel-control-next {
    right: -15px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .blog-hero {
    height: 300px;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-hero p {
    font-size: 0.95rem;
  }

  .blog-content {
    padding: 40px 0;
  }

  .blog-filters {
    padding: 20px;
  }

  .article-card .article-img {
    height: 200px;
  }

  .sidebar-widget {
    padding: 20px;
  }

  .recent-posts .recent-post-item img {
    width: 60px;
    height: 60px;
  }

  .recent-posts .post-info h4 {
    font-size: 0.9rem;
  }

  /* Popular Articles - 1 colonne sur mobile */
  .popular-articles .carousel-item .row .col-lg-4:nth-child(2),
  .popular-articles .carousel-item .row .col-lg-4:nth-child(3) {
    display: none;
  }

  .popular-articles .carousel-item .row .col-lg-4:first-child {
    max-width: 100%;
    flex: 0 0 100%;
  }

  #popularCarousel .carousel-control-prev,
  #popularCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
  }

  #popularCarousel .carousel-control-prev {
    left: 5px;
  }

  #popularCarousel .carousel-control-next {
    right: 5px;
  }

  .popular-card .popular-img {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .blog-hero h1 {
    font-size: 1.5rem;
  }

  .article-card .article-img {
    height: 180px;
  }

  .popular-card .popular-img {
    height: 180px;
  }
}

/*--------------------------------------------------------------
# Single Article Page (single.php)
--------------------------------------------------------------*/
.single-article {
  overflow: visible;
}

.single-article .hero-img {
  height: auto;
  max-height: 520px;
}

.single-article .hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
  font-family: 'Raleway', sans-serif;
}

.article-body {
  color: #444;
  line-height: 1.9;
  font-size: 1.05rem;
}

.post-actions {
  margin-top: 25px;
  gap: 15px;
  flex-wrap: wrap;
}

.share-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary-color);
  font-weight: 600;
  margin-right: 10px;
}

.share-buttons {
  display: flex;
  flex-direction: column;
}

.share-btn {
  width: 35px;
  height: 35px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  overflow: hidden;
}

.share-btn i,
.share-btn svg {
  font-size: 1.1rem;
  line-height: 0;
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.btn-outline-success:hover {
  background-color: #25d366;
  border-color: #25d366;
  color: #fff;
}

/* Tablet */
@media (max-width: 991px) {
  .single-article .hero-img {
    max-height: 420px;
  }

  .single-title {
    font-size: 1.6rem;
  }

  .article-body {
    font-size: 1.02rem;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .single-article .hero-img {
    height: 220px;
  }

  .single-title {
    font-size: 1.5rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .post-actions {
    justify-content: flex-start !important;
    gap: 14px;
  }

  .share-label {
    display: block;
    width: 100%;
    margin: 10px 0 4px;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-buttons .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .single-article .hero-img {
    height: 200px;
  }

  .single-title {
    font-size: 1.35rem;
  }
}