/*
 Theme Name:   Divi Child
 Description:  Child Theme für Divi
 Author:       Dein Name
 Template:     Divi
 Version:      1.0.0
*/

/* ==========================================================================
   EIGENES CUSTOM CSS
   ========================================================================== */

/* Story-Card Basis */
.story-card {
  position: relative;
  display: block;
  width: 80%;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Hover-Effekt der gesamten Karte */
.story-card:hover {
  transform: rotate(-3deg) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Der weiße Container, der reinfährt */
.story-card__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  width: 100%;
  height: 100%;
  padding: 30px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Reindreh-Effekt beim Hover */
.story-card:hover .story-card__content {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 1;
}

/* Typografie */
.story-card__title {
  margin: 0 0 12px 0;
  font-size: 22px;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.2;
}

.story-card__description {
  margin: 0;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
}

/* =========================================
   GLOBAL PREMIUM PRELOADER
   ========================================= */
#global-preloader {
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100vh;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f0f2f5 70%);
  z-index: 999999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}

#global-preloader.fade-out { 
  opacity: 0; 
  visibility: hidden; 
}

/* Bodenlinie */
.floor-line {
  position: absolute; 
  bottom: 25%; 
  left: 0; 
  width: 100%; 
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05) 50%, transparent);
}

/* Keyframe Animations */
@keyframes moveX {
  0% { transform: translateX(-15vw); }
  100% { transform: translateX(115vw); }
}

@keyframes bounceY {
  0% { transform: translateY(-35vh) scale(1, 1); animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5); }
  92% { transform: translateY(0) scale(1, 1); animation-timing-function: linear; }
  98% { transform: translateY(2px) scale(1.08, 0.9); animation-timing-function: linear; }
  100% { transform: translateY(0) scale(1, 1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1080deg); }
}

@keyframes shadowScale {
  0% { transform: scale(0.3); opacity: 0.2; }
  92% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 0.9; }
}

/* Ball Strukturen */
.ball-track {
  position: absolute;
  bottom: 25%;
  left: 0;
  animation: moveX var(--speed-x) linear infinite;
  animation-delay: var(--delay);
}

.ball-bounce {
  position: relative;
  width: var(--size);
  height: var(--size);
  animation: bounceY var(--speed-y) infinite alternate;
  animation-delay: var(--delay);
}

.ball-light-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 
    inset 10px 10px 20px rgba(255, 255, 255, 0.7), 
    inset -10px -15px 25px rgba(0, 0, 0, 0.5),
    0 0 3px rgba(0,0,0,0.2);
  z-index: 10;
  pointer-events: none;
}

.ball-texture {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  animation: spin var(--speed-x) linear infinite;
  animation-delay: var(--delay);
}

.ball-shadow {
  position: absolute;
  bottom: calc(var(--size) * -0.1);
  left: 10%;
  width: 80%;
  height: 15px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
  animation: shadowScale var(--speed-y) infinite alternate;
  animation-delay: var(--delay);
}

/* 1. Basketball */
.track-basketball {
  --size: 70px;
  --speed-x: 3.5s;
  --speed-y: 0.5s;
  --delay: 0s;
}
.texture-basketball { background: #df6014; }
.texture-basketball::before {
  content: ""; position: absolute;
  top: 50%; left: -20%; width: 140%; height: 3px;
  background: #2a1002; transform: translateY(-50%);
}
.texture-basketball::after {
  content: ""; position: absolute;
  left: 50%; top: -20%; height: 140%; width: 3px;
  background: #2a1002; transform: translateX(-50%);
}
.bb-curve-1, .bb-curve-2 {
  position: absolute; width: 70%; height: 140%;
  border: 3px solid #2a1002; border-radius: 50%; top: -20%;
}
.bb-curve-1 { left: -40%; }
.bb-curve-2 { right: -40%; }

/* 2. Fußball */
.track-soccer {
  --size: 65px;
  --speed-x: 3s;
  --speed-y: 0.45s;
  --delay: 1.2s;
}
.texture-soccer {
  background: #fff;
  background-image: 
    radial-gradient(circle at 50% 50%, #1a1a1a 15%, transparent 16%),
    radial-gradient(circle at 0% 0%, #1a1a1a 20%, transparent 21%),
    radial-gradient(circle at 100% 0%, #1a1a1a 20%, transparent 21%),
    radial-gradient(circle at 100% 100%, #1a1a1a 20%, transparent 21%),
    radial-gradient(circle at 0% 100%, #1a1a1a 20%, transparent 21%);
  background-size: 45px 45px;
  background-position: center;
}

/* 3. Tennisball */
.track-tennis {
  --size: 40px;
  --speed-x: 2.8s;
  --speed-y: 0.35s;
  --delay: 2.2s;
}
.texture-tennis {
  background: #ccff00;
  box-shadow: inset 0 0 10px rgba(139, 179, 0, 0.5);
}
.texture-tennis::before {
  content: ""; position: absolute; width: 120%; height: 120%;
  border: 3px solid #ffffff; border-radius: 50%; top: -40%; left: -40%;
}
.texture-tennis::after {
  content: ""; position: absolute; width: 120%; height: 120%;
  border: 3px solid #ffffff; border-radius: 50%; bottom: -40%; right: -40%;
}

/* =========================================
   LINE SIDEBAR (DYNAMISCHES H2-INHALTSVERZEICHNIS)
   ========================================= */
.line-sidebar {
  --accent-color: #a855f7;
  --text-color: #c4c4c4;
  --marker-color: #6c6c6c;
  --marker-length: 40px;
  --marker-gap: 0px;
  --max-shift: 15px;
  --item-gap: 15px;
  --font-size: 0.95rem;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: calc(var(--marker-length) + var(--marker-gap));
  margin-bottom: 30px;
}

.line-sidebar__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 1rem 0 !important;
  display: flex;
  flex-direction: column;
  gap: var(--item-gap);
}

.line-sidebar__item {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.line-sidebar__label {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font-size: var(--font-size);
  line-height: 1.3;
  color: var(--text-color);
  transition: color 0.3s ease, transform 0.3s ease;
}

.line-sidebar__item.is-active .line-sidebar__label,
.line-sidebar__item:hover .line-sidebar__label {
  color: var(--accent-color);
  transform: translateX(var(--max-shift));
}

.line-sidebar__index {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-right: 0.6rem;
  font-size: 0.85em;
  opacity: 0.55;
}

.line-sidebar__marker {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--marker-length) - var(--marker-gap));
  height: 1px;
  width: var(--marker-length);
  background-color: var(--marker-color);
  transform-origin: left center;
  transform: translateY(-50%) scaleX(0.7);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.line-sidebar__item.is-active .line-sidebar__marker,
.line-sidebar__item:hover .line-sidebar__marker {
  background-color: var(--accent-color);
  transform: translateY(-50%) scaleX(1.2);
}