/*--------------------------------------------------------------
# Blog Comments Section
--------------------------------------------------------------*/
.blog-comments {
  background-color: #f8f4ef; 
  border-radius: 16px;
}

.blog-comments .section-header h3 {
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.blog-comments .section-header h3 .comment-count {
  font-size: 24px;
  font-weight: 500;
}

.blog-comments .comments-wrapper {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.blog-comments .comment-card {
  background-color: var(--gh-white-color);
  border-radius: 12px;
  padding: 25px;
  border-left: 4px solid transparent;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.blog-comments .comment-card:hover {
  border-left-color: var(--primary-color);
  transform: translateX(5px);
}

.blog-comments .comment-card.reply {
  margin-left: 48px;
  border-left-color: color-mix(in srgb, var(--primary-color), transparent 70%);
  background-color: color-mix(in srgb, var(--gh-white-color), transparent 3%);
}

@media (min-width: 768px) {
  .blog-comments .comment-card.reply {
    margin-left: 85px;
  }
}

.blog-comments .reply-thread {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid
    color-mix(in srgb, var(--gh-dark-color), transparent 92%);
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.blog-comments .comment-header {
  margin-bottom: 20px;
}

.blog-comments .comment-header .user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.blog-comments .comment-header .user-info img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--primary-color), transparent 85%);
}

.blog-comments .comment-header .user-info .meta .name {
  color: var(--gh-dark-color);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 5px;
}

.blog-comments .comment-header .user-info .meta .date {
  color: color-mix(in srgb, var(--gh-dark-color), transparent 45%);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-comments .comment-header .user-info .meta .date i {
  font-size: 13px;
}

.blog-comments .comment-content p {
  color: var(--gh-dark-color);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.blog-comments .comment-actions {
  display: flex;
  gap: 20px;
}

.blog-comments .comment-actions .action-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  color: color-mix(in srgb, var(--gh-dark-color), transparent 35%);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.blog-comments .comment-actions .action-btn i {
  font-size: 15px;
  transition: transform 0.3s ease;
}

.blog-comments .comment-actions .action-btn:hover {
  color: var(--gh-dark-color);
  background-color: color-mix(in srgb, var(--primary-color), transparent 95%);
}

.blog-comments .comment-actions .action-btn:hover.like-btn i {
  transform: scale(1.2);
}

.blog-comments .comment-actions .action-btn:hover.reply-btn i {
  transform: translateX(-3px);
}

.blog-comments .comment-actions .action-btn.like-btn.active {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .blog-comments .section-header {
    margin-bottom: 30px;
  }

  .blog-comments .section-header h3 {
    font-size: 28px;
  }

  .blog-comments .section-header h3 .comment-count {
    font-size: 20px;
  }

  .blog-comments .comment-card {
    padding: 20px;
  }

  .blog-comments .comment-card.reply {
    margin-left: 35px;
  }

  .blog-comments .comment-header .user-info img {
    width: 40px;
    height: 40px;
  }

  .blog-comments .comment-header .user-info .meta .name {
    font-size: 15px;
  }

  .blog-comments .comment-header .user-info .meta .date {
    font-size: 13px;
  }

  .blog-comments .comment-content p {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .blog-comments .comment-actions .action-btn {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* ===== 🎯 Scroll general para todo el bloque de comentarios ===== */
.blog-comments .comments-wrapper {
  max-height: 600px; /* Altura máxima del contenedor principal */
  overflow-y: auto;
  padding-right: 6px; /* pequeño espacio para el scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--gh-dark-color) transparent;
}

/* Scroll elegante para Chrome, Edge, Safari */
.blog-comments .comments-wrapper::-webkit-scrollbar {
  width: 8px;
}

.blog-comments .comments-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 10px;
}

.blog-comments .comments-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== 💬 Scroll interno solo para las respuestas ===== */
.blog-comments .reply-thread {
  max-height: 300px; /* límite de alto solo para replies */
  overflow-y: auto;
  padding-top: 25px;
  margin-top: 25px;
  border-top: 1px solid
    color-mix(in srgb, var(--gh-dark-color), transparent 92%);
  display: flex;
  flex-direction: column;
  gap: 25px;
  scrollbar-width: thin;
  scrollbar-color: var(--gh-dark-color) transparent;
}

.blog-comments .reply-thread::-webkit-scrollbar {
  width: 6px;
}

.blog-comments .reply-thread::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--gh-dark-color), transparent 20%);
  border-radius: 8px;
}

.blog-comments .reply-thread::-webkit-scrollbar-track {
  background: transparent;
}

/* Mantiene el diseño estable aunque aparezca el scroll */
.blog-comments .comments-wrapper,
.blog-comments .reply-thread {
  scrollbar-gutter: stable both-edges;
}
