:root {
  /* Brand Colors */
  --color-bg: #282828; 
  --color-gold: #a39b5c;
  --color-text: #ffffff;
  --color-text-muted: #b0b0b0;
  
  /* Neo-Bento Floating Solid Colors */
  --color-panel-bg: #1c1c1c; 
  --color-panel-border: rgba(163, 155, 92, 0.4);
  --color-panel-hover: #222222;
  --shadow-floating: 0 40px 100px rgba(0, 0, 0, 0.6);
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", sans-serif;
  
  /* Spacings — kompakter für bessere Lesbarkeit */
  --space-xs: 0.5rem;   
  --space-sm: 1.25rem;   
  --space-md: 2rem;     
  --space-lg: 3.5rem;     
  --space-xl: 6rem;    
  
  /* Border Radius — rounder for true glass feel */
  --radius-sm: 16px;
  --radius-md: 28px;
  --radius-lg: 40px;
  --radius-xl: 56px;
  
  /* Transitions */
  --transition-fast: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  overscroll-behavior-x: none; /* Verhindert das horizontale Gummi-Wischen am Handy */
  position: relative;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* BACKGROUND LIQUID ECOSYSTEM */
.liquid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #111111; /* Deep organic dark */
}

/* Three massive orbs */
.liquid-blob {
  position: absolute;
  filter: blur(140px);
  border-radius: 50%;
  opacity: 0.35; /* Reduziert von 0.5 um ca 30% für satteren schwarzen Hintergrund */
  animation: liquid-float infinite alternate;
  will-change: transform;
}

.blob-1 {
  width: 900px;
  height: 900px;
  background: var(--color-gold);
  top: -20%;
  left: -20%;
  animation-duration: 45s;
}

.blob-2 {
  width: 700px;
  height: 700px;
  background: rgba(255,255,255,0.15);
  bottom: -30%;
  right: -20%;
  animation-duration: 55s;
  animation-delay: -10s;
}

.blob-3 {
  width: 600px;
  height: 600px;
  background: var(--color-gold);
  top: 30%;
  left: 60%;
  opacity: 0.2;
  animation-duration: 40s;
  animation-delay: -25s;
}

@keyframes liquid-float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(150px, 200px) scale(1.1); }
  66% { transform: translate(-80px, 100px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Typography */
/* Headings — never break mid-word, shrink dynamically instead */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
  overflow-wrap: normal;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
}

/* Font sizes shrink fluidly */
h1 { font-size: clamp(2rem, 6vw, 5rem); letter-spacing: -0.04em; line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 2.2rem); }
h4 { font-size: clamp(1rem, 2vw, 1.5rem); line-height: 1.3; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { filter: brightness(1.2); }

/* Utilities */
.container {
  width: calc(100% - 40px);
  max-width: 850px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.text-center { text-align: center; }
.text-gold {
  color: var(--color-gold);
}

/* Logo Area (Free Floating Top Center) */
.floating-logo {
  position: absolute; /* Scrolls away */
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
}
.floating-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* ╔════════════════════════════════════════════════════════════╗
   OGANIC FLOW — 2026 Structure Breakdown
╚════════════════════════════════════════════════════════════╝ */

/* FLOWING LAYOUT - Splitting the grid */
.flow-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: auto;
  padding: var(--space-lg) 8vw;
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
}

/* Alternating rows for fluid storytelling */
.flow-section:nth-child(even) {
  flex-direction: row-reverse;
}

@media (max-width: 968px) {
  .flow-section, .flow-section:nth-child(even) {
    flex-direction: column;
    text-align: left;
    padding: var(--space-md) 5vw;
    gap: var(--space-md);
  }
}

.flow-text {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  position: relative;
}

/* Floating Elements overlapping */
.float-element {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ORGANIC UI / GLASS LENS */
.glass-lens {
  background: rgba(30, 30, 30, 0.4);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 32px;
  padding: var(--space-md);
  display: inline-block;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transition: all var(--transition-slow);
}

.glass-lens:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(45, 45, 45, 0.6);
  border: 1px solid rgba(163, 155, 92, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 3rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* General Button Fix for dark theme */
button {
  color: var(--color-text);
}
.btn-primary {
  background-color: var(--color-gold);
  color: #1a1a1a;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-xl);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  display: inline-block;
  margin-top: var(--space-md);
}

.btn-primary:hover {
  background-color: #bfae3d; /* Brighter gold hover */
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(163, 155, 92, 0.3);
}

.btn-secondary {
  background-color: var(--color-panel-bg);
  color: var(--color-text);
  border: 1px solid var(--color-panel-border);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Bubble Navigation (Top Right) */
.bubble-nav-container {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 1000;
}

.bubble-btn {
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  transition: all var(--transition-normal);
}

.bubble-btn:hover {
  background: var(--color-card-hover);
  transform: scale(1.05);
}

.bubble-btn div {
  width: 28px;
  height: 2px;
  background-color: var(--color-gold);
  transition: all var(--transition-fast);
}

/* Expanded state background — Floating Dark Glass Menu */
.bubble-nav-expanded {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 70px;
  right: 0;
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  
  /* Animate Expansion: Soft Organic Pop */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-15px) scale(0.95);
  transform-origin: top right;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* bouncy ease */
}

.bubble-nav-container.active .bubble-nav-expanded {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Close icon translation */
.bubble-nav-container.active .bubble-btn .line1 {
  transform: rotate(-45deg) translate(-5px, 5px);
  background-color: var(--color-gold);
}
.bubble-nav-container.active .bubble-btn .line2 {
  opacity: 0;
}
.bubble-nav-container.active .bubble-btn .line3 {
  transform: rotate(45deg) translate(-6px, -6px);
  background-color: var(--color-gold);
}

.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    overscroll-behavior-x: none;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  margin-top: 0; 
}

.nav-links li a {
  font-family: var(--font-family);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  opacity: 0.7;
  display: block;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-radius: 0;
  transition: all var(--transition-fast);
}

.nav-links li:last-child a {
  border-bottom: none;
}

.nav-links li a:hover, .nav-links li a.active {
  opacity: 1;
  background: transparent;
  color: var(--color-gold);
  padding-left: 0.5rem; /* subtle kinetic slide */
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl) var(--space-md) var(--space-md);
}

.hero h1 {
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: var(--space-lg) 0;
}

/* Info Grids */
.flex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* Partner Logos */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.partner-logo {
  flex: 0 1 180px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}
.partner-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all var(--transition-fast);
}
.partner-logo:hover img {
  transform: scale(1.05);
}

.card-icon {
  font-size: 3rem;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
  background: rgba(163, 155, 92, 0.1);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(163, 155, 92, 0.2);
}

/* Image and Video Showcase inside Glass Card */
.image-showcase {
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
}

.video-container {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  background: #000;
  min-width: 0;
}
.video-container video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* News Feed - Cardless Editorial */
.news-item {
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  border: none;
  border-bottom: 2px solid rgba(163, 155, 92, 0.3);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-md);
}
.news-item:hover {
  transform: translateY(-8px);
  border-bottom: 2px solid var(--color-gold);
}
.news-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.news-item-content { padding: var(--space-md); }

/* PDF Grid for Konzept */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
  align-items: stretch;
}
/* Liquid Glass PDFs */
.pdf-card {
  background: rgba(30, 30, 30, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: var(--space-lg);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  height: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.pdf-card:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(45, 45, 45, 0.6);
  border: 1px solid rgba(163, 155, 92, 0.3);
}
.pdf-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 10px rgba(163, 155, 92, 0.4));
}
.pdf-link-text { margin-top: auto; padding-top: 1rem; color: var(--color-gold); font-weight: 600; font-size: 1rem; }

/* Footer */
.footer {
  text-align: center;
  padding: var(--space-lg) 0;
  color: var(--color-text-muted);
}
.footer a {
  margin: 0 10px;
}

/* Animations 2026: Flow Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* WhatsApp Chat Widget */
.whatsapp-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.whatsapp-widget.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.wa-popup {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 10001;
  width: 350px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  background: #E5DDD5;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.9);
  transition: all var(--transition-fast);
  transform-origin: bottom right;
}

.wa-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.wa-header {
  background: #075E54;
  color: #FFF;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.wa-header svg { width: 30px; height: 30px; fill: #FFF; }
.wa-header h4 { margin: 0; font-size: 1.1rem; }
.wa-header p { margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.8); }
.wa-close {
  margin-left: auto; background: none; border: none; color: #FFF; font-size: 1.5rem; cursor: pointer; opacity: 0.8;
}
.wa-close:hover { opacity: 1; }

.wa-body { padding: 20px; background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); }
.wa-message {
  background: #FFF; color: #333; padding: 10px 15px; border-radius: 0 10px 10px 10px; font-size: 0.95rem; line-height: 1.4; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.wa-message::before {
  content: ''; position: absolute; top: 0; left: -10px; border-width: 0 10px 10px 0; border-style: solid; border-color: transparent #FFF transparent transparent;
}

.wa-footer { background: #F0F0F0; padding: 15px; text-align: center; }
.wa-start-chat {
  display: inline-block; background: #25d366; color: #FFF; font-weight: 500; padding: 10px 20px; border-radius: 20px; box-shadow: 0 2px 10px rgba(37,211,102,0.3);
}

.whatsapp-float {
  width: 42px;
  height: 42px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0.45; /* Reduzierte Sichtbarkeit */
}
.whatsapp-float:hover {
  transform: scale(1.1);
  opacity: 0.85;
  box-shadow: 0 10px 28px rgba(37,211,102,0.45);
}
.whatsapp-float svg { width: 24px; height: 24px; fill: currentColor; }

/* Custom Google Translate Styling */
.goog-te-combo {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  text-align: center;
  transition: all var(--transition-fast);
}
.goog-te-combo:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #a39b5c;
}
.goog-te-combo option {
  background: #fff;
  color: #1d1d1f;
}
.skiptranslate.goog-te-gadget {
  color: transparent !important;
  font-size: 0px !important;
}
.skiptranslate.goog-te-gadget > span {
  display: none;
}
.goog-logo-link {
  display: none !important;
}

/* Stats Row (Always inline, shrink to fit) */
.stats-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 15px;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
  margin-top: var(--space-md);
}

.stats-card {
  flex: 1;
  padding: 15px 10px; /* fine, small padding */
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.stats-card h2 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  margin-bottom: 0;
}
.stats-card p {
  font-size: clamp(0.7rem, 2vw, 1.2rem);
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PIP Video Modal */
.pip-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.pip-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.pip-modal-content {
  width: 90%;
  max-width: 1000px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}
.pip-modal-overlay.active .pip-modal-content {
  transform: scale(1);
}
.pip-close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.pip-close-btn:hover { opacity: 1; }

.pip-video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pip-video-wrapper video {
  width: 100%; height: 100%; object-fit: cover;
}

/* ══════════════════════════════════
   MOBILE OPTIMIERUNGEN (≤ 768px)
══════════════════════════════════ */
@media screen and (max-width: 768px) {
  /* Navigation */
  .floating-logo { top: 15px; }
  .floating-logo img { height: 45px; }
  .bubble-nav-container { top: 15px; right: 15px; }
  .bubble-nav-expanded { width: 280px; padding: 20px; }
  .nav-links li a { font-size: 1rem; padding: 0.6rem 0; }

  /* Typographie */
  h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 2.2rem); }
  h3 { font-size: clamp(1.1rem, 4vw, 1.6rem); }
  h4 { font-size: clamp(0.95rem, 3.5vw, 1.2rem); }
  p  { font-size: 0.95rem; }

  /* Layout */
  .glass-lens {
    border-radius: 20px;
    padding: 1.25rem;
  }
  .glass-card { padding: var(--space-sm); border-radius: var(--radius-md); margin-bottom: var(--space-sm); }
  .hero { padding-top: var(--space-lg); }

  /* Listen linksbündig auf Mobile */
  ul, ol {
    text-align: left;
    padding-left: 1.2rem;
  }

  /* Flow-section: Text immer links */
  .flow-text {
    text-align: left;
    min-width: unset;
    width: 100%;
  }

  /* Buttons: volle Breite auf Mobile */
  .btn-primary {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    font-size: 1rem;
  }

  /* WhatsApp + AI Chat */
  .whatsapp-widget { bottom: 15px; right: 15px; }
  .ai-widget { bottom: 15px; right: 80px; }
  .ai-popup { width: 300px; max-width: 92vw; }
  .wa-popup { width: 290px; }

  /* Flex-Grid enger auf Mobile */
  .flex-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* PDF Grid */
  .pdf-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Stats kompakter */
  .stats-row { gap: 8px; }
  .stats-card { padding: 10px 6px; }

  /* Partner Logos */
  .partner-logo { flex: 0 1 130px; height: 90px; padding: 10px; }

  /* Footer Abstand vergrößern, damit Chat-Widgets nicht die Links überdecken */
  footer {
    padding-bottom: 110px !important;
  }
}

/* 🤖 AI Chat Widget Style (Liquid Glass) */
.ai-widget {
  position: fixed;
  bottom: 25px;
  right: 125px; /* Links neben WhatsApp, mit deutlichem Abstand */
  z-index: 1001; /* Erhöht, um über WhatsApp-Layer zu liegen */
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.ai-widget.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.ai-float {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, rgba(163,155,92,0.25), rgba(163,155,92,0.05));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(163,155,92,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(163,155,92,0.4);
  transition: all var(--transition-normal);
  color: var(--color-gold);
  animation: ai-pulse 2.8s infinite;
  position: relative;
}

/* Verstecke den gesamten KI Button (inkl. Sprechblase), wenn der KI Chat offen ist */
.ai-popup.active + .ai-float {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes ai-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(163,155,92,0.5); }
  60%  { box-shadow: 0 0 0 12px rgba(163,155,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(163,155,92,0); }
}

@keyframes bubble-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-5px); }
}

.ai-float:hover {
  transform: scale(1.1);
  background: var(--color-card-hover);
  box-shadow: 0 12px 40px rgba(163, 155, 92, 0.2);
}

.ai-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Chat Popup */
.ai-popup {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 420px;
  max-width: calc(100vw - 40px);
  height: 600px;
  min-height: 300px;
  max-height: calc(100vh - 40px);
  z-index: 10001;
  background: var(--color-glass);
  backdrop-filter: blur(30px) brightness(0.85); /* Helleres Milchglas */
  -webkit-backdrop-filter: blur(30px) brightness(0.85);
  border: 2px solid rgba(163, 155, 92, 0.8); /* Starker, klarer Goldrand */
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 35px rgba(163, 155, 92, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.ai-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ai-header {
  padding: 16px 20px;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-header h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-gold);
}

.ai-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ai-msg {
  max-width: 85%;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ai-msg.user {
  align-self: flex-end;
  background: var(--color-gold);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-msg.bot {
  align-self: flex-start;
  background: var(--color-card-bg);
  color: var(--color-text);
  border: 1px solid var(--color-glass-border);
  border-bottom-left-radius: 4px;
}

.ai-footer {
  padding: 16px 20px;
  background: var(--color-card-bg);
  border-top: 1px solid var(--color-glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-input {
  flex: 1;
  background: var(--color-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 20px;
  padding: 12px 16px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.ai-input::placeholder {
  color: var(--color-text-muted);
}

.ai-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(163,155,92,0.2);
}

.ai-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-gold);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Typing Indicator */
.typing {
  font-style: italic;
  font-size: 0.8rem;
  color: #888;
  margin-left: 5px;
}

/* FAQ Accordions for Mobile Optimization */
details.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 15px 0;
  margin-bottom: 0;
}
details.faq-item:last-child {
  border-bottom: none;
}
details.faq-item summary {
  color: var(--color-gold);
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 30px;
  outline: none;
}
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 300;
}
details.faq-item[open] summary::after {
  content: '−';
}
details.faq-item p {
  margin-top: 15px;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.faq-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 15px;
}
@media (max-width: 768px) {
  .flex-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Kopierschutz / Textmarkierung deaktivieren (VORSICHTIG FÜR MOBILE) */
p, h1, h2, h3, h4, h5, h6, span, li, a {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img, canvas {
    -webkit-touch-callout: none; /* Verhindert Speichern-Unter Popup auf Handys */
    -webkit-user-select: none;
    user-select: none;
}

/* Erlaubt explizit sauberes Wischen auf Touch-Interfaces (PDF Scanner, Maps, Blobs) */
iframe, .glass-lens, canvas, body, html {
    touch-action: auto;
}

/* ════════════════════════════════════════════
   Kollisionsschutz für das obere Logo
   (Verhindert das Überschneiden von Headern mit dem Logo)
════════════════════════════════════════════ */
body:not(.home) .content-wrapper > *:first-child {
    padding-top: clamp(120px, 15vh, 160px) !important;
}

@media screen and (max-width: 768px) {
    body:not(.home) .content-wrapper > *:first-child {
        /* Garantiert immer ausreichend Platz unter dem 60px grossen mobilen Logo-Bereich */
        padding-top: 110px !important; 
    }

    /* Massive Performance-Optimierung für Handys: Blur-Berechnungen halbieren! */
    .liquid-blob {
        filter: blur(70px) !important;
    }
    .glass-lens {
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    .ai-popup {
        backdrop-filter: blur(15px) brightness(0.85) !important;
        -webkit-backdrop-filter: blur(15px) brightness(0.85) !important;
    }

    /* Dynamischer App Chat Layout für Mobile (Tastatur-sicher - AN OBEN GEHEFTET) */
    .ai-popup.active {
        position: fixed !important;
        top: 15px !important;
        bottom: auto !important; /* LÖST DAS TASTATUR-PROBLEM: Der Chat drückt sich nicht mehr weg */
        right: 10px !important;
        left: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: 100vw !important;
        height: 380px !important; /* Fixe Höhe, bleibt garantiert immer ÜBER der Tastatur */
        max-height: calc(100dvh - 50px) !important;
        min-height: unset !important;
        border-radius: 20px !important;
        transform: translateY(0) scale(1) !important;
        z-index: 10000 !important;
    }
}

/* ════════════════════════════════════════════
   UNIFIED CHAT DRAWER (AI + WA)
   ════════════════════════════════════════════ */
.unified-chat-drawer {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    pointer-events: none; /* Klicks durchlassen */
}

/* Geschwungene Einbuchtung am rechten Rand */
.chat-indent-handle {
    width: 24px;
    height: 80px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.6); /* Dezenter weißer Rand um den Pfeil */
    border-right: none;
    border-radius: 40px 0 0 40px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 2;
}

.chat-indent-handle:hover {
    background: rgba(45, 45, 45, 0.95);
    width: 28px;
    border-color: var(--color-gold);
}

.chat-indent-handle svg {
    width: 14px;
    height: 14px;
    fill: var(--color-gold);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.unified-chat-drawer.open .chat-indent-handle svg {
    transform: rotate(180deg);
}

/* Ausklapp-Panel puristisch */
.chat-drawer-panel {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(163, 155, 92, 0.2);
    border-right: none;
    border-radius: 24px 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    
    /* Animation hidden state */
    transform: translateX(100%);
    opacity: 0;
    width: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.unified-chat-drawer.open .chat-drawer-panel {
    transform: translateX(0);
    opacity: 1;
    width: auto;
    padding: 20px 15px;
    pointer-events: auto;
}

/* Modifikatoren für bestehende Icons IM PANEL */
.unified-chat-drawer .chat-drawer-panel .ai-float,
.unified-chat-drawer .chat-drawer-panel .whatsapp-float {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    margin: 0 !important;
    width: 50px !important;
    height: 50px !important;
    opacity: 1 !important;
    animation: none; /* Kein wildes Pulsieren beim Basis SVG etc */
}

/* AI Icon dezent pulsieren im Panel */
.unified-chat-drawer .chat-drawer-panel .ai-float {
    animation: ai-pulse-small 3s infinite;
}

@keyframes ai-pulse-small {
  0%   { box-shadow: 0 0 0 0 rgba(163,155,92,0.3); }
  60%  { box-shadow: 0 0 0 8px rgba(163,155,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(163,155,92,0); }
}

/* Scroll Speech Bubble (Frag uns!) */
.scroll-speech-bubble {
    position: absolute;
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(163, 155, 92, 0.95);
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.scroll-speech-bubble::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(163, 155, 92, 0.95);
}

.scroll-speech-bubble.visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Wenn das Menü offen, oder ein Chatfenster offen ist, Drawer verbergen */
.unified-chat-drawer.open .scroll-speech-bubble,
.unified-chat-drawer.hidden-by-chat .scroll-speech-bubble {
    opacity: 0 !important;
    transform: translateY(-50%) translateX(10px) !important;
}

.unified-chat-drawer.hidden-by-chat {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-50%) translateX(50px) !important;
}
