/* === HERO SECTION STYLES - FIXED & OPTIMIZED === */

#hero-section {
  position: relative;
  z-index: 3;
  min-height: var(--hero-height, 100vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--hero-header-offset, 60px);
  padding: 0 !important;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* HERO GLASSMORPHISM */
  background: var(--hero-bg-overlay, rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(var(--hero-bg-blur, 15px));
}

.hero-container {
  position: relative;
  width: 100vw;
  height: calc(var(--hero-height, 100vh) - var(--hero-header-offset, 60px));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* === SLIDESHOW SYSTEM === */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(100%) scale(0.8);
  transition: all var(--hero-transition-ultra, var(--transition-ultra, 0.8s ease-in-out));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  z-index: 5;
}

.hero-slide.prev {
  opacity: 0.3;
  transform: translateX(-100%) scale(0.8);
  z-index: 3;
}

.hero-slide.next {
  opacity: 0.3;
  transform: translateX(100%) scale(0.8);
  z-index: 3;
}

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay-base, 
    linear-gradient(45deg, rgba(0, 0, 0, 0.7) 0%, transparent 30%),
    linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, transparent 40%),
    linear-gradient(225deg, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.4) 80%)
  );
  z-index: 1;
  transition: all var(--hero-transition-smooth, var(--transition-smooth, 0.3s ease));
}

.hero-slide.active::before {
  background: var(--hero-overlay-active, 
    linear-gradient(45deg, rgba(0, 0, 0, 0.5) 0%, transparent 30%),
    linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, transparent 40%),
    linear-gradient(225deg, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.3) 80%)
  );
}

.hero-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.3) saturate(1.2);
  transition: all var(--hero-transition-ultra, var(--transition-ultra, 0.8s ease));
  z-index: 0;
  will-change: transform, filter;
  backface-visibility: hidden;
}

.hero-slide.active img {
  filter: brightness(0.8) contrast(1.4) saturate(1.3);
  transform: scale(1.05);
}

/* === HERO CONTENT === */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: var(--hero-content-max-width, 700px);
  padding: 1rem;
  animation: contentSlideIn 1s ease-out 0.3s both;
}

@keyframes contentSlideIn {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-content h1 {
  font-family: var(--font-heading, 'Bebas Neue', 'Orbitron', sans-serif);
  font-size: clamp(var(--hero-title-size-min, 2.5rem), 7vw, var(--hero-title-size-max, 6rem));
  font-weight: 900;
  margin-bottom: 1rem;
  background: var(--hero-title-gradient, linear-gradient(135deg, var(--accent-gold), var(--accent-electric), var(--accent-red)));
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  letter-spacing: -0.02em;
  line-height: 0.9;
  position: relative;
  animation: gradientShift 4s ease-in-out infinite;
  text-transform: uppercase;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-content h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--hero-title-gradient, linear-gradient(90deg, var(--accent-gold), var(--accent-electric), var(--accent-red)));
  border-radius: 2px;
  box-shadow: var(--glow-gold);
  animation: lineGlow 2s ease-in-out infinite alternate;
}

@keyframes lineGlow {
  0% { box-shadow: var(--glow-gold); }
  100% { box-shadow: var(--glow-neon); }
}

.hero-content h2 {
  font-size: clamp(var(--hero-subtitle-size-min, 1rem), 2.5vw, var(--hero-subtitle-size-max, 1.5rem));
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.4;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: subtitleFade 1s ease-out 0.6s both;
}

@keyframes subtitleFade {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--primary-dark);
  background: var(--hero-btn-gradient, linear-gradient(135deg, var(--accent-gold), #f4d03f));
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  transition: all var(--hero-transition-smooth, var(--transition-smooth));
  text-transform: uppercase;
  letter-spacing: 1.2px;
  box-shadow: var(--hero-btn-shadow, var(--glow-gold), 0 8px 25px rgba(212, 175, 55, 0.3));
  opacity: 0;
  animation: buttonSlide 1s ease-out 0.9s both;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes buttonSlide {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.8s;
}

.hero-cta-btn:hover::before {
  left: 100%;
}

.hero-cta-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--hero-btn-hover-shadow, var(--glow-gold), 0 15px 35px rgba(212, 175, 55, 0.4));
  background: var(--hero-btn-hover-gradient, linear-gradient(135deg, #f4d03f, var(--accent-electric)));
}

.hero-cta-btn::after {
  content: '→';
  font-size: 1.1rem;
  transition: transform var(--hero-transition-smooth, var(--transition-smooth));
}

.hero-cta-btn:hover::after {
  transform: translateX(3px);
}

/* === NAVIGATION CONTROLS === */
.hero-nav {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 20;
}

.hero-dot {
  width: var(--hero-dot-size, 12px);
  height: var(--hero-dot-size, 12px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid var(--accent-gold);
  cursor: pointer;
  transition: all var(--hero-transition-smooth, var(--transition-smooth));
  position: relative;
  overflow: hidden;
}

.hero-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--accent-gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all var(--hero-transition-smooth, var(--transition-smooth));
}

.hero-dot.active {
  background: var(--accent-gold);
  box-shadow: var(--glow-gold);
  transform: scale(1.2);
}

.hero-dot.active::before {
  width: 100%;
  height: 100%;
}

.hero-dot:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

/* === ARROW CONTROLS === */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--hero-arrow-size, 45px);
  height: var(--hero-arrow-size, 45px);
  background: var(--glass-white);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--hero-transition-smooth, var(--transition-smooth));
  z-index: 20;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: bold;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-arrow:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: var(--glow-gold);
  transform: translateY(-50%) scale(1.08);
  color: var(--primary-dark);
}

.hero-arrow.prev {
  left: 25px;
}

.hero-arrow.next {
  right: 25px;
}

/* === PROGRESS BAR === */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--hero-progress-height, 3px);
  background: rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.hero-progress-bar {
  height: 100%;
  background: var(--hero-progress-gradient, linear-gradient(90deg, var(--accent-gold), var(--accent-electric)));
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: var(--hero-progress-glow, 0 0 12px rgba(212, 175, 55, 0.7));
  will-change: width;
}

/* === LOADING STATE === */
.hero-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 30;
  color: var(--text-primary);
}

.loading-text {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.loading-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: loadingBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingBounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  /* Hero Mobile - Full Width FIXED */
  #hero-section {
    margin-top: var(--hero-header-offset, 60px);
    margin-left: 0;
    width: 100vw;
    overflow: hidden;
  }
  
  .hero-container {
    height: calc(var(--hero-height, 100vh) - var(--hero-header-offset, 60px));
    width: 100vw;
    overflow: hidden;
  }
  
  .hero-content {
    padding: var(--hero-mobile-padding, 0.8rem);
    max-width: 95%;
  }
  
  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 0.8rem;
  }
  
  .hero-content h2 {
    font-size: clamp(0.9rem, 3vw, 1.3rem);
    margin-bottom: 1.5rem;
  }
  
  .hero-cta-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 1px;
  }
  
  .hero-arrow {
    width: var(--hero-mobile-arrow-size, 38px);
    height: var(--hero-mobile-arrow-size, 38px);
    font-size: 1.1rem;
  }
  
  .hero-arrow.prev { left: 12px; }
  .hero-arrow.next { right: 12px; }
  
  .hero-nav {
    bottom: 18px;
    gap: 10px;
  }
  
  .hero-dot {
    width: var(--hero-mobile-dot-size, 10px);
    height: var(--hero-mobile-dot-size, 10px);
    border-width: 2px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: clamp(1.6rem, 7vw, 2.8rem);
  }
  
  .hero-arrow {
    width: var(--hero-mobile-arrow-size-small, 32px);
    height: var(--hero-mobile-arrow-size-small, 32px);
    font-size: 1rem;
  }
  
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
}

/* === ACCESSIBILITY === */
/* High contrast mode */
@media (prefers-contrast: high) {
  .hero-arrow,
  .hero-dot {
    border-width: 3px;
    background: rgba(255, 255, 255, 0.3);
  }
  
  .hero-content h1 {
    color: var(--accent-electric);
    font-weight: 700;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-content,
  .hero-cta-btn,
  .hero-arrow,
  .hero-dot {
    transition: none !important;
    animation: none !important;
  }
  
  .hero-content h1 {
    animation: none !important;
  }
  
  .hero-progress-bar {
    transition: none !important;
  }
}

/* === ERROR STATE === */
.hero-slide img[src*="data:image/svg"] {
  filter: none !important;
  opacity: 0.6;
}

/* === FOCUS STYLES === */
.hero-arrow:focus,
.hero-dot:focus,
.hero-cta-btn:focus {
  outline: 2px solid var(--accent-electric);
  outline-offset: 2px;
}

/* === PERFORMANCE OPTIMIZATIONS === */
.hero-slide img {
  will-change: transform, filter;
  backface-visibility: hidden;
}

.hero-content,
.hero-arrow,
.hero-dot {
  will-change: transform;
  backface-visibility: hidden;
}