/* =============================================
   HUBERT Premium Animations & Visual Upgrades
   ============================================= */

/* === CSS Variables für Animationen === */
:root {
  --anim-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --anim-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --anim-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --anim-duration-fast: 0.3s;
  --anim-duration-normal: 0.5s;
  --anim-duration-slow: 0.8s;
}

/* === Parallax Hero Banner === */
.top-banner {
  position: relative;
  overflow: hidden;
}

.top-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-attachment: fixed;
  will-change: transform;
}

@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .top-banner::before {
    background-attachment: scroll !important;
    transform: none !important;
    will-change: auto;
  }
}

.parallax-hero {
  transform: translateZ(0);
  will-change: transform;
}

/* === Gestaffelte Hero-Animationen === */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Hero Content Animation */
body.is-loaded .main-hero-content h1 {
  animation: fadeSlideUp 0.8s var(--anim-ease) forwards;
  animation-delay: 0.1s;
}

body.is-loaded .main-hero-content .subline {
  animation: fadeSlideUp 0.8s var(--anim-ease) forwards;
  animation-delay: 0.25s;
}

body.is-loaded .main-hero-content .btn-flex {
  animation: fadeSlideUp 0.8s var(--anim-ease) forwards;
  animation-delay: 0.4s;
}

/* === Section Reveal Animationen === */
.section-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--anim-ease), transform 0.7s var(--anim-ease);
}

.section-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Card Hover Animationen (verbessert) === */
.card-white,
.icon-card,
.card {
  transition: 
    transform 0.4s var(--anim-bounce),
    box-shadow 0.4s var(--anim-ease),
    border-color 0.3s ease;
}

.card-white:hover,
.icon-card:hover,
.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(176, 141, 87, 0.15);
}

/* Icon Animation in Cards */
.icon-card .icon,
.card-white .icon {
  transition: transform 0.4s var(--anim-bounce), color 0.3s ease;
}

.icon-card:hover .icon,
.card-white:hover .icon {
  transform: scale(1.15) rotate(-5deg);
}

/* === Button Hover Animationen === */
.btn-gold,
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: 
    transform 0.3s var(--anim-bounce),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.btn-gold::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-gold:hover::before,
.btn-primary:hover::before {
  left: 100%;
}

.btn-gold:hover,
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(176, 141, 87, 0.4);
}

.btn-gold:active,
.btn-primary:active {
  transform: translateY(-1px) scale(1.01);
}

.btn-white,
.btn-secondary {
  transition: 
    transform 0.3s var(--anim-bounce),
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-white:hover,
.btn-secondary:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 10px 25px rgba(176, 141, 87, 0.15);
}

/* === Gestaffelte Grid Animationen === */
.grid-5 .icon-card,
.grid-4 .card-white,
.grid-3 .card {
  opacity: 0;
  transform: translateY(30px);
}

.grid-5 .icon-card.is-visible,
.grid-4 .card-white.is-visible,
.grid-3 .card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.grid-5 .icon-card:nth-child(1) { transition-delay: 0.05s; }
.grid-5 .icon-card:nth-child(2) { transition-delay: 0.1s; }
.grid-5 .icon-card:nth-child(3) { transition-delay: 0.15s; }
.grid-5 .icon-card:nth-child(4) { transition-delay: 0.2s; }
.grid-5 .icon-card:nth-child(5) { transition-delay: 0.25s; }

.grid-4 .card-white:nth-child(1) { transition-delay: 0.05s; }
.grid-4 .card-white:nth-child(2) { transition-delay: 0.12s; }
.grid-4 .card-white:nth-child(3) { transition-delay: 0.19s; }
.grid-4 .card-white:nth-child(4) { transition-delay: 0.26s; }

/* === Galerie Hover Effekte === */
.gallery-item {
  transition: 
    transform 0.4s var(--anim-ease),
    box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  transition: transform 0.6s var(--anim-ease), filter 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05) saturate(1.1);
}

/* === Goldene Akzent-Divider (animiert) === */
.gold-divider {
  position: relative;
  overflow: hidden;
}

.gold-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: shimmer 3s infinite;
}

/* === Section Title Animation === */
.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--anim-ease), transform 0.6s var(--anim-ease);
}

.section-title.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title h2 {
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.5s var(--anim-bounce) 0.3s;
}

.section-title.is-visible h2::after {
  transform: translateX(-50%) scaleX(1);
}

/* === Sticky Buttons Animation === */
.sticky-buttons {
  transition: transform 0.3s var(--anim-ease), opacity 0.3s ease;
}

.sticky-btn {
  transition: 
    transform 0.3s var(--anim-bounce),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.sticky-btn:hover {
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.sticky-btn:active {
  transform: scale(1.05);
}

/* Pulse Animation für Sticky Buttons */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(176, 141, 87, 0.3);
  }
  50% {
    box-shadow: 0 10px 35px rgba(176, 141, 87, 0.5), 0 0 0 8px rgba(176, 141, 87, 0.1);
  }
}

.sticky-btn.call {
  animation: pulse 2.5s infinite;
}

/* === Footer Animation === */
.footer-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--anim-ease), transform 0.5s var(--anim-ease);
}

.footer-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.footer-section:nth-child(1) { transition-delay: 0.1s; }
.footer-section:nth-child(2) { transition-delay: 0.2s; }
.footer-section:nth-child(3) { transition-delay: 0.3s; }

/* === Nav Link Hover Effect === */
.nav-menu a {
  position: relative;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--anim-ease);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* === CTA Strip Animation === */
.cta-strip {
  position: relative;
  overflow: hidden;
}

.cta-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(176, 141, 87, 0.05) 25%,
    rgba(176, 141, 87, 0.08) 50%,
    rgba(176, 141, 87, 0.05) 75%,
    transparent 100%
  );
  animation: ctaSweep 8s linear infinite;
}

@keyframes ctaSweep {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(50%); }
}

/* === Leistung Card Animation === */
.leistung {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s var(--anim-ease), transform 0.7s var(--anim-ease);
}

.leistung.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.leistung:nth-child(even) {
  transform: translateX(30px);
}

.leistung:nth-child(even).is-visible {
  transform: translateX(0);
}

.leistung .media img {
  transition: transform 0.6s var(--anim-ease);
}

.leistung:hover .media img {
  transform: scale(1.03);
}

/* === Form Input Focus Animation === */
input, textarea, select {
  transition: 
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(176, 141, 87, 0.15);
}

/* === Trust Pills Animation === */
.trust-pill {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--anim-ease), transform 0.4s var(--anim-ease);
}

.trust-row.is-visible .trust-pill:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.trust-row.is-visible .trust-pill:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.trust-row.is-visible .trust-pill:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.trust-row.is-visible .trust-pill:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* === FAQ Animation === */
.faq-item {
  transition: transform 0.3s var(--anim-ease), box-shadow 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.faq-item summary {
  transition: color 0.3s ease;
}

.faq-item[open] summary {
  color: var(--gold);
}

.faq-answer {
  animation: faqExpand 0.3s var(--anim-ease);
}

@keyframes faqExpand {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Scroll Indicator (optional für Hero) === */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* === Loading State === */
.is-loading {
  position: relative;
  overflow: hidden;
}

.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

/* === Reduced Motion Support === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .sticky-btn.call {
    animation: none;
  }
}

/* === Mobile Optimierungen === */
@media (max-width: 768px) {
  .card-white:hover,
  .icon-card:hover {
    transform: translateY(-6px) scale(1.01);
  }
  
  .gallery-item:hover {
    transform: translateY(-4px);
  }
  
  .gallery-item:hover img {
    transform: scale(1.04);
  }
}
