/*
 Theme Name: moß Steuerberater
 Theme URI: https://steuerberater-moss.de/
 Description: Child Theme für das Hello Theme von Elementor.
 Author: Daniel Kulosa
 Author URI: https://madebyd.de/
 Template: hello-elementor
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: hello-elementor-child
 Tags: elementor, child-theme, minimal
*/

/* Eigene Styles hier hinzufügen */

/* ===== SCROLLSMOOTHER SETUP ===== */
#smooth-wrapper {
  overflow: hidden;
}

#smooth-content {
  overflow: visible;
  width: 100%;
}

/* WordPress Admin Bar Fix für ScrollSmoother */
.admin-bar #smooth-wrapper {
  padding-top: 0;
}

.admin-bar #wpadminbar {
  position: fixed !important;
  top: 0 !important;
  z-index: 99999 !important;
}

/* Content Anpassung wenn Admin Bar sichtbar */
.admin-bar #smooth-content {
  padding-top: 32px; /* Standard Admin Bar Höhe */
}

/* Mobile Admin Bar */
@media screen and (max-width: 782px) {
  .admin-bar #smooth-content {
    padding-top: 46px; /* Mobile Admin Bar Höhe */
  }
}

/* Deaktiviere ScrollSmoother auf kleinen mobilen Geräten (optional) */
@media (max-width: 768px) {
  #smooth-wrapper {
    overflow: visible;
  }
  
  .admin-bar #smooth-content {
    padding-top: 46px;
  }
}

/* ===== FIXED HEADER SUPPORT FÜR SCROLLSMOOTHER ===== */
/* Fixed Header Elements */
.fixed-header,
header.fixed,
.sticky-header,
#header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  transform: translateZ(0); /* Hardware-Beschleunigung */
  will-change: transform;
}

/* Fixed Header mit Admin Bar */
.admin-bar .fixed-header,
.admin-bar header.fixed,
.admin-bar .sticky-header,
.admin-bar #header {
  top: 32px !important;
}

/* Mobile Admin Bar Anpassung */
@media screen and (max-width: 782px) {
  .admin-bar .fixed-header,
  .admin-bar header.fixed,
  .admin-bar .sticky-header,
  .admin-bar #header {
    top: 46px !important;
  }
}

/* Elementor Header Fix */
.elementor-sticky--active {
  position: fixed !important;
  z-index: 9999 !important;
  transform: translateZ(0);
  will-change: transform;
}

.admin-bar .elementor-sticky--active {
  top: 32px !important;
}

@media screen and (max-width: 782px) {
  .admin-bar .elementor-sticky--active {
    top: 46px !important;
  }
}

/* ===== LOTTIE INTRO LAYER ===== */

/* Im Elementor Editor: Intro Layer komplett ausblenden */
body.elementor-editor-active .intro-layer {
  display: none !important;
}

/* Nur im Frontend aktiv */
body:not(.elementor-editor-active) .intro-layer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  height: 100vh !important; /* Fallback für ältere Browser */
  z-index: 9999999 !important; /* SEHR HOCH - Über allem */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: all !important;
  overflow: hidden !important;
  transition: none !important; /* Elementor Override */
  animation: none !important; /* Elementor Override */
}

body:not(.elementor-editor-active) .intro-layer.hidden {
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Body Scroll Lock wenn Intro aktiv (nur Frontend) */
body.intro-active:not(.elementor-editor-active) {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Elementor Sticky Navigation unter Intro Layer forcieren (nur Frontend) */
body.intro-active:not(.elementor-editor-active) .elementor-sticky,
body.intro-active:not(.elementor-editor-active) .elementor-sticky--active,
body.intro-active:not(.elementor-editor-active) .elementor-sticky--effects,
body.intro-active:not(.elementor-editor-active) header,
body.intro-active:not(.elementor-editor-active) nav,
body.intro-active:not(.elementor-editor-active) [data-elementor-type="header"] {
  z-index: 100 !important; /* Viel niedriger als Intro Layer */
}
