/* Blog related posts - Adapted to News Listing Style */
.blog-related-posts {
  background-color: #F8FAFC;
  padding: 60px 0;
}

.blog-related-posts h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 600;
}

/* Related posts container with carousel setup */
.blog-related-posts__list {
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  position: relative;
}

/* Individual post card styling */
.blog-related-posts__post {
  background-color: #fff;
  box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  margin: 1rem;
  min-width: 250px;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-related-posts__post:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.15);
}

/* Image wrapper with colored border */
.blog-related-posts__image-wrapper {
  border-bottom: 4px solid var(--primary-color, #64c5b1);
  height: 200px;
  overflow: hidden;
  position: relative;
}

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

.blog-related-posts__post:hover .blog-related-posts__image {
  transform: scale(1.05);
}

/* Content area */
.blog-related-posts__content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Tags styling */
.blog-related-posts__tags {
  margin-bottom: 15px;
}

.blog-related-posts__tag {
  background-color: var(--primary-color-light, #e8f6f3);
  color: var(--primary-color, #64c5b1);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 8px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 5px;
}

.blog-related-posts__tag:hover {
  background-color: var(--primary-color, #64c5b1);
  color: white;
}

/* Title styling - AMÉLIORÉ POUR RESPONSIVE */
.blog-related-posts__title {
  margin: auto;
  font-size: 1.4rem; /* Réduit de 3rem à 1.4rem pour une meilleure lisibilité */
  font-weight: 600;
  line-height: 1.3; /* Amélioré de 1.4 à 1.3 pour économiser l'espace */
  color: #2c3e50;
  margin-bottom: 15px; /* Ajout d'un margin-bottom pour l'espacement */
}

.blog-related-posts__title a {
  color: inherit;
  text-decoration: none;
}

.blog-related-posts__title a:hover {
  color: var(--primary-color, #64c5b1);
}

/* Summary/excerpt styling */
.blog-related-posts__summary {
  color: #5a6c7d;
  font-size: 0.9rem; /* Augmenté de 0.7rem à 0.9rem pour meilleure lisibilité */
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Read more link */
.blog-related-posts__read-more {
  color: var(--primary-color, #64c5b1);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.blog-related-posts__read-more:hover {
  color: var(--primary-color-dark, #4a9d8a);
  text-decoration: underline;
}

/* RESPONSIVE LAYOUTS AMÉLIORÉS */
/* Mobile - Portrait phones */
@media screen and (max-width: 480px) {
  .blog-related-posts {
    padding: 30px 0;
  }
  
  .blog-related-posts h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding: 0 15px;
  }
  
  .blog-related-posts__post {
    flex: 0 0 100%;
    margin: 0.5rem 10px;
    min-width: auto;
  }
  
  .blog-related-posts__title {
    font-size: 1.1rem; /* Plus petit sur très petit écran */
    line-height: 1.3;
    margin-bottom: 12px;
  }
  
  .blog-related-posts__content {
    padding: 15px;
  }
  
  .blog-related-posts__image-wrapper {
    height: 160px; /* Plus petit sur mobile */
  }
  
  .blog-related-posts__summary {
    font-size: 0.85rem;
    margin-bottom: 15px;
  }
}

/* Mobile - Landscape phones */
@media screen and (min-width: 481px) and (max-width: 767px) {
  .blog-related-posts {
    padding: 40px 0;
  }
  
  .blog-related-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  
  .blog-related-posts__post {
    flex: 0 0 100%;
    margin: 0.5rem;
  }
  
  .blog-related-posts__title {
    font-size: 1.25rem; /* Légèrement plus grand que sur portrait */
    line-height: 1.3;
  }
  
  .blog-related-posts__image-wrapper {
    height: 180px;
  }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 999px) {
  .blog-related-posts__post {
    flex: 0 0 calc(50% - 2rem);
  }
  
  .blog-related-posts__title {
    font-size: 1.3rem;
    line-height: 1.3;
  }
  
  .blog-related-posts__image-wrapper {
    height: 200px;
  }
}

/* Desktop */
@media screen and (min-width: 1000px) {
  .blog-related-posts__post {
    flex: 0 0 calc(25% - 2rem);
  }
  
  .blog-related-posts__title {
    font-size: 1.4rem; /* Taille optimale pour desktop */
    line-height: 1.3;
  }
}

/* Large screens */
@media screen and (min-width: 1200px) {
  .blog-related-posts__title {
    font-size: 1.5rem; /* Légèrement plus grand sur grands écrans */
  }
  
  .blog-related-posts__summary {
    font-size: 0.95rem;
  }
}

/* Carousel navigation (if using tiny-slider) */
.blog-related-posts .tns-nav {
  margin: 30px 0 0 0;
  text-align: center;
}

.blog-related-posts .tns-nav > [aria-controls] {
  background-color: #ddd;
  border: 0;
  border-radius: 50%;
  height: 12px;
  margin: 0 5px;
  padding: 0;
  width: 12px;
  transition: background-color 0.3s ease;
}

.blog-related-posts .tns-nav .tns-nav-active {
  background-color: var(--primary-color, #64c5b1);
}

/* Separator with primary theme color */
.blog-post__separator {
  height: 3px;
  background: var(--primary-color, #64c5b1); /* Default to ShowerGuard teal if no primary color set */
  background: linear-gradient(90deg, var(--primary-color, #64c5b1) 0%, var(--primary-color-light, #7dd3c0) 100%);
  border-radius: 2px;
  margin: 60px auto 50px auto;
  max-width: 200px;
}

/* Contextual CTA styling */
.blog-post__cta-contextual {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 40px;
  margin: 30px 0 60px 0;
  text-align: center;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cta-contextual__content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-contextual__title {
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.cta-contextual__text {
  color: #5a6c7d;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.cta-contextual__button {
  display: flex;
  justify-content: center;
}

/* Mobile adjustments for contextual CTA */
@media (max-width: 767px) {
  .blog-post__separator {
    margin: 40px auto 30px auto;
    max-width: 150px;
  }
  
  .blog-post__cta-contextual {
    padding: 30px 20px;
    margin: 20px 0 40px 0;
  }
  
  .cta-contextual__title {
    font-size: 24px;
  }
  
  .cta-contextual__text {
    font-size: 16px;
  }
}

/* Desktop enhancement */
@media (min-width: 768px) {
  .blog-post__cta-contextual {
    padding: 50px;
  }
}
.blog-post__cta, .blog-post__cta_hide-mobile {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Desktop layout - same line */
@media (min-width: 768px) {
  .blog-post__header {
    flex-direction: row;
    align-items: center;
    gap: 30px;
  }
  
  .blog-post__cta, .blog-post__cta_hide-mobile {
    margin-top: 0;
    flex-shrink: 0; /* Prevent CTA from shrinking */
  }
}

/* Mobile fine-tuning */
@media (max-width: 767px) {
  .blog-post__cta_hide-mobile {
    padding-right: 20px;
    margin-top: 15px;
    display: block;
    margin-left: auto; /* Center block element */
    margin-right: auto; /* Center block element */
  }
}
  
  .blog-post__cta {
    padding-right: 20px;
    margin-top: 15px;
  }
}

/* Fix pour les images de hauteur égale */
.blog-related-posts__post-image-wrapper {
  border-bottom: 4px solid var(--primary-color, #64c5b1);
  height: 400px;
  overflow: hidden;
  position: relative;
  display: block;
}

/* Responsive heights pour mobile */
@media screen and (max-width: 480px) {
  .blog-related-posts__post-image-wrapper {
    height: 160px;
  }
}

@media screen and (min-width: 481px) and (max-width: 767px) {
  .blog-related-posts__post-image-wrapper {
    height: 180px;
  }
}


/* Tags */

.blog-post__tags svg {
  height: auto;
  margin-right: 0.35rem;
  width: 15px;
}

.blog-post__tag-link {
  font-size: 1em;
}




/* Comments */

/* Blog comments */

.blog-comments {
  margin: 0 auto;
  max-width: 680px;
}

.blog-comments .hs-submit {
  text-align: center;
}

.blog-comments .comment-reply-to {
  border: 0 none;
}

.blog-comments .comment-reply-to:hover,
.blog-comments .comment-reply-to:focus {
  background-color: transparent;
  text-decoration: underline;
}