/* Hero Section - Based on Preview Design */

.hero-section {
  min-height: max(700px, 85vh);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--color-secondary-900);
}

/* Background image handling */
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Triangle overlay - top left, dark blue, spans full width */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 100vh 100vw 0 0;
  border-color: rgba(26, 45, 53, 0.7) transparent transparent transparent;
  z-index: 1;
  pointer-events: none;
}

/* Content container - split layout */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--container-padding);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

/* Left side - Text */
.hero-text {
  max-width: 600px;
  position: relative;
  z-index: 10;
}

/* Hero title */
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Hero subtitle */
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: #ffffff;
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-regular);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle .highlight {
  color: var(--color-primary-500);
  font-weight: var(--font-weight-bold);
}

/* Hero actions */
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Right side - 3D Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  z-index: 5;
}

.hero-carousel .carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
}

.hero-carousel .carousel-card {
  position: absolute;
  width: 350px;
  height: 450px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.hero-carousel .carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Position cards in 3D space */
.hero-carousel .carousel-card[data-index="0"] {
  transform: translate(-50%, -50%) translateZ(0px) scale(1);
  z-index: 3;
  opacity: 1;
}

.hero-carousel .carousel-card[data-index="1"] {
  transform: translate(10%, -50%) translateZ(-150px) translateX(100px) scale(0.85);
  z-index: 2;
  opacity: 0.8;
}

.hero-carousel .carousel-card[data-index="2"] {
  transform: translate(-110%, -50%) translateZ(-150px) translateX(-100px) scale(0.85);
  z-index: 2;
  opacity: 0.8;
}

.hero-carousel .carousel-card[data-index="3"] {
  transform: translate(20%, -50%) translateZ(-300px) translateX(200px) scale(0.7);
  z-index: 1;
  opacity: 0.5;
}

.hero-carousel .carousel-card[data-index="4"] {
  transform: translate(-120%, -50%) translateZ(-300px) translateX(-200px) scale(0.7);
  z-index: 1;
  opacity: 0.5;
}

/* Hover effect */
.hero-carousel .carousel-card:hover {
  transform: translate(-50%, -50%) translateZ(20px) scale(1.05) !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  z-index: 10 !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .hero-text {
    text-align: center;
    max-width: 100%;
  }
  
  .hero-carousel {
    height: 400px;
  }
  
  .hero-carousel .carousel-card {
    width: 280px;
    height: 360px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: max(600px, 70vh);
  }
  
  .hero-content {
    padding: var(--space-lg) var(--container-padding);
  }
  
  /* Keep triangle on top-left for mobile */
  .hero-overlay {
    border-width: 80vh 100vw 0 0;
  }
  
  .hero-carousel {
    height: 350px;
  }
  
  .hero-carousel .carousel-card {
    width: 240px;
    height: 300px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 500px;
  }
  
  /* Keep triangle on top-left for mobile */
  .hero-overlay {
    border-width: 70vh 100vw 0 0;
  }
  
  .hero-carousel {
    height: 300px;
  }
  
  .hero-carousel .carousel-card {
    width: 200px;
    height: 260px;
  }
}

/* Animation on load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title,
.hero-subtitle,
.hero-actions {
  animation: fadeInUp var(--transition-slow) var(--ease-out) backwards;
}

.hero-subtitle {
  animation-delay: 150ms;
}

.hero-actions {
  animation-delay: 300ms;
}

.hero-carousel .carousel-card {
  animation: fadeInUp var(--transition-slow) var(--ease-out) backwards;
}

.hero-carousel .carousel-card[data-index="0"] {
  animation-delay: 400ms;
}

.hero-carousel .carousel-card[data-index="1"] {
  animation-delay: 500ms;
}

.hero-carousel .carousel-card[data-index="2"] {
  animation-delay: 600ms;
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-carousel .carousel-card {
    animation: none;
  }
}
