/**************************************
 * GRUNDLEGENDES SETUP
 **************************************/
html, body {
  max-width: 100% !important; /* Verhindert horizontales Scrollen */
  overscroll-behavior: none;
  scroll-padding-top: 80px; /* Header-Höhe + Puffer */
  pointer-events: auto;
  overflow-x: hidden; /* Verhindert horizontales Scrollen */
  box-sizing: border-box;
}

body {
  min-height: 100vh; /* Stellt sicher, dass der Body die volle Höhe einnimmt */
  position: relative;
  overflow-y: visible !important; /* Scrollen aktivieren */
  display: flex;
  flex-direction: column;
  margin: 0;
}
*, *::before, *::after {
  box-sizing: border-box;
}

/* In style.css hinzufügen */
#wpadminbar {
  position: fixed !important;
  z-index: 999999 !important; /* Höchster z-index */
  max-width: 100vw !important; /* Verhindert horizontales Scrollen */
}

/* Anpassung für den fixed-header */
.admin-bar #fixed-header.moved {
  top: 32px !important; /* Standard für Desktop */
}

@media screen and (max-width: 782px) {
  .admin-bar #fixed-header.moved {
    top: 43px !important; /* Mobile Ansicht */
  }
}

/**************************************
 * Z-INDEX HIERARCHIE 
 **************************************/

footer {
  flex-shrink: 0;
}

.site-main {
  position: relative;
  -webkit-overflow-scrolling: touch;
   overflow-x: hidden;
  margin: 0 auto;
  overflow: hidden;
  flex: 1 0 auto;
  margin-bottom: -120px; /* Wert nach Bedarf anpassen */
}

.site-main > *{
  width: 100%;
  box-sizing: border-box;
  padding: 50px;
  margin: 0;
  height: 0;
}

.site-main .wp-block-separator {
  border: none;
  border-top: 2px solid #ffffff; /* orange-500, anpassen nach Wunsch */
  margin: 0 auto;
  width: 95%;
  opacity: 1;
  padding: 0;
}



.wp-block-heading{
  padding-left: 50px;
  padding-top: 20px;
  padding-bottom: 0px;
}

/* Der erste Block (Hero-Block) */
.site-main > *:first-child,
.wp-block-acf-hero,
.wp-block-acf-bg-carousel {
  min-height: 100vh;
  margin-top: 0 ;
  padding-top: 0 ;
  position: relative;
  opacity: 1 ; /* Sichtbar */
  z-index: 40;
}
.site-main > *:last-child {
 /* Wert nach Bedarf anpassen */
  z-index: 101;
  position: relative;
}

/* Alle anderen Blöcke direkt aneinander anschließen */
.site-main > *:not(:first-child) {
  margin-top: 0 !important;
  position: relative;
  z-index: 30;
}

/* Wichtig: Falls der Hero eine fixed-Position hat, diese korrigieren */
.acf-block-preview,
.wp-block-acf-hero {
  position: relative !important;
}

/* Nach Animation: Normales Scrollverhalten */
.site-main.moved {
  position: relative !important; /* WICHTIG: Muss relativ sein */
  top: 0;
  padding-top: 40px !important; /* Kein zusätzliches Padding */
}

/* Sorgt dafür, dass Blöcke nicht das Scrolling blockieren */
.site-main > *,
.wp-block-acf,
.social-feed-gallery-container,
[class*="wp-block"] {
  position: relative !important; /* Keine fixed/absolute Positionierung */
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  display: block;
}

/* Alle Blöcke innerhalb von site-main */
.site-main > *:not(.bg-carousel):not(.start-screen) {
  position: relative;
  opacity: 0;
  transform: translateY(1500px); /* Start: 150px nach unten verschoben */
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

/* Blöcke nach Animation sichtbar machen */
.site-main.moved > *:not(.bg-carousel):not(.start-screen) {
  opacity: 1;
  transform: translateY(0px);
}

.bg-overlay {
  position: fixed;
  overflow: hidden !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0, 0, 0, 0.765) 100%);
}

.bg-overlay::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
  opacity: 0;
  transition: opacity 0.7s ease;
}

body.moved .bg-overlay::after {
  opacity: 1;
}


/* Header-Styling */
#fixed-header {
  position: fixed;
  top: -150px; /* Anfangs außerhalb des Bildschirms */
  left: 0;
  right: 0;
  z-index: 100;
  transition: top 0.4s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
   opacity: 0;
  
}
#fixed-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
 
  
  /* Masken-Gradient für abnehmenden Blur-Effekt */
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 20%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.2) 85%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.9) 20%,
    rgba(0, 0, 0, 0.8) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.2) 85%,
    rgba(0, 0, 0, 0) 100%
  );
}

#fixed-header.moved {
  top: 0; /* Header wird sichtbar */
  opacity: 1; /* Sicherstellen, dass der Header sichtbar ist */
}

#fixed-header .interaktiv,
.mobile-menu-toggle .interaktiv {
  pointer-events: auto;
}

#fixed-header,
.mobile-menu-toggle{
  max-width: 100vw;
  box-sizing: border-box;
}

.page-template-page-impresum h4{
  padding-top: 120px; /* Padding für den Inhalt */
  }

.page-template-page-impresum #fixed-header,
.page-template-page-impresum #fixed-header.moved {
  top: 0;
  animation: none;
  opacity: 1; /* Sicherstellen, dass der Header sichtbar ist */
}

.page-template-page-impresum p {
  margin: 0;
  padding-top: 10px;
  font-size: 1rem;
  line-height: 1.5;
  color: #ffffff; /* Weiß für bessere Lesbarkeit */
  z-index: 1000; /* Sicherstellen, dass der Text über anderen Elementen liegt */
}

   .page-template-page-impresum .wp-block-separator {
    margin-left: 15rem;
    margin-right: 15rem;
  }


.container-impresum {
  padding-top: 80px;
}

.page-template-page-impresum .wp-block-heading {
  padding-top: 20px;
  margin-bottom: 5px;
  padding-left: 0;
}

/**************************************
 * HERO-BEREICH 
 **************************************/
#start-screen {
  position: fixed !important;
  top: -40px;
  left: 0;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background: transparent !important;
  pointer-events: auto;
  padding: 0; /* Padding ggf. entfernen, damit wirklich zentriert */

}

#start-screen.moved {
  opacity: 0;
  position: fixed; /* Nach Animation aus dem Flow nehmen */
  top: 0;
  left: 0;
  height: 0;
  min-height: 0;
  overflow: hidden;
  z-index: -10;
}

#start-screen > * {
  max-width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
}

#logo {
  max-width: 500px;
  margin-bottom: 1.5rem;
  transition: all 0.7s ease;
}

#intro-text {
  color: white;
  margin-bottom: 1.5rem;
  transition: all 0.7s ease;
}

.anmelden {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

#cta-button {
  background-color: #f97316; /* orange-500 */
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  transition: all 0.3s ease;
}

#cta-button:hover {
  background-color: #ea580c; /* orange-600 */
}

#info {
  color: white;
  margin-top: 1.5rem;
  transition: all 0.7s ease;
}
@keyframes pulse-fade {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}


#arrow-button {
  cursor: pointer;
  transition: all 0.3s ease;
  
}

#arrow-button:hover {
  transform: translateY(5px);
  
}



/**************************************
 * ACF-BLOCKS 
 **************************************/
.acf-block {
  padding-top: 4rem;
  min-height: 100vh;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.acf-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Aktive Navigation */
.header-nav a.active {
  color: #f97316; /* orange-500 */
  font-weight: bold;
}

/* Erste ACF-Block spezielle Animation */
.acf-block:first-child {
  padding-top: 100px; /* Abstand zum oberen Rand wegen Header */
  transition-delay: 0.2s; /* Verzögerung nach Header-Animation */
}

/* Animation für nachfolgende ACF-Blöcke */
.acf-block:not(:first-child) {
  transition-delay: 0.1s;
}
/**************************************
 * RESPONSIVE: DESKTOP (Sehr GROSS)
 **************************************/
@media screen and (min-width: 1441px) {

  #start-screen {
    position: fixed !important;
    top: 60px;
    padding-left: 300px; /* Padding links für zentrierte Ausrichtung */
    padding-right: 300px; /* Padding rechts für zentrierte Ausrichtung */
  }
  
  #intro-text {
    font-size: 3rem;
    line-height: normal;
    margin-bottom: 1rem;
  }

  #cta-button {
    padding: 2rem 4rem;
    font-size: 1.25rem;
  }
 
  #arrow-button img {
    width: 6rem;
    height: 6rem;
  }
  
  .header-logo img {
    height: 150px !important;
  }

   .page-template-page-impresum .wp-block-heading,
   .page-template-page-impresum p, 
   .page-template-page-impresum .wp-block-separator {
    margin-left: 15rem;
    margin-right: 15rem;
  }



}


/**************************************
 * RESPONSIVE: DESKTOP (GROSS)
 **************************************/
@media (max-width: 1440px) {

   #start-screen {
  position: fixed !important;
  top: 60px;
  padding-left: 300px; /* Padding links für zentrierte Ausrichtung */
  padding-right: 300px; /* Padding rechts für zentrierte Ausrichtung */
}
  #intro-text {
    font-size: 2.5rem;
    line-height: normal;
    margin-bottom: 1rem;
  }

  #cta-button {
    
    padding: 2rem 3rem;
    font-size: 1rem;
  }
 
  #arrow-button img {
    width: 5rem;
    height: 5rem;
  }
  .header-logo img {
    height: 100px !important;
  }

   .page-template-page-impresum .wp-block-heading,
   .page-template-page-impresum p,
   .page-template-page-impresum .wp-block-separator {
    margin-left: 15rem;
    margin-right: 15rem;
  }

 

}

/**************************************
 * RESPONSIVE: TABLETS & KLEINERE DESKTOPS
 **************************************/
@media (max-width: 1024px) {
 
   #start-screen {
  position: fixed !important;
  top: 80px;
  padding-left: 100px; /* Padding links für zentrierte Ausrichtung */
  padding-right: 100px; /* Padding rechts für zentrierte Ausrichtung */
}
  #intro-text {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  #cta-button {
    padding: 1rem 2rem;
    font-size: 2rem;
    border-radius: 1rem;
  }
 
  #arrow-button img {
    width: 5rem;
    height: 5rem;
  }
  .header-logo img {
    height: 100px !important;
  }

    .gradient-overlay-mobile {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0) 100%) !important;
    transition: none !important;
  }
  .label-mobile {
    opacity: 1 !important;
    transition: none !important;
  }

    .sportart-item {
    aspect-ratio: 1 / 1;
    min-height: 0 !important; /* überschreibt das Inline-Style */
    height: auto !important;
  }

   .page-template-page-impresum .wp-block-heading,
   .page-template-page-impresum p, 
   .page-template-page-impresum .wp-block-separator {
    margin-left: 15rem;
    margin-right: 15rem;
  }
}

/**************************************
 * RESPONSIVE: SMARTPHONES (STANDARD)
 **************************************/
@media (max-width: 768px) {

  
  #intro-text {
    font-size: 1rem;
  }
  
  #arrow-button {
    width: 3rem;
    height: 3rem;
  }

 

    .header-logo img {
    height: 60px;
  }
  
  /* Logo-Position anpassen */
  .header-logo {
    top: 15px;
    left: 20px;
  }
  
  .header-container {
    height: 80px;
  }

   .page-template-page-impresum .wp-block-heading,
   .page-template-page-impresum p,
   .page-template-page-impresum .wp-block-separator {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

}

/**************************************
 * RESPONSIVE: SMARTPHONES (KLEIN)
 **************************************/
@media (max-width: 390px) {
 #start-screen {
  position: fixed !important;
  top: 50px;
  padding-left: 20px; /* Padding links für zentrierte Ausrichtung */
  padding-right: 20px; /* Padding rechts für zentrierte Ausrichtung */
}

  #logo {
    max-width: 200px;
    max-height: 200px;
    margin-bottom: 0.5rem;
  }

    #intro-text {
    padding: 0;
    font-size: 1rem;
  }
  
  #cta-button {
    top: 20px;
    right: 10px;
    padding: 1rem 4rem;
    font-size: 1rem;
  }
  .header-logo img {
    height: 40px;
  }
  
  /* Logo-Position weiter anpassen */
  .header-logo {
    top: 20px;
    left: 10px;
  }

  .site-main > * {
  width: 100%;
  box-sizing: border-box;
  padding: 25px;
  margin: 0;
}

  .gradient-overlay-mobile {
    opacity: 1 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0) 100%) !important;
    transition: none !important;
  }
  .label-mobile {
    opacity: 1 !important;
    transition: none !important;
  }

   .page-template-page-impresum .wp-block-heading,
   .page-template-page-impresum p,
   .page-template-page-impresum .wp-block-separator {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }
  
}


/**************************************
 * RESPONSIVE: NIEDRIGE HÖHE
 **************************************/
@media (max-height: 1000px) {

  #logo {
    width: 18rem;
    height: 18rem;
    margin-bottom: 0.5rem;
  }
  
  #intro-text {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
    #cta-button {
    padding: 0.5rem 2rem;
    font-size: 1rem;
  }

}

/**************************************
 * RESPONSIVE: SEHR NIEDRIGE HÖHE
 **************************************/
@media (max-height: 500px) {

  #logo {
    width: 150px;
    height: 150px;
    margin-bottom: 0.25rem;
  }
  
  #intro-text {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  #cta-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  #info h3 {
    font-size: 0.875rem;
    margin: 0.25rem 0;
  }
  
  #arrow-button {
    margin-top: 0.5rem;
  }
  
  #arrow-button img {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/**************************************
 * SCROLL-INDIKATOR FÜR ONE-PAGER
 **************************************/
.scroll-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
}



/* Z-Index Anpassungen für den fixierten Hintergrund */
.bg-carousel {
  position: fixed !important;
  z-index: 5 !important;
  pointer-events: none;
  object-fit: cover;
  background: #000; /* Fallback, falls kein Bild geladen wird */
}




/* Header-Container für flexibles Layout */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 140px;
  width: 100%;
  margin: 0 auto;
}

.header-logo img {
  height: 150px ;
  width: auto ;
  transition: height 0.3s ease;
}

/* Navigation im Header */
.header-nav {
  display: flex;
  align-items: center;
  margin-top: -50px; /* Korrigiert den Abstand zum Header */
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0 1rem;
}

.nav-links .nav-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}


/* Unterstrich-Animation für aktive Links */
.nav-links .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f97316; /* orange-500 */
  transition: width 0.3s ease;
}

.nav-links .nav-link:hover {
  color: #f97316; /* orange-500 */
}

.nav-links .nav-link.active::after {
  width: 100%;
}
.nav-links .nav-link:not(.active)::after {
  width: 0 !important;
}

@media (max-width: 768px) {
/* Mobile Menu Button */
.mobile-menu-toggle {
  background: #f97316;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 15px;
  width: 60px;
  height: 60px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 101;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu-toggle span {
  display: block;
  width: 30px;
  height: 2px;
  background-color: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Responsive Anpassungen */
  .header-nav {
    position: fixed;
    right: -100%;
    width: 70%;
    height: 100dvh;
    min-height: 100vh;
    max-height: 100svh;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 100;
  }
  
  .header-nav.open {
    right: 0;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
  }
  
  .nav-links li {
    margin: 1rem 0;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  
  .mobile-menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }


/* Nach Animation (wenn body oder main .moved hat) einblenden */

body.moved .mobile-menu-toggle{
  opacity: 1;
  pointer-events: auto;
}
}
/* Für Block-Targets zusätzlichen oberen Abstand einfügen */
.wp-block-acf,
.instagram-gallery-feed-0,
.social-feed-container,
[id^="spola-"],
#instagram-gallery-feed-0 {
  min-height: 100vh; /* Volle Bildschirmhöhe */
  padding-top: 20px; /* Für Header-Höhe */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertikal zentrieren */
  box-sizing: border-box; /* Padding in Höhenberechnung einbeziehen */
}

#instagram-gallery-modal-0 {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8); /* Optional: dunkler Overlay-Hintergrund */
}

/* Accordion Styles */
.vergangene-sportarten-accordion {
  border: none;
  background: transparent;
}
.accordion-toggle {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}
.accordion-toggle[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}
.accordion-panel {
  position: relative;
  transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1);
}
.accordion-panel.open {
  max-height: 1000px;
}
.fade-text {
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #fff 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #fff 60%, transparent 100%);
  transition: mask-image 0.3s, -webkit-mask-image 0.3s;
}
.accordion-panel.open .accordion-fade {
  opacity: 0;
}


/* Contact Form 7 Styles */
.wpcf7 label {
  color:#fff;
  font-family: 'electrolize', sans-serif;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  color: #fff;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  background-color: #3a3a3a80; /* gray-800 */
  border-radius: 6px;
  margin-bottom: 1rem;
}

.wpcf7 input[type="Submit"] {
  background-color: #f97316;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'ZCOOL KuaiLe';
}

.wpcf7 input[type="Submit"]:hover {
  background-color: #ea580c;
}

.wpcf7-response-output {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  color: #dc2626;
  font-family: 'electrolize', sans-serif;
}

.wpcf7-mail-sent-ok {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #dc2626;
}

.wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: 0.875rem;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  justify-content: space-between;
}

.form-kontakt {
  flex: 1 1 300px;
  color: white;
  font-size: 1rem;
  line-height: 1.5;
}

.form-fields {
  flex: 2 1 400px;
}

.form-headline {
  margin-bottom: 8px;
}

.form-subtext {
  margin-bottom: 16px;
}


@media (max-width: 768px) {
  .flex-container {
    flex-direction: column;
  }
}


/* Google Maps Styles */
.acf-map {
  width: 100%;
  height: 400px;
  border: 1px solid #ccc;
  margin: 20px 0;
}
.acf-map img {
  max-width: inherit !important;
}