/* ================================
   Editorial Horizontal Compact
   ================================ */

#editorial-panel {
  overflow: hidden;
  position: relative; /* For potential scroll buttons */
}

/* Scroll container */
.editorial-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide default scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide default scrollbar for IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.editorial-scroll::-webkit-scrollbar {
  display: none;
}

/* Optional: Show scrollbar on hover only */
.editorial-scroll:hover::-webkit-scrollbar {
  display: block;
  height: 6px;
}

.editorial-scroll:hover::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 10px;
}

.editorial-scroll:hover::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

/* Item wrapper */
.editorial-item {
  flex: 0 0 144px; /* Fixed width */
  max-width: 144px;
  transition: transform 0.3s ease; /* For smooth hover effects */
}

/* Card styling */
.editorial-item .card {
  width: 100%;
  height: 144px;
  padding: 8px; /* Slightly more padding */
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease; /* Smooth all properties */
  overflow: hidden; /* Prevent content overflow */
  cursor: pointer;
  background: white; /* Ensure background */
  border: 1px solid #eee; /* Subtle border */
}

/* Image */
.editorial-item img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  display: block; /* Remove inline spacing */
  transition: transform 0.3s ease;
}

/* Text */
.editorial-item h5 {
  font-size: 0.75rem; /* Slightly larger for readability */
  margin: 0 0 4px 0;
  line-height: 1.2;
  font-weight: 600;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.editorial-item p {
  font-size: 0.65rem; /* Slightly larger */
  margin: 0 0 8px 0;
  color: #666;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button */
.editorial-item .btn {
  font-size: 0.6rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: #007bff;
  color: white;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.editorial-item .btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

/* Hover Effects */
.editorial-item .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #ddd;
}

.editorial-item .card:hover img {
  transform: scale(1.05);
}

/* Active/Click state */
.editorial-item .card:active {
  transform: translateY(-2px);
  transition: transform 0.1s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .editorial-item {
    flex: 0 0 130px; /* Slightly smaller on mobile */
    max-width: 130px;
  }
  
  .editorial-item .card {
    height: 130px;
    padding: 6px;
  }
  
  .editorial-item img {
    width: 48px;
    height: 48px;
  }
  
  .editorial-scroll {
    gap: 10px;
    padding: 8px 10px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .editorial-item .card:hover {
    transform: none; /* Disable hover effects on touch */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .editorial-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; /* Optional: better scrolling on touch */
  }
}