/*
 Theme Name:   Hello Elementor Child
 Description:  Child theme for Hello Elementor with custom animations and typography.
 Author:       Bureau Steffi Holz in Zusammenarbeit mit formschön Werbeagenturen
 Template:     hello-elementor
 Version:      1.1.0
*/

:root {
  --primary-color: #e30613;
  --accent-color: #ff6600;
  --lightgray-color: #f5f2f2;
  --text: #323232;
  --text-white: #ffffff;
}

/* --- SMOOTH SCROLLING (für alle Anker-Links) --- */
html {
  scroll-behavior: smooth;
}

body {
  color: var(--primary-color);
}

/* --- 2. THE PERFECT UNDERLINE (Stable version) --- */
.menu-text-underline a,
.menu-text-underline .elementor-item,
.header-menu-shrink a,
.header-menu-shrink .elementor-item {
  display: inline-block !important;
  width: fit-content !important;
  position: relative !important;
  text-decoration: none !important;
  transition: background-size 0.3s ease, font-size 0.8s ease-in-out !important;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-origin: content-box !important;
  background-position: center bottom;
  background-size: 0% 1px;
}

.menu-text-underline a:hover,
.menu-text-underline .elementor-item:hover,
.menu-text-underline .elementor-item.elementor-item-active,
.header-menu-shrink a:hover,
.header-menu-shrink .elementor-item:hover,
.header-menu-shrink .elementor-item.elementor-item-active,
.header-scrolled .header-menu-shrink .elementor-item.elementor-item-active {
  background-size: 100% 1px;
}

/* --- 3. LOGO ANIMATION (CENTER TO HEADER) --- */

.site-logo svg {
  width: 100%;
  height: auto;
  display: block;
}

@supports (animation-timeline: scroll()) {
  .site-logo {
    animation: logoFade linear both;
    animation-timeline: scroll();
    animation-range: 0 300px;
  }

  @keyframes logoFade {
    from {
      opacity: 1;
    }

    to {
      opacity: 0;
    }
  }
}


/* --- 4. MENU FONT SIZE ANIMATION --- */

/* Startzustand: Elementor Global Kit kontrolliert die Schriftgröße */
.header-menu-shrink .elementor-item {
  transition: all 0.8s ease-in-out !important;
  /* Nur die Animation bleibt */
}

/* Scrolled State: Zielgröße beim Scrollen (entspricht H4 = 32pt) */
.header-scrolled .header-menu-shrink .elementor-item {
  font-size: 2.0rem !important;
}


/* --- 5. MAIN HEADER (Sticky Background) --- */
.main-header {
  /* position: fixed entfernt, damit der Hero-Bereich normal scrollen kann */
  z-index: 9990;
  transition: min-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
  background: transparent;
}

.header-scrolled .main-header {
  /* Wenn die Menüleiste fixiert werden soll, mache das direkt in Elementor (Motion Effects -> Sticky Top) */
}

/* --- 6. FOOTER (Vorgabe: 245px) --- */
.footer-logo {
  width: 245px !important;
  margin: 0 auto;
  display: block;
}

/* --- 7. HERO TEXT UNTER DEM LOGO (verschwindet beim Scrollen) --- */
/* Klasse im Elementor-Widget: hero-logo-text                        */
.hero-logo-text {
  top: calc(50% + 125px);
  /* Direkt unter dem 220px Logo (Mitte + halbe Höhe + Abstand) */
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  width: auto;
  max-width: 600px;
  white-space: normal;
  /* pointer-events bleibt aktiv damit Elementor-Editor funktioniert */
}


/* --- 8. SPRUNGMARKEN-BUTTON --- */
/* Klasse im Elementor-Widget: hero-jump-button */
/* Das Logo stoppt per JavaScript oberhalb dieses Buttons. */

.hero-jump-button {
  position: absolute !important;
  bottom: 3rem !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  z-index: 10000 !important;
  /* Über dem Logo (9999) — immer sichtbar */
  cursor: pointer !important;
}

/* Remove Elementor's default white background/padding from the button */
.hero-jump-button .elementor-button,
.hero-jump-button .elementor-widget-container {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Dicke von 2 pt, Farbe und Transition für den Hover-Effekt */
.hero-jump-button svg,
.hero-jump-button i,
.hero-jump-button a {
  transition: transform 0.3s ease !important;
  width: 3rem !important;
}

/* Farbe des Pfeils (Schwarz) - hier ändern! */
.hero-jump-button svg path {
  fill: var(---text-white) !important;
}

/* Beim Hovern leicht größer */
.hero-jump-button:hover svg,
.hero-jump-button:hover i,
.hero-jump-button:hover a {
  transform: scale(1.2) !important;
}

/* --- 9. WORD CLOUD (Parallax Horizontal Scroll) --- */

/* Outer wrapper:/* Scroll space: tall enough to allow scrolling */
.word-cloud-section {
  position: relative;
  /* Break out of boxed layout to force full width */
  width: 100vw !important;
  max-width: 100vw !important;
  left: calc(-50vw + 50%) !important;
  padding: 0 !important;
  /* Force remove any builder padding */
  margin: 0 !important;
}

/* Sticky viewport: stays pinned while user scrolls vertically */
.word-cloud-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  /* Allow image to overflow at bottom via clip-path instead of overflow:hidden */
  overflow: visible;
  clip-path: inset(0 0 -250px 0);
  /* Clips sides/top but allows 250px overflow at bottom */
  display: flex;
  align-items: flex-start !important;
  /* Force to top edge */
  justify-content: flex-start !important;
  /* Force to left edge */
  padding: 0 !important;
  /* Force remove any builder padding */
  margin: 0 !important;
}

/* Kill Elementor's hidden inner wrapper padding on outer word cloud containers only */
.word-cloud-section>.e-con-inner,
.word-cloud-viewport>.e-con-inner {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.word-cloud-track {
  position: relative;
  min-width: 100vw;
  /* Match viewport exactly so gradient % works perfectly */
  height: 100vh !important;
  min-height: 0 !important;
  overflow: visible !important;
  /* Forces image to be allowed to hang out the bottom */
  padding: 0 !important;
  /* Move padding to inner wrapper so background covers it */
  margin: 0 !important;
  left: 0 !important;
  will-change: transform;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.word-cloud-track>.e-con-inner {
  height: 100vh !important;
  min-height: 0 !important;
  overflow: visible !important;
  /* Forces image to be allowed to hang out the bottom */
  width: 100% !important;
  /* 100vw left padding pushes the first word off-screen to the right,
     while the red background instantly covers the whole screen! */
  padding: 5vh 10vw 5vh 100vw !important;
}

/* Word items */
.wc-word {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease;
  user-select: none;
}

/* Image items */
.wc-image {
  flex-shrink: 0;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

/* Click effect: scale up + desaturate (no glow) */
.wc-item--active {
  transform: scale(1.35) !important;
  filter: grayscale(100%) !important;
}

/* Accessibility: disable motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  .word-cloud-track,
  .wc-word,
  .wc-image {
    transition: none !important;
    transform: none !important;
  }
}