/* Trending Section - Full viewport with marquee texts and carousel */

.trending-section {
  width: 100vw;
  height: auto;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-background);
  overflow: hidden;
  position: relative;
}

/* Symmetrical marquee styling for top and bottom */
.trending-marquee-top,
.trending-marquee-bottom {
  width: 100%;
  height: auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background);
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
}

/* Consistent marquee content styling */
.trending-marquee-content,
.trending-marquee-content-reverse {
  display: flex;
  white-space: nowrap;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Top marquee uses accent color and scrolls left */
.trending-marquee-content {
  animation: marquee-left 30s linear infinite;
  color: var(--accent-color);
}

/* Bottom marquee uses primary color and scrolls right */
.trending-marquee-content-reverse {
  animation: marquee-right 30s linear infinite;
  color: var(--color-primary);
}

/* Pause marquee on hover (only when hovering the text itself) */
.trending-marquee-content:hover,
.trending-marquee-content-reverse:hover {
  animation-play-state: paused;
}

.trending-marquee-content span,
.trending-marquee-content-reverse span {
  display: inline-block;
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Middle carousel with consistent spacing */
.trending-middle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 6rem;
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.trending-carousel {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.trending-carousel::-webkit-scrollbar { display: none; }

.trending-track {
  width: 100%;
  display: flex;
  gap: 1.5rem;
  height: 100%;
  align-items: center;
}

/* Trending cards with consistent image sizes */
.trending-card {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
  gap: 0.75rem;
}

.trending-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ensure the image appears before category/title in visual order; category will sit below image */
.trending-card-image { order: 1; }
.trending-card-category { order: 2; align-self: flex-start; margin-top: 0.5rem; }

/* category styling (now below image and left aligned) */
.trending-card-category {
  font-size: var(--fs-sm);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0;
  color: var(--accent-color); /* changed from var(--color-primary) */
}

/* image container */
.trending-card-image {
  width: 280px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  position: relative;
  display: block;
}

.trending-card-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

/* image scale on hover preserved only on the image itself (no card translate) */
.trending-card-image img:hover {
  transform: scale(1.05);
}

/* Titles/subtitles layout remains unchanged */
.trending-card-title,
.trending-card-subtitle {
  text-decoration: none;
  display: inline-block;
}

/* underline titles/subtitles on hover without changing color */
.trending-card:hover .trending-card-title,
.trending-card:hover .trending-card-subtitle {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
  color: inherit;
}

.trending-card-date {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 700;
  margin-top: 4px;
  text-transform: none;
}

/* Navigation arrows - remove border + hover/active visual effects (neutral buttons) */
.trending-nav {
  position: absolute;
  right: 4rem;
  top: 1rem;
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.trending-prev-btn,
.trending-next-btn {
  background: transparent;
  border: none; /* removed border */
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: none; /* remove hover transform */
  color: var(--color-primary);
  padding: 0;
  box-shadow: none;
}

/* Properly sized SVG icons to fit button */
.trending-prev-btn svg,
.trending-next-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Remove hover/active effects entirely for arrows */
.trending-prev-btn:hover,
.trending-next-btn:hover,
.trending-prev-btn:active,
.trending-next-btn:active {
  background: transparent;
  color: var(--color-primary);
  transform: none;
  box-shadow: none;
}

/* Disabled state keeps reduced opacity but no border-color changes */
.trending-prev-btn:disabled,
.trending-next-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  color: var(--color-text-muted);
}

/* Responsive adjustments with consistent spacing */
@media (max-width: 1200px) {
  .trending-middle { padding: 2.5rem 4rem; }
  .trending-nav { right: 2rem; top: 1rem; }
  .trending-card { flex: 0 0 240px; }
  .trending-card-image { width: 240px; }
  .trending-marquee-content,
  .trending-marquee-content-reverse { font-size: clamp(1.75rem, 3.5vw, 3rem); }
  .trending-prev-btn, .trending-next-btn { width: 44px; height: 44px; }
  .trending-prev-btn svg, .trending-next-btn svg { width: 18px; height: 18px; }
}

@media (max-width: 768px) {
  .trending-section { min-height: 70vh; }
  .trending-marquee-top, .trending-marquee-bottom { padding: 1rem 0; border-width: 1px; }
  .trending-marquee-content, .trending-marquee-content-reverse { font-size: clamp(1.25rem, 3vw, 2rem); }
  .trending-middle { padding: 2rem 1rem; min-height: 300px; }
  .trending-nav { right: 1rem; top: 0.5rem; gap: 0.75rem; }
  .trending-prev-btn, .trending-next-btn { width: 40px; height: 40px; border-width: 1.5px; }
  .trending-prev-btn svg, .trending-next-btn svg { width: 16px; height: 16px; }
  .trending-card { flex: 0 0 200px; }
  .trending-card-image { width: 200px; }
  .trending-card-title { font-size: var(--fs-sm); }
  .trending-card-subtitle { font-size: 0.5rem; }
}

@media (max-width: 480px) {
  .trending-marquee-top, .trending-marquee-bottom { padding: 0.75rem 0; }
  .trending-marquee-content, .trending-marquee-content-reverse { font-size: clamp(1rem, 2.5vw, 1.5rem); }
  .trending-middle { padding: 1.5rem 0.5rem; min-height: 250px; }
  .trending-nav { right: 0.5rem; top: 0.25rem; gap: 0.5rem; }
  .trending-prev-btn, .trending-next-btn { width: 36px; height: 36px; }
  .trending-prev-btn svg, .trending-next-btn svg { width: 14px; height: 14px; }
  .trending-card { flex: 0 0 160px; }
  .trending-card-image { width: 160px; }
}
