/* ==========================================================================
   PARALLAX SECTIONS - MOBILE FIRST
   Mobile-First Ansatz: Basis = Mobile, Breakpoints erweitern
   
   Dokumentation für Studenten:
   - Basis-Styles gelten für MOBILE ( kleinste Screens)
   - @media (min-width: ...) erweitert für größere Screens
   - Nie max-width ohne min-width Kombination!
   - Classroom Mode: Spezielles Handling für Hörsäle
   ========================================================================== */

/* ========================================================================
   BASE PARALLAX SECTION (Mobile)
   ======================================================================== */

.parallax-section {
  position: relative;
  width: 100%;
  min-height: 300px;
  height: 40vh;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
  margin: 0;
}

/* ========================================================================
   HEIGHT VARIANTS (Mobile First)
   ======================================================================== */

/* Mobile Basis */
.parallax-section--small { height: 35vh; min-height: 250px; }
.parallax-section--medium { height: 40vh; min-height: 300px; }
.parallax-section--large { height: 50vh; min-height: 350px; }
.parallax-section--fullscreen { 
  height: 100vh; 
  min-height: 600px;
}

/* Tablet (ab 768px) */
@media (min-width: 768px) {
  .parallax-section--small { height: 35vh; min-height: 250px; }
  .parallax-section--medium { height: 45vh; min-height: 350px; }
  .parallax-section--large { height: 55vh; min-height: 400px; }
  .parallax-section--fullscreen { 
    height: 100vh; 
    min-height: 700px;
  }
}

/* Desktop (ab 1024px) */
@media (min-width: 1024px) {
  .parallax-section--small { height: 35vh; min-height: 300px; }
  .parallax-section--medium { height: 50vh; min-height: 400px; }
  .parallax-section--large { height: 60vh; min-height: 450px; }
  .parallax-section--fullscreen { 
    height: 100vh; 
    min-height: 800px;
  }
}

/* ========================================================================
   PARALLAX BACKGROUND - Picture/Img Elements
   ======================================================================== */

.parallax-bg {
  position: absolute;
  inset: -20% 0; /* 20% größer für stärkere Parallax-Bewegung */
  z-index: 0;
  overflow: hidden;
  
  /* Für Transform-Animation */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* Mobile First: Hochformat = Bild füllt Bereich (cover), Querformat = vollständig (contain) */
.parallax-section .parallax-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Querformat (Landscape): Bild vollständig anzeigen */
@media (orientation: landscape) and (max-width: 1023px) {
  .parallax-section .parallax-bg img {
    object-fit: contain;
    object-position: center;
  }
}

/* Desktop: Immer Cover für immersive Darstellung */
@media (min-width: 1024px) {
  .parallax-section .parallax-bg img {
    object-fit: cover;
  }
}

/* Dark Mode: Show dark image, hide light */
.parallax-bg--dark {
  opacity: 1;
}

.parallax-bg--light {
  opacity: 0;
}

/* Light Mode: Swap images */
html.light-theme .parallax-bg--dark {
  opacity: 0;
}

html.light-theme .parallax-bg--light {
  opacity: 1;
}

/* Smooth transition for theme switching */
.parallax-bg {
  transition: opacity 0.5s ease;
}

/* ========================================================================
   PARALLAX CONTENT - MOBILE FIRST
   ======================================================================== */

.parallax-content {
  position: absolute;
  z-index: 2;
  left: 5%;
  right: 5%; /* Mobile: volle Breite nutzen */
  bottom: 2%;
  text-align: left;
  
  /* For parallax movement */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: none;
}

/* Tablet+ */
@media (min-width: 768px) {
  .parallax-content {
    left: 5%;
    right: 30%; /* Desktop: schmaler Textblock */
    bottom: 2%;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .parallax-content {
    left: max(5%, calc((100vw - 1200px) / 2));
    right: 30%;
    bottom: 2%;
  }
}

.parallax-content h2,
.parallax-content .parallax-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 4rem); /* Mobile: startet bei 1.5rem */
  font-weight: var(--font-bold);
  color: white;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.8),
    0 4px 30px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(0, 0, 0, 0.4);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.parallax-content p,
.parallax-content .parallax-text {
  font-family: var(--font-body);
  font-size: var(--text-base); /* Mobile: base size */
  color: rgba(255, 255, 255, 0.95);
  max-width: 100%;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

/* Premium Quote/Message Styling - Mobile First */
.parallax-content .parallax-message,
.parallax-content .parallax-quote {
  font-family: var(--font-display);
  font-size: 1.25rem; /* Mobile: kleiner */
  font-weight: 600;
  font-style: italic;
  color: white;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.9),
    0 4px 40px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Tablet+ */
@media (min-width: 768px) {
  .parallax-content .parallax-message,
  .parallax-content .parallax-quote {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin: 0 0 var(--space-4);
  }
}

.quote-mark {
  display: none;
}

/* Subtitle - Mobile First */
.parallax-subtitle {
  font-family: var(--font-display);
  font-size: 0.625rem; /* Mobile: kleiner */
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  text-align: left; /* Mobile: linksbündig */
  margin-top: var(--space-1);
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.8),
    0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Tablet+: Rechtsbündig wie Desktop Design */
@media (min-width: 768px) {
  .parallax-subtitle {
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    letter-spacing: 0.08em;
    text-align: right; /* Desktop: rechtsbündig */
    margin-top: 0;
  }
}

/* Tablet+ */
@media (min-width: 768px) {
  .parallax-content p,
  .parallax-content .parallax-text {
    font-size: var(--text-lg);
    max-width: 600px;
  }
}

/* ========================================================================
   CLASSROOM MODE
   Spezielle Styles für Hörsaal-Präsentationen
   ========================================================================== */

/* Classroom Mode: Alles größer und besser lesbar */
html.classroom-mode .parallax-section {
  min-height: 400px; /* Höhere Mindesthöhe */
}

html.classroom-mode .parallax-section--medium {
  height: 70vh;
}

html.classroom-mode .parallax-section--large {
  height: 85vh;
}

html.classroom-mode .parallax-section--fullscreen {
  height: 100vh;
  min-height: 900px;
}

html.classroom-mode .parallax-content h2,
html.classroom-mode .parallax-content .parallax-title {
  font-size: clamp(2.5rem, 6vw, 5rem); /* Deutlich größer */
  text-shadow: 0 3px 30px rgba(0, 0, 0, 0.8); /* Stärkerer Schatten */
}

html.classroom-mode .parallax-content p,
html.classroom-mode .parallax-content .parallax-text {
  font-size: clamp(1.25rem, 3vw, 2rem); /* Größerer Text */
  max-width: 800px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
}

/* Standard Parallax Overlay - Subtle darkening for text readability */
.parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Light Mode: Darker overlay for text readability on bright images */
html.light-theme .parallax-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.25) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Classroom Mode: Mehr Kontrast im Overlay */
html.classroom-mode .parallax-overlay {
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0.6) 0%,
    rgba(10, 12, 16, 0.3) 50%,
    rgba(10, 12, 16, 0.6) 100%
  );
}

/* ========================================================================
   REDUCED MOTION SUPPORT
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  .parallax-bg {
    inset: 0 !important;
    transition: none !important;
  }
}

/* ========================================================================
   PRINT STYLES
   ======================================================================== */

@media print {
  .parallax-section {
    display: none;
  }
}





/* ========================================================================
   LIGHT MODE STYLING
   ======================================================================== */

/* Light Mode: Parallax Text - WHITE with strong shadow for readability */
html.light-theme .parallax-content h2,
html.light-theme .parallax-content .parallax-title {
  color: #ffffff;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.3);
}

html.light-theme .parallax-content p,
html.light-theme .parallax-content .parallax-text {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

html.light-theme .parallax-content .parallax-message,
html.light-theme .parallax-content .parallax-quote {
  color: #ffffff;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.7),
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 0, 0, 0.4);
}

html.light-theme .quote-mark {
  display: none;
}

html.light-theme .parallax-subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

html.light-theme .parallax-cta {
  background: linear-gradient(135deg, #58a6ff, #8b5cf6);
  box-shadow: 
    0 4px 14px rgba(88, 166, 255, 0.4),
    0 0 20px rgba(88, 166, 255, 0.2);
}
