/* Blog styles */
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); padding: 1rem; }

.blog-hero { background: linear-gradient(135deg, #e5e7eb, #f3f4f6); padding: 3rem 0; margin-bottom: 2rem; }
.blog-title { font-size: 2.25rem; font-weight: 800; }
.blog-subtitle { color: #555; }
.blog-hero { width: 100%; text-align: center; }
.blog-hero .container { max-width: 1200px; margin: 0 auto; }
.blog-title { text-align: center; }
.blog-subtitle { text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.blog-card-image { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; }
.blog-card-title { font-size: 1.25rem; margin-top: 0.75rem; }
.blog-card-excerpt { color: #444; margin: 0.5rem 0 1rem; }
.blog-card-link { color: #1f2937; font-weight: 600; }

.post-header { margin-bottom: 1rem; }
.post-title { font-size: 2rem; font-weight: 800; }
.post-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin: 1rem 0; }
.post-content { font-size: 1.05rem; line-height: 1.7; }

.section-title { font-size: 1.75rem; font-weight: 700; margin: 2rem 0 1rem; text-align: center; }
/* Testimonials carousel */
.testimonials-carousel { position: relative; overflow: hidden; }
.marquee-track { display: flex; gap: 1rem; align-items: stretch; width: max-content; animation: marquee 45s linear infinite; will-change: transform; }
.testimonial-card { min-width: 300px; flex: 0 0 auto; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Duplicated content ensures seamless infinite scroll; pause on hover */
.testimonials-carousel:hover .marquee-track { animation-play-state: paused; }

/* Smooth image rendering */
.testimonial-card img.avatar { image-rendering: auto; }

/* Mobile adjustments */
@media (max-width: 480px) {
  .marquee-track { gap: 0.5rem; }
  .testimonial-card { min-width: 240px; }
}
.testimonial-card .testimonial-header { display: flex; align-items: center; gap: 0.75rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar.placeholder { color: #111; }
.meta .name { font-weight: 700; }
.meta .company { color: #555; margin-left: 0.25rem; }
.rating { font-size: 0.95rem; color: #111; }

.empty { color: #555; padding: 1rem; }


/* Responsive adjustments */
@media (max-width: 480px) {
  .container { padding: 0.75rem; }
  .blog-hero { padding: 2rem 0; }
  .blog-title { font-size: 1.75rem; }
  .blog-subtitle { font-size: 0.95rem; }

  .grid { grid-template-columns: 1fr; }
  .blog-card-image { height: 140px; }
  .blog-card-title { font-size: 1.15rem; }

  .section-title { font-size: 1.5rem; }
  .marquee-track { gap: 0.5rem; }
  .testimonial-card { min-width: 240px; }
  .avatar { width: 40px; height: 40px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .blog-hero { padding: 2.5rem 0; }
  .blog-title { font-size: 2rem; }
  .blog-subtitle { font-size: 1rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .blog-card-image { height: 160px; }
  .testimonial-card { min-width: 260px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .blog-hero { padding: 3rem 0; }
  .blog-title { font-size: 2.25rem; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .blog-card-image { height: 180px; }
  .testimonial-card { min-width: 280px; }
}

@media (min-width: 1025px) {
  .blog-hero { padding: 3.5rem 0; }
  .blog-title { font-size: 2.75rem; }

  .blog-card-image { height: 200px; }
  .testimonial-card { min-width: 320px; }
  .marquee-track { gap: 1.25rem; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}