/**
 * Timeline Carousel Component
 * Reusable horizontal timeline carousel for displaying posts
 * Used on: explore page, profile pages, topic pages
 */

/* ============================================================================
   Size Variant API
   ============================================================================ */

/* Base dimensions (default - used on profile/topic pages) */
.carousel-post-card {
  --carousel-card-width: 276px;
  --carousel-card-height: 168px;
}

/* Size modifier class */
.carousel-post-card--large {
  --carousel-card-width: 460px;
  --carousel-card-height: 280px;
}

/* Context-based sizing (explore page gets large cards) */
.explore-page .carousel-post-card {
  --carousel-card-width: 460px;
  --carousel-card-height: 280px;
}

/* ============================================================================
   Timeline Carousel Wrapper
   ============================================================================ */

.timeline-carousel-wrapper {
  position: relative;
  width: 100%;
}

/* Loading State */
.timeline-loading-overlay,
.carousel-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: transparent;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.timeline-loading-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
}

.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

.timeline-loading-bar {
  width: 120px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.timeline-loading-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-primary, #00a8ff), transparent);
  border-radius: 3px;
  animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes loadingBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Hide carousel content while loading */
.timeline-carousel-wrapper.loading .timeline-carousel {
  opacity: 0;
}

/* Hide loading overlay when loaded */
.timeline-carousel-wrapper.loaded .timeline-loading-overlay,
.timeline-carousel-wrapper.loaded .carousel-loading-overlay {
  display: none;
}

/* Loaded state - fade in real carousel content */
.timeline-carousel-wrapper.loaded .timeline-carousel {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ============================================================================
   Main Carousel Container
   ============================================================================ */

.timeline-carousel {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 310px;
  scrollbar-width: none;
  padding: 0.5rem calc(50vw - 230px) 0.75rem;
  -webkit-overflow-scrolling: touch;
}

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

/* ============================================================================
   Carousel Post Card
   ============================================================================ */

.carousel-post-card {
  flex: 0 0 auto;
  width: var(--carousel-card-width, 276px);
  height: var(--carousel-card-height, 168px);
  position: relative;
  border-radius: var(--radius-xl, 16px);
  overflow: visible;
  /* No container - content only */
  background: transparent;
  border: none;
  transition: opacity 0.5s ease-out, filter 0.5s ease-out, transform 0.5s ease-out;
  cursor: pointer;
  align-self: flex-start;
}

/* Smooth fade-in for embed content */
.carousel-post-card .post-embed-container > *:not(.embed-loading) {
  animation: embedFadeIn 0.3s ease-out;
}

@keyframes embedFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Featured (active) card in center - content only */
.carousel-post-card.featured {
  z-index: 5;
}

/* Adjacent cards (faded) */
.carousel-post-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

.carousel-post-card:hover:not(.featured) {
  opacity: 0.8;
  filter: brightness(0.85);
}

/* ============================================================================
   Create Post Card
   ============================================================================ */

.carousel-create-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.carousel-create-card:hover {
  background: rgba(0, 168, 255, 0.08);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.02);
  opacity: 1 !important;
  filter: none !important;
}

.carousel-create-card .create-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.carousel-create-card .create-card-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.carousel-create-card:hover .create-card-icon {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.5);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.1);
}

.carousel-create-card .create-card-text {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.carousel-create-card:hover .create-card-text {
  color: var(--color-primary, #00a8ff);
}

/* ============================================================================
   Load More Card
   ============================================================================ */

.carousel-load-more-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-load-more-card:hover {
  background: rgba(0, 168, 255, 0.08);
  border-color: rgba(0, 168, 255, 0.4);
  transform: scale(1.02);
  opacity: 1 !important;
  filter: none !important;
}

.carousel-load-more-card .load-more-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
}

.carousel-load-more-card .load-more-card-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.carousel-load-more-card:hover .load-more-card-icon {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.5);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.1);
}

.carousel-load-more-card .load-more-card-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.carousel-load-more-card:hover .load-more-card-text {
  color: var(--color-primary, #00a8ff);
}

.carousel-load-more-card .load-more-spinner {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-load-more-card.loading {
  pointer-events: none;
  opacity: 0.7 !important;
}

/* ============================================================================
   Topic Pills Row
   ============================================================================ */

.carousel-card-topics {
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.5rem;
  z-index: 10;
  overflow: hidden;
}

.carousel-topic-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.carousel-topic-pill:hover {
  background: rgba(0, 168, 255, 0.15);
  border-color: rgba(0, 168, 255, 0.4);
  color: var(--color-primary, #00a8ff);
  transform: scale(1.05);
}

.carousel-topic-pill.primary-topic {
  background: rgba(0, 168, 255, 0.12);
  border-color: rgba(0, 168, 255, 0.3);
  color: var(--color-primary, #00a8ff);
  font-weight: 500;
}

.carousel-topic-more {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ============================================================================
   Action Buttons Row
   ============================================================================ */

.carousel-card-actions {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem;
  z-index: 10;
}

/* Only show action buttons when card is featured */
.carousel-post-card.featured .carousel-card-actions {
  display: flex;
}

.carousel-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  /* Ensure consistent alignment for both <a> and <button> elements */
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1;
  font-family: inherit;
  /* Reset anchor-specific defaults */
  height: auto;
  margin: 0;
}

/* Ensure anchor tags align consistently with buttons */
a.carousel-action-btn {
  display: inline-flex;
  align-items: center;
}

.carousel-action-btn:hover {
  background: rgba(0, 168, 255, 0.1);
  border-color: rgba(0, 168, 255, 0.35);
  color: var(--color-primary, #00a8ff);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-action-btn svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.carousel-action-btn:hover svg {
  opacity: 1;
}

/* Delete button - danger styling */
.carousel-action-btn-danger {
  color: rgba(255, 255, 255, 0.5);
}

.carousel-action-btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.carousel-action-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================================
   Embed Container
   ============================================================================ */

.carousel-post-card .post-embed-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl, 16px);
}

/* Twitter embed cards need overflow visible to prevent border clipping */
.carousel-post-card.twitter-embed-card .post-embed-container {
  overflow: visible;
}

/* Loading spinner */
.carousel-post-card .embed-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary, #00a8ff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* @keyframes spin defined in loading-states.css */

/* Image/Video Embed */
.carousel-post-card .embed-image,
.carousel-post-card .embed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Embed Placeholder */
.carousel-post-card .embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

/* ============================================================================
   Twitter Embed Card
   ============================================================================ */

/* Twitter embed cards - transparent background like vertical timeline */
.carousel-post-card.twitter-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.twitter-embed-card .post-embed-container {
  align-items: flex-start;
  justify-content: flex-start;
}

/* Featured state: transparent container, embed stands on its own */
.carousel-post-card.twitter-embed-card.featured {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  height: auto !important;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.carousel-post-card.twitter-embed-card.featured .post-embed-container {
  height: auto;
  flex: 0 0 auto;
}

.carousel-post-card.twitter-embed-card.featured .tweet-container {
  height: auto;
}

.carousel-post-card.twitter-embed-card.featured .carousel-card-actions {
  position: relative;
  bottom: auto;
  margin-top: -20px;
}

.carousel-post-card.twitter-embed-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
  overflow: hidden;
}

/* Tweet container - overflow visible to prevent border clipping at corners */
.carousel-post-card .tweet-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  width: 100%;
  background: transparent !important;
  border-radius: 12px !important;
  overflow: visible !important;
}

.carousel-post-card .twitter-tweet {
  margin: 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-radius: 12px !important;
  overflow: visible !important;
  background: transparent !important;
}

.carousel-post-card .twitter-tweet iframe {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* Target the Twitter widget wrapper after it renders */
.carousel-post-card .twitter-tweet-rendered-true {
  border-radius: 12px !important;
  overflow: visible !important;
  background: transparent !important;
}

/* Remove any default box-shadow from Twitter that may show white corners */
.carousel-post-card .twitter-tweet,
.carousel-post-card .twitter-tweet-rendered-true,
.carousel-post-card .twitter-tweet iframe {
  box-shadow: none !important;
}

.twitter-fallback {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

/* ============================================================================
   YouTube Embed Card
   ============================================================================ */

.carousel-post-card.youtube-embed-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.youtube-embed-card.featured {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.carousel-post-card.youtube-embed-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

.youtube-embed-wrapper,
.youtube-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.youtube-embed-wrapper iframe,
.youtube-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* YouTube Loading States */
.youtube-responsive-wrapper.youtube-loading .youtube-thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.youtube-responsive-wrapper.youtube-loading .youtube-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
}

.youtube-responsive-wrapper.youtube-loading iframe {
  opacity: 0;
}

.youtube-responsive-wrapper:not(.youtube-loading) .youtube-thumbnail-placeholder,
.youtube-responsive-wrapper:not(.youtube-loading) .youtube-loading-overlay {
  display: none;
}

.youtube-responsive-wrapper:not(.youtube-loading) iframe {
  opacity: 1;
}

/* ============================================================================
   Data Table Embed
   ============================================================================ */

.data-table-embed {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  box-sizing: border-box;
}

.data-table-embed-wrapper {
  flex: 1;
  overflow: auto;
}

.data-table-embed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.data-table-embed-table th,
.data-table-embed-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table-embed-table th {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.data-table-embed-table td {
  color: rgba(255, 255, 255, 0.9);
}

.data-table-more-rows {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   Timeline Bar
   ============================================================================ */

.carousel-timeline-bar {
  position: relative;
  padding: 12px 2rem 0;
  width: 100%;
  box-sizing: border-box;
}

.carousel-timeline-track {
  position: relative;
  height: 2px;
  background: transparent;
  border-radius: 1px;
}

.carousel-timeline-glow {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 168, 255, 0.3) 20%,
    rgba(0, 168, 255, 0.5) 50%,
    rgba(0, 168, 255, 0.3) 80%,
    transparent 100%
  );
  transform: translateY(-50%);
  opacity: 0.6;
  filter: blur(1px);
  border-radius: 1px;
}

.carousel-timeline-ticks,
.timeline-bar-ticks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
}

/* Tick marks */
.timeline-bar-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  opacity: var(--tick-opacity, 1);
}

/* Extended hover area */
.timeline-bar-tick::before {
  content: '';
  position: absolute;
  top: -15px;
  left: -12px;
  right: -12px;
  bottom: -8px;
}

.timeline-bar-tick:hover {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
  height: 16px;
  opacity: 1;
}

.timeline-bar-tick.active {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.7);
  height: 18px;
  width: 3px;
  opacity: 1;
}

/* Date label on tick hover/active */
.timeline-bar-tick::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.65rem;
  color: white;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.timeline-bar-tick:hover::after,
.timeline-bar-tick.active::after {
  opacity: 1;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.timeline-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.timeline-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.timeline-empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.timeline-empty-state p {
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================================================
   Skeleton Loading Cards
   ============================================================================ */

.carousel-post-card.skeleton-card {
  background: var(--color-bg-card, #0d1b2a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.carousel-post-card.skeleton-card.featured {
  border-color: rgba(255, 255, 255, 0.15);
}

.carousel-post-card.skeleton-card:not(.featured) {
  opacity: 0.5;
  filter: brightness(0.7);
  transform: scale(0.9);
}

/* ============================================================================
   Mobile Responsive
   ============================================================================ */

@media (max-width: 768px) {
  .timeline-carousel {
    min-height: 240px;
    gap: 1rem;
    padding: 0.5rem calc(50vw - 150px) 0.75rem;
  }

  .carousel-post-card {
    --carousel-card-width: 180px;
    --carousel-card-height: 120px;
  }

  .carousel-card-topics {
    top: -28px;
  }

  .carousel-topic-pill {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
  }

  .carousel-card-actions {
    bottom: -36px;
    gap: 0.5rem;
  }

  .carousel-action-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
  }

  .carousel-timeline-bar {
    padding: 8px 1rem 0;
  }

  .timeline-bar-tick {
    height: 10px;
  }

  .timeline-bar-tick.active {
    height: 14px;
  }
}

@media (max-width: 480px) {
  .carousel-post-card {
    --carousel-card-width: 156px;
    --carousel-card-height: 108px;
  }

  .carousel-create-card .create-card-icon {
    width: 60px;
    height: 60px;
  }

  .carousel-create-card .create-card-icon svg {
    width: 32px;
    height: 32px;
  }

  .carousel-create-card .create-card-text {
    font-size: 0.85rem;
  }
}

/* ============================================================================
   Explore Page Responsive Overrides
   ============================================================================ */

@media (max-width: 1200px) {
  .explore-page .carousel-post-card {
    --carousel-card-width: 380px;
    --carousel-card-height: 240px;
  }

  .explore-page .timeline-carousel {
    padding-left: calc(50vw - 190px);
    padding-right: calc(50vw - 190px);
  }
}

@media (max-width: 768px) {
  .explore-page .carousel-post-card {
    --carousel-card-width: 85vw;
    --carousel-card-height: 220px;
  }

  .explore-page .timeline-carousel {
    padding-left: 7.5vw;
    padding-right: 7.5vw;
  }
}

@media (max-width: 480px) {
  .explore-page .carousel-post-card {
    --carousel-card-width: 90vw;
    --carousel-card-height: 200px;
  }

  .explore-page .timeline-carousel {
    padding-left: 5vw;
    padding-right: 5vw;
  }
}

/* Explore page tick marks - use data-date attribute for tooltip */
.explore-page .timeline-bar-tick {
  background: rgba(255, 255, 255, calc(0.3 * var(--tick-opacity, 1)));
}

.explore-page .timeline-bar-tick:hover {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
}

.explore-page .timeline-bar-tick.active {
  background: var(--color-primary, #00a8ff);
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.7);
}

/* Explore page tick tooltip - glassmorphism style */
.explore-page .timeline-bar-tick::after {
  content: attr(data-date);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================================================
   Temporal Divider Band
   Visual transition between hero content and timeline
   ============================================================================ */

.temporal-divider-band {
  position: relative;
  /* Break out of any container to span full viewport width */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Gradient fades IN smoothly from top, ends at dark color to connect with timeline */
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(0, 12, 24, 0.02) 15%,
    rgba(0, 15, 30, 0.04) 30%,
    rgba(0, 18, 36, 0.06) 50%,
    rgba(0, 20, 40, 0.08) 70%,
    rgba(0, 20, 40, 0.08) 100%
  );
  /* No hard edges */
  border: none;
  padding: 0;
  /* Eliminate any gap with timeline section below */
  margin-bottom: 0;
}

/* Top fade - blends with hero section above */
.temporal-divider-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  pointer-events: none;
}

.temporal-divider-fade-top {
  top: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 0%,
    transparent 100%
  );
}

.temporal-divider-fade-bottom {
  /* Hidden - we want the dark color to continue into timeline */
  display: none;
}

/* Content container - centered */
.temporal-divider-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 20px;
  z-index: 1;
}

/* Subtle glow line */
.temporal-divider-glow-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 168, 255, 0.15) 20%,
    rgba(0, 168, 255, 0.25) 50%,
    rgba(0, 168, 255, 0.15) 80%,
    transparent 100%
  );
  border-radius: 1px;
  /* Soft glow effect */
  box-shadow: 0 0 8px rgba(0, 168, 255, 0.1);
}

/* Text styling - muted, small caps feel */
.temporal-divider-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  /* Ensure readable but muted */
  user-select: none;
}

/* Clock icon - subtle */
.temporal-divider-icon {
  opacity: 0.5;
  flex-shrink: 0;
}

/* ============================================================================
   Temporal Divider - Responsive
   ============================================================================ */

@media (min-width: 1024px) {
  .temporal-divider-band {
    min-height: 100px;
  }

  .temporal-divider-content {
    padding: 32px 20px;
    gap: 16px;
  }

  .temporal-divider-glow-line {
    width: 160px;
  }

  .temporal-divider-text {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  .temporal-divider-band {
    min-height: 64px;
  }

  .temporal-divider-content {
    padding: 16px 16px;
    gap: 10px;
  }

  .temporal-divider-glow-line {
    width: 80px;
  }

  .temporal-divider-text {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }
}

/* ============================================================================
   Temporal Divider - Reduced Motion
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .temporal-divider-glow-line {
    box-shadow: none;
  }
}

/* ============================================================================
   Timeline Section Background
   Continues the darker background from temporal divider
   ============================================================================ */

.explore-page .explore-timeline-section {
  /* Match the darkest layer from temporal divider gradient */
  background: rgba(0, 20, 40, 0.08);
  /* Full viewport width like the divider */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* Ensure seamless connection with divider - no gap */
  margin-top: 0;
  padding-top: 0;
  /* Override entrance animation - background should always be visible */
  /* The content inside animates, not the section background */
  opacity: 1 !important;
  transform: none !important;
}

/* Move the entrance animation to the timeline content wrapper instead */
.explore-page .explore-timeline-section .timeline-carousel-wrapper {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.explore-page .explore-timeline-section.visible .timeline-carousel-wrapper {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   Temporal Divider Band - Bottom Variant
   Fades OUT from timeline back to normal background
   ============================================================================ */

.temporal-divider-band-bottom {
  /* Gradient fades OUT smoothly from dark color at top to transparent */
  background: linear-gradient(180deg,
    rgba(0, 20, 40, 0.08) 0%,
    rgba(0, 20, 40, 0.08) 30%,
    rgba(0, 18, 36, 0.06) 50%,
    rgba(0, 15, 30, 0.04) 70%,
    rgba(0, 12, 24, 0.02) 85%,
    transparent 100%
  );
  /* Shorter height for bottom variant */
  min-height: 60px;
  /* No gap with timeline above */
  margin-top: 0;
}

.temporal-divider-band-bottom .temporal-divider-content {
  /* Less padding for bottom variant - just the line */
  padding: 16px 20px;
}

@media (min-width: 1024px) {
  .temporal-divider-band-bottom {
    min-height: 80px;
  }

  .temporal-divider-band-bottom .temporal-divider-content {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .temporal-divider-band-bottom {
    min-height: 48px;
  }

  .temporal-divider-band-bottom .temporal-divider-content {
    padding: 12px 16px;
  }
}
