/* ========================================
   CINEMANTIC - ENHANCED STYLESHEET v2.0
   Moderne, Minimaliste, Fluide & Performant
   ======================================== */

:root {
  /* Colors */
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --primary-light: #ef4444;
  --bg-dark: #09090b;
  --bg-darker: #000000;
  --surface: #18181b;
  --surface-light: #27272a;
  --text-primary: #ffffff;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1a6;
  --border: #3f3f46;
  --accent: #06b6d4;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.2, 0, 0.38, 0.9);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-red: 0 20px 25px -5px rgba(220, 38, 38, 0.2);
}

/* ========== RESET & BASE STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  letter-spacing: -0.5px;
}

/* ========== KEYFRAME ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.8), 0 0 60px rgba(220, 38, 38, 0.4);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes glow {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========== ANIMATION UTILITY CLASSES ========== */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-scaleIn {
  animation: scaleIn 0.4s ease-out;
}

/* ========== HERO SLIDER SECTION ========== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  background-color: var(--bg-darker);
  perspective: 1000px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  transition: all var(--transition-slow);
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 10;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.hero-slide.active .hero-image {
  animation: zoomIn 8s ease-out forwards;
}

/* Gradient overlays */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.overlay-gradient-vertical {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(9, 9, 11, 0.4) 50%,
    rgba(9, 9, 11, 0.95) 100%
  );
}

.overlay-gradient-horizontal {
  background: linear-gradient(
    90deg,
    rgba(9, 9, 11, 0.95) 0%,
    rgba(9, 9, 11, 0.6) 40%,
    transparent 100%
  );
}

.overlay-vignette {
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(0, 0, 0, 0.6) 100%
  );
  opacity: 0.7;
}

.overlay-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 384px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-light) 50%,
    transparent 100%
  );
  animation: glow 2s ease-in-out infinite;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 2rem 1.5rem;
  max-width: 1920px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .hero-content {
    padding: 2rem 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 2rem 4rem;
  }
}

.hero-text-group {
  max-width: 48rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ========== HERO TAGS ========== */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  animation: slideInRight 0.8s ease-out 0.15s both;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.tag.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary-light);
  color: white;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.tag:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.tag.primary:hover {
  box-shadow: 0 0 30px rgba(220, 38, 38, 0.6);
  transform: scale(1.05);
}

.tag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  animation: glow 2s ease-in-out infinite;
}

/* ========== HERO TITLE ========== */
.hero-title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-title-accent {
  display: block;
  height: 4px;
  width: 6rem;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
  border-radius: 2px;
  margin-top: 1rem;
  animation: slideInRight 0.8s ease-out 0.3s both;
}

/* ========== HERO META ========== */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  animation: fadeInUp 0.8s ease-out 0.25s both;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.meta-item:hover {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.1);
  transform: translateY(-2px);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

/* ========== HERO DESCRIPTION ========== */
.hero-description {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 42rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ========== HERO BUTTONS ========== */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease-out 0.35s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left var(--transition-base);
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: white;
  color: var(--bg-dark);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 35px -5px rgba(220, 38, 38, 0.4);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: 2px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.btn-secondary:active {
  transform: scale(0.95);
}

.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--transition-base);
}

.btn:hover svg {
  transform: translateX(2px);
}

/* ========== HERO INDICATORS (DOTS) ========== */
.hero-indicators {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.indicator {
  width: 0.5rem;
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.indicator.active {
  width: 2.5rem;
  background: var(--primary);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
}

.indicator:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.7);
}

.indicator.active:hover {
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.8);
}

/* ========== CAROUSELS ========== */
.content-carousel {
  position: relative;
  z-index: 20;
  margin-top: -8rem;
  padding-bottom: 6rem;
  background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 30%);
}

@media (min-width: 640px) {
  .content-carousel {
    margin-top: -10rem;
  }
}

@media (min-width: 1024px) {
  .content-carousel {
    margin-top: -12rem;
  }
}

.carousel-row {
  position: relative;
  margin-bottom: 4rem;
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
  animation: fadeInUp 0.8s ease-out;
}

@media (min-width: 640px) {
  .carousel-header {
    padding: 0 3rem;
  }
}

@media (min-width: 1024px) {
  .carousel-header {
    padding: 0 4rem;
  }
}

.carousel-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.carousel-title-emoji {
  font-size: 1.5em;
  animation: floatUp 3s ease-in-out infinite;
}

.carousel-controls {
  display: flex;
  gap: 0.5rem;
}

.carousel-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--primary);
}

@media (min-width: 640px) {
  .carousel-btn {
    display: flex;
  }
}

.carousel-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-content {
  overflow: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-items {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (min-width: 640px) {
  .carousel-items {
    padding: 0 3rem;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .carousel-items {
    padding: 0 4rem;
  }
}

.carousel-items::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 auto;
  width: 150px;
  aspect-ratio: 9 / 16;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: all var(--transition-base);
  cursor: pointer;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

@media (min-width: 640px) {
  .carousel-item {
    width: 180px;
  }
}

@media (min-width: 1024px) {
  .carousel-item {
    width: 200px;
  }
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.carousel-item:hover img {
  transform: scale(1.08);
}

.carousel-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  z-index: 10;
}

.carousel-item:hover .carousel-item-overlay {
  opacity: 1;
}

.carousel-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.carousel-item-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.carousel-item-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.7rem;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 6rem 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.empty-state-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-state-link {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-red);
}

.empty-state-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px rgba(220, 38, 38, 0.3);
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-dark: #09090b;
    --text-primary: #ffffff;
    --text-secondary: #d4d4d8;
  }
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 500px;
    max-height: 700px;
  }

  @keyframes zoomIn {
    from {
      transform: scale(1);
    }
    to {
      transform: scale(1.05);
    }
  }

  .hero-content {
    padding-bottom: 4rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .carousel-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .hero-tags {
    gap: 0.5rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: 0.375rem 0.625rem;
  }

  .carousel-item {
    width: 120px;
  }

  .hero-indicators {
    bottom: 2rem;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }

  .indicator.active {
    width: 2rem;
  }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.hero-image,
.carousel-item img {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.hero-slide,
.carousel-item,
.btn {
  will-change: opacity, transform;
}

/* Loading state */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-light) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}