/* ============================================
   NARRATIVES LIST PAGE - STYLES
   Design modern pentru listarea poveștilor
   ============================================ */

/* ===== VARIABLES ===== */
:root {
  --story-primary: #6366f1;
  --story-secondary: #8b5cf6;
  --story-accent: #ec4899;
  --story-water: #0ea5e9;
  --story-light: #f59e0b;
  --story-bg: #0f172a;
  --story-card-bg: #1e293b;
  --story-text: #f1f5f9;
  --story-text-dim: #94a3b8;
  --story-border: rgba(148, 163, 184, 0.1);
}

/* ===== RESET & BASE ===== */
.stories-page {
  min-height: 100vh;
  background: var(--story-bg);
  color: var(--story-text);
  position: relative;
  overflow-x: hidden;
}

/* ===== AMBIENT BACKGROUND ===== */
.stories-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.stories-ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

.stories-ambient-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--story-primary);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.stories-ambient-glow-2 {
  width: 800px;
  height: 800px;
  background: var(--story-secondary);
  top: 30%;
  right: -200px;
  animation-delay: 7s;
}

.stories-ambient-glow-3 {
  width: 500px;
  height: 500px;
  background: var(--story-accent);
  bottom: -100px;
  left: 20%;
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ===== HERO SECTION ===== */
.stories-hero {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.stories-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.stories-hero-icon {
  font-size: 4rem;
  color: var(--story-primary);
  margin-bottom: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.stories-hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--story-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stories-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--story-primary);
}

.stories-hero-divider span {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--story-primary) 50%, transparent 100%);
}

.stories-hero-divider i {
  font-size: 1.5rem;
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stories-hero-subtitle {
  font-size: 1.25rem;
  color: var(--story-text-dim);
  margin-bottom: 2rem;
}

.stories-hero-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--story-text-dim);
}

.stories-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.stories-feature i {
  color: var(--story-primary);
}

.stories-feature-dot {
  opacity: 0.5;
}

/* ===== MAIN CONTAINER ===== */
.stories-main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ===== SERIES SECTION ===== */
.stories-series {
  margin-bottom: 6rem;
}

.stories-series-header {
  margin-bottom: 3rem;
  text-align: center;
}

.stories-series-label {
  display: inline-flex;
  margin-bottom: 1rem;
}

.stories-series-tag {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: var(--story-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stories-series-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--story-text);
}

/* ===== TIMELINE ===== */
.stories-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.stories-timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--story-card-bg);
  border: 2px solid var(--story-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--story-text-dim);
  transition: all 0.3s ease;
}

.stories-timeline-dot.active {
  background: var(--dot-color, var(--story-primary));
  border-color: var(--dot-color, var(--story-primary));
  color: white;
  box-shadow: 0 0 20px var(--dot-color, var(--story-primary));
}

.stories-timeline-line {
  width: 60px;
  height: 2px;
  background: var(--story-border);
}

/* ===== STORIES GRID ===== */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* ===== STORY CARD ===== */
/* ===== STORY CARD ===== */
.story-card {
  position: relative;
  background: var(--story-card-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--story-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1 !important; /* ← AICI E FIX-UL */
  transform: translateY(0) !important; /* ← AICI E FIX-UL */
}

.story-card:hover {
  transform: translateY(-8px);
  border-color: var(--story-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 40px var(--story-color);
}


.story-card.is-coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.story-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ===== CARD IMAGE ===== */
.story-card-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--story-primary) 0%, var(--story-secondary) 100%);
}

.story-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.is-active:hover .story-card-image img {
  transform: scale(1.1);
}

.story-card-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.9) 100%);
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.story-card.is-active:hover .story-card-image-overlay {
  opacity: 0.3;
}

/* ===== PLAY ICON ===== */
.story-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  opacity: 0;
  transition: all 0.4s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.story-card.is-active:hover .story-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* ===== FINALE GLOW ===== */
.story-card-finale-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
  animation: finalePulse 3s ease-in-out infinite;
}

@keyframes finalePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ===== CARD CONTENT ===== */
.story-card-content {
  padding: 2rem;
}

/* ===== TOP ROW ===== */
.story-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.story-card-part {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  color: var(--story-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 1rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-card-badge-new {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.story-card-badge-finale {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.story-card-badge-soon {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--story-text-dim);
}

/* ===== TITLE & DESC ===== */
.story-card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--story-text);
  line-height: 1.3;
}

.story-card-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--story-text-dim);
  margin-bottom: 1.5rem;
}

/* ===== FEATURES ===== */
.story-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.story-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--story-text-dim);
}

/* ===== META ===== */
.story-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--story-border);
}

.story-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--story-text-dim);
}

.story-card-meta-item i {
  color: var(--story-primary);
}

/* ===== CTA BUTTON ===== */
.story-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--story-color);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.story-card.is-active:hover .story-card-cta {
  background: color-mix(in srgb, var(--story-color) 90%, white);
  transform: translateX(4px);
}

.story-card-cta i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.story-card.is-active:hover .story-card-cta i {
  transform: translateX(4px);
}

.story-card-cta-disabled {
  background: rgba(148, 163, 184, 0.1);
  color: var(--story-text-dim);
  cursor: not-allowed;
}

/* ===== ACCENT LINE ===== */
.story-card-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--story-color) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.story-card.is-active:hover .story-card-accent {
  opacity: 1;
}

/* ===== EMPTY STATE ===== */
.stories-empty {
  text-align: center;
  padding: 6rem 2rem;
}

.stories-empty-icon {
  font-size: 4rem;
  color: var(--story-text-dim);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.stories-empty-text {
  font-size: 1.25rem;
  color: var(--story-text-dim);
}

/* ===== FOOTER ===== */
.stories-footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--story-text-dim);
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ===== RIPPLE EFFECT ===== */
.story-card-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(50);
    opacity: 0;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .stories-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .stories-hero-title {
    font-size: 2.5rem;
  }

  .stories-hero-subtitle {
    font-size: 1rem;
  }

  .stories-main {
    padding: 0 1.5rem 3rem;
  }

  .stories-series-title {
    font-size: 2rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .story-card-title {
    font-size: 1.5rem;
  }

  .stories-timeline {
    gap: 0.5rem;
  }

  .stories-timeline-dot {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }

  .stories-timeline-line {
    width: 30px;
  }
}

@media (max-width: 480px) {
  .stories-hero-title {
    font-size: 2rem;
  }

  .story-card-content {
    padding: 1.5rem;
  }

  .story-card-title {
    font-size: 1.375rem;
  }

  .story-card-desc {
    font-size: 0.9375rem;
  }
}
