/**
 * Hero Section Component
 * Full-width hero with background image and overlay
 */

/* Parallax Configuration Variables */
:root {
  --hero-parallax-offset: 15%;
  --hero-parallax-scale: 1.30;
}

/* Full-width breakout from container */
.hero-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.hero-carousel-wrapper {
  width: 100%;
  padding: 0 !important;
  margin-bottom: 0;
}

.hero-section {
  position: relative;
  height: 600px;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: transparent;
  clip-path: inset(0);
}

.hero-background {
  position: absolute;
  top: -35%;
  left: 0;
  right: 0;
  bottom: -35%;
  width: 100%;
  height: 170%;
  z-index: 1;
  overflow: hidden;
  will-change: transform;
}

.hero-background .field,
.hero-background .media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-background img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-white);
  padding: var(--space-4xl) 0;
  width: 100%;
}

.hero-content .container .row .col-lg-10 {
  background: radial-gradient(ellipse at center, rgba(0, 30, 60, 0.4) 0%, rgba(0, 30, 60, 0.2) 60%, transparent 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 2.5rem 3rem;
  border-radius: 8px;
  opacity: 0;
  animation: heroBoxFadeIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

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

/* Hero Headline Styles - Kunco Style */
.hero-headline,
.hero-content h1 {
  font-family: var(--font-family-heading);
  font-size: 2.25rem !important;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.3px;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

/* Hero Subline Styles - Kunco Style */
.hero-subline,
.hero-content p {
  font-family: var(--font-family-base);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 650px;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

/* Hero Actions/Buttons - Kunco Style */
.hero-actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
}

/* Animationen nur für aktive Carousel-Items */
.carousel-item.active .hero-headline,
.carousel-item.active .hero-content h1 {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.carousel-item.active .hero-subline,
.carousel-item.active .hero-content p {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.35s forwards;
}

.carousel-item.active .hero-actions {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

/* Ensure Hero buttons/links have button styling */
.hero-actions .btn,
.hero-actions a {
  /* Links without .btn class need basic button appearance */
}

/* If link doesn't have .btn class, make it look like a button */
.hero-actions a:not(.btn) {
  display: inline-block;
  padding: 14px 40px;
  font-family: var(--font-family-heading);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 2px solid transparent;
  background-color: var(--color-primary);
  color: var(--color-white);
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-actions a:not(.btn):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 93, 146, 0.4);
  background-color: var(--color-primary-dark);
  text-decoration: none;
}

/* Bootstrap Carousel Integration */
.hero-carousel {
  width: 100%;
}

.hero-carousel .carousel-item {
  height: 600px;
  width: 100%;
  background-color: transparent;
  position: relative;
  overflow: hidden;
}

.hero-carousel .carousel-indicators {
  bottom: var(--space-2xl);
  z-index: 4;
}

.hero-carousel .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid transparent;
  transition: all var(--transition-base);
}

.hero-carousel .carousel-indicators button.active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  opacity: 0;
  transition: all var(--transition-base);
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
  opacity: 1;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background-color: var(--color-primary);
}

.hero-carousel .carousel-control-prev {
  left: var(--space-2xl);
}

.hero-carousel .carousel-control-next {
  right: var(--space-2xl);
}

/* Hero Variants */
.hero-section.hero-small {
  min-height: 400px;
}

.hero-section.hero-large {
  min-height: 800px;
}

/* Responsive - Kunco Style */
@media (min-width: 768px) {
  .hero-headline,
  .hero-content h1 {
    font-size: 3.25rem !important;
    line-height: 1.1;
  }
  
  .hero-subline,
  .hero-content p {
    font-size: 1.1875rem;
  }
}

@media (min-width: 1200px) {
  .hero-headline,
  .hero-content h1 {
    font-size: 4rem !important;
    line-height: 1.08;
    letter-spacing: -0.8px;
  }
  
  .hero-subline,
  .hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
  }
}

@media (max-width: 992px) {
  .hero-section,
  .hero-carousel .carousel-item {
    height: 500px;
  }
  
  .hero-headline,
  .hero-content h1 {
    font-size: 3.5rem;
  }
  
  .hero-carousel .carousel-control-prev {
    left: var(--space-lg);
  }
  
  .hero-carousel .carousel-control-next {
    right: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .hero-section,
  .hero-carousel .carousel-item {
    height: 450px;
  }
  
  .hero-content {
    padding: 4rem 0;
  }
  
  .hero-headline,
  .hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
  }
  
  .hero-subline,
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 0.875rem;
  }
  
  .hero-actions .btn,
  .hero-actions a {
    width: 100%;
    text-align: center;
  }
  
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    width: 45px;
    height: 45px;
  }
  
  .hero-carousel .carousel-control-prev {
    left: var(--space-md);
  }
  
  .hero-carousel .carousel-control-next {
    right: var(--space-md);
  }
}

@media (max-width: 576px) {
  .hero-section,
  .hero-carousel .carousel-item {
    height: 400px;
  }
  
  .hero-headline,
  .hero-content h1 {
    font-size: 2rem;
    letter-spacing: -0.3px;
  }
  
  .hero-subline,
  .hero-content p {
    font-size: 0.9375rem;
  }
}

/* Animations - Optimiert für Performance */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .hero-headline,
  .hero-content h1,
  .hero-subline,
  .hero-content p,
  .hero-actions {
    animation: none;
    opacity: 1;
    transform: none;
    will-change: auto;
  }
  
  .hero-background {
    will-change: auto;
    transform: none !important;
  }
}

.hero-headline {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero-subline {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
}