/**
 * SBM GmbH – Scroll-Animationen (ohne Layout-Überlappung)
 */

/* —— Sektionen ohne Unter-Blöcke: sanft einblenden —— */
.sbm-section-animate:not(.sbm-has-blocks) {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.sbm-section-animate:not(.sbm-has-blocks).sbm-in-view {
  opacity: 1;
}

.sbm-section-animate.sbm-has-blocks {
  opacity: 1;
}

/* —— Inhalts-Blöcke: nur Opacity, gestaffelt —— */
.sbm-block {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--sbm-i, 0) * 0.08s);
}

.sbm-section-animate.sbm-in-view .sbm-block {
  opacity: 1;
}

.sbm-block.sbm-block--image {
  filter: blur(3px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.75s ease;
  transition-delay: calc(var(--sbm-i, 0) * 0.08s);
}

.sbm-section-animate.sbm-in-view .sbm-block--image {
  filter: none;
}

.sbm-in-view {
  opacity: 1 !important;
  filter: none !important;
}

/* —— Hero —— */
.section_hero.sbm-hero-solar {
  isolation: isolate;
}

.sbm-solar-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sbm-solar-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  animation: sbm-orb-float 14s ease-in-out infinite;
}

.sbm-solar-orbs span:nth-child(1) {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  top: 12%;
  right: 8%;
  background: radial-gradient(circle, rgba(247, 198, 0, 0.55) 0%, transparent 70%);
}

.sbm-solar-orbs span:nth-child(2) {
  width: min(28vw, 220px);
  height: min(28vw, 220px);
  bottom: 18%;
  left: 6%;
  background: radial-gradient(circle, rgba(255, 220, 80, 0.4) 0%, transparent 72%);
  animation-delay: -4s;
}

.sbm-solar-orbs span:nth-child(3) {
  width: min(20vw, 160px);
  height: min(20vw, 160px);
  top: 42%;
  left: 38%;
  background: radial-gradient(circle, rgba(201, 149, 0, 0.35) 0%, transparent 68%);
  animation-delay: -7s;
}

@keyframes sbm-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -18px) scale(1.06);
  }
  66% {
    transform: translate(-10px, 14px) scale(0.96);
  }
}

.sbm-hero-enter {
  opacity: 0;
  transform: translateY(32px);
  animation: sbm-hero-rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sbm-hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-hero.sbm-page-hero-animate,
.legal-hero.sbm-page-hero-animate,
.contact-hero.sbm-page-hero-animate,
.standorte-hero.sbm-page-hero-animate,
.leistungen-hero.sbm-page-hero-animate,
.page-hero.sbm-page-hero-animate {
  animation: sbm-hero-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-hero.sbm-page-hero-animate .about-hero-subtitle,
.about-hero.sbm-page-hero-animate h1,
.about-hero.sbm-page-hero-animate .sbm-subpage-hero__title,
.legal-hero.sbm-page-hero-animate h1,
.contact-hero.sbm-page-hero-animate h1,
.standorte-hero.sbm-page-hero-animate h1,
.leistungen-hero.sbm-page-hero-animate h1,
.page-hero.sbm-page-hero-animate h1 {
  animation: sbm-hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* —— Karten-Hover —— */
.sbm-card-hover {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

.sbm-card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.sbm-card-hover:hover img {
  transform: scale(1.04);
}

.sbm-card-hover img {
  transition: transform 0.45s ease;
}

@media (hover: hover) and (min-width: 992px) {
  .sbm-tilt {
    transition: transform 0.2s ease-out;
  }
}

.sbm-btn-shine {
  position: relative;
  overflow: hidden;
}

.sbm-btn-shine::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -100%;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: sbm-shine-sweep 4s ease-in-out infinite;
}

@keyframes sbm-shine-sweep {
  0%,
  70%,
  100% {
    left: -100%;
  }
  20% {
    left: 120%;
  }
}

.navigation.sbm-nav-elevated {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.footer.sbm-footer-in {
  animation: sbm-footer-rise 0.9s ease both;
}

@keyframes sbm-footer-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Leistungs-Karten: nur Sektion, keine Einzel-Blöcke */
.section_vorteile .sbm-block {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* —— Über uns: nur Fade-in, keine Hover-/Rise-Effekte —— */
.main-wrap.sbm-about-fade-only .about-hero.sbm-page-hero-animate,
.main-wrap.sbm-about-fade-only .about-hero .about-hero-subtitle,
.main-wrap.sbm-about-fade-only .about-hero h1,
.main-wrap.sbm-about-fade-only .footer.sbm-footer-in {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.main-wrap.sbm-about-fade-only .sbm-block {
  opacity: 0;
  transform: none !important;
  filter: none !important;
  transition: opacity 0.85s ease;
  transition-delay: calc(var(--sbm-i, 0) * 0.1s);
}

.main-wrap.sbm-about-fade-only .sbm-section-animate.sbm-in-view .sbm-block {
  opacity: 1;
}

.main-wrap.sbm-about-fade-only .sbm-section-animate:not(.sbm-has-blocks).sbm-in-view {
  opacity: 1;
}

.main-wrap.sbm-about-fade-only .sbm-section-animate:not(.sbm-has-blocks) {
  opacity: 0;
  transition: opacity 0.85s ease;
}

.main-wrap.sbm-about-fade-only .about-section-card.sbm-card-hover,
.main-wrap.sbm-about-fade-only .about-section-card.sbm-card-hover:hover {
  transform: none !important;
  box-shadow: 0 8px 24px rgba(15, 23, 35, 0.06);
}

.main-wrap.sbm-about-fade-only .about-section-card.sbm-card-hover:hover img,
.main-wrap.sbm-about-fade-only .about-section-card img {
  transform: none !important;
}

.main-wrap.sbm-about-fade-only .about-cta-btn.sbm-btn-shine::after {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .sbm-section-animate,
  .sbm-section-animate .sbm-block,
  .sbm-reveal,
  .sbm-reveal-image,
  .sbm-hero-enter {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }

  .sbm-solar-orbs,
  .sbm-btn-shine::after {
    display: none !important;
  }
}
