/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 4 — UI/UX Utility-Klassen
   Inline-Style-Extraktion · z-index-System · Backdrop-Blur-Standard
   (c) 2026 MH IT-Dienstleistungen
   ═══════════════════════════════════════════════════════════════════════════ */

/* ========================================================
   1. Z-INDEX HIERARCHIE (zentrales System)
   ========================================================
   Alle z-index-Werte der gesamten Seite. Nie z-index inline
   setzen — immer eine dieser Klassen oder Variablen verwenden.
   ======================================================== */
:root {
  --z-background:     1;
  --z-section-decor:  5;
  --z-section-content: 10;
  --z-sticky:         40;
  --z-nav:            50;
  --z-whatsapp:       60;
  --z-cookie-banner:  100;
  --z-modal-backdrop: 150;
  --z-modal:          200;
  --z-toast:          300;
}

/* ========================================================
   2. BACKDROP-BLUR STANDARD (3 Stufen)
   ========================================================
   Konsistente Blur-Stufen für alle Glass-Effekte.
   ======================================================== */
.blur-light {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.blur-medium {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.blur-heavy {
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
}

/* ========================================================
   3. MODAL-OVERLAY (gemeinsam für alle Modals)
   ======================================================== */
.modal-overlay {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overscroll-behavior: contain;
}

.modal-overlay-dark {
  background: rgba(0, 0, 0, 0.65);
  overscroll-behavior: contain;
}

/* ========================================================
   4. COOKIE-BANNER KLASSEN
   ======================================================== */
.cookie-banner-card {
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.25rem 1.5rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.cookie-banner-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 128px;
  height: 128px;
  background: rgba(249, 115, 22, 0.15);
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
}

.cookie-banner-body {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.cookie-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #292524;
  border: 1px solid #57534e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

.cookie-banner-icon span {
  font-size: 1.25rem;
}

.cookie-banner-title {
  color: #fff;
  font-weight: 900;
  font-size: 1.125rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.cookie-banner-text {
  color: #d6d3d1;
  font-size: 0.8125rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-banner-link {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.cookie-btn {
  flex: 1;
  min-width: 130px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.cookie-btn-secondary {
  border: 1px solid #57534e;
  background: #292524;
  color: #d6d3d1;
}

.cookie-btn-secondary:hover {
  color: #fff;
  border-color: #78716c;
}

.cookie-btn-primary {
  border: none;
  background: #f97316;
  color: #fff;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

.cookie-btn-primary:hover {
  background: #fb923c;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.6);
}

/* ========================================================
   5. FOOTER TRUST-BADGES
   ======================================================== */
.trust-badge {
  background: rgba(41, 37, 36, 0.8);
  border: 1px solid rgba(120, 113, 108, 0.25);
}

/* ========================================================
   6. LEGAL-MODAL KLASSEN (Datenschutz/Impressum)
   ======================================================== */
.legal-modal-card {
  max-height: 88vh;
}

.legal-modal-accent-line {
  height: 2px;
  width: 2.5rem;
  background: #f97316;
}

.legal-modal-badge {
  color: #f97316;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.legal-modal-heading {
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.legal-modal-search {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-modal-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.legal-modal-impressum-badge {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #f97316;
}

/* ========================================================
   7. SECTION-HINTERGRUND-KLASSEN
   ======================================================== */
.section-bg-white {
  background: #ffffff;
}

.section-bg-canvas {
  background: #F5F5F7;
}

/* ========================================================
   8. HERO KLASSEN
   ======================================================== */
.hero-overlay-gradient {
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.10) 0%,
    transparent 22%,
    transparent 65%,
    rgba(0, 0, 0, 0.30) 100%
  );
}

.hero-cta-primary {
  background: #FF9500;
  box-shadow: 0 8px 32px rgba(255, 149, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ========================================================
   9. PREISE-SECTION KLASSEN
   ======================================================== */
.preise-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.preise-card-gradient {
  background: linear-gradient(to bottom, transparent, rgba(0, 81, 213, 0.03));
  border-radius: 22px;
}

.preise-card-highlight {
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  outline: 2.5px solid #0051D5;
  box-shadow: 0 20px 60px rgba(0, 122, 255, 0.15), 0 8px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.preise-badge-blue {
  background: #0051D5;
  box-shadow: 0 8px 16px rgba(0, 81, 213, 0.2);
}

.preise-badge-orange {
  background: #FF9500;
  box-shadow: 0 8px 16px rgba(255, 149, 0, 0.2);
}

.preise-badge-green {
  background: #34C759;
  box-shadow: 0 8px 16px rgba(52, 199, 89, 0.2);
}

.preise-info-box-blue {
  background: rgba(0, 81, 213, 0.08);
}

.preise-info-box-orange {
  background: rgba(255, 149, 0, 0.08);
}

.preise-sidebar {
  background: #ffffff;
  border-radius: 22px;
  border-left: 4px solid #0051D5;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 1.5rem 2rem;
  margin-left: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.preise-sidebar:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.preise-sidebar-inner {
  background: rgba(0, 81, 213, 0.04);
}

/* ========================================================
   10. CTA-SECTION KLASSEN
   ======================================================== */
.cta-card-orange {
  background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
  border: 1px solid rgba(255, 149, 0, 0.25);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 4px 24px rgba(255, 149, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.cta-card-green {
  background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 4px 24px rgba(34, 197, 94, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   11. VORTEILE-SECTION KLASSEN
   ======================================================== */
.vorteile-icon-ring {
  background: rgba(0, 81, 213, 0.15);
  border: 1px solid rgba(0, 81, 213, 0.3);
  box-shadow: 0 0 15px rgba(0, 81, 213, 0.2);
}

.vorteile-icon-text {
  color: #0051D5;
}

.vorteile-caption {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.vorteile-caption-text {
  color: #999;
}

/* ========================================================
   12. REFERENZEN-SECTION KLASSEN
   ======================================================== */
.referenzen-card-old {
  background: #ffffff;
  border: 2px solid rgba(239, 68, 68, 0.15);
  border-radius: 2rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 32px rgba(239, 68, 68, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ========================================================
   13. WERKSTATT-SECTION KLASSEN
   ======================================================== */
.ws-modal-dark {
  max-height: 90vh;
  background: linear-gradient(160deg, #1a1208, #0d0a06);
  border: 1px solid rgba(170, 122, 35, 0.4);
}

.ws-modal-heading {
  color: #ffd050;
}

.ws-modal-subtext {
  color: #aaa;
}

/* ========================================================
   14. RECHNER MODAL-OVERLAY
   ======================================================== */
.calc-modal-overlay {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overscroll-behavior: contain;
}

/* ========================================================
   15. DIARY/REPORT PDF-PRINT KLASSEN
   ======================================================== */
.pdf-container {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 800px;
  z-index: -1000;
}

.pdf-page {
  padding: 40px;
  background-color: #ffffff;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  text-align: left;
  display: block;
}

.pdf-header {
  border-bottom: 3px solid #1D1D1F;
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.pdf-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.pdf-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pdf-header-brand img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.pdf-header-title {
  font-size: 28px;
  font-weight: 900;
  margin: 0;
  color: #1D1D1F !important;
}

.pdf-header-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #6E6E73 !important;
  margin: 3px 0 0 0;
}

.pdf-header-info {
  text-align: right;
  line-height: 1.4;
  max-width: 220px;
}

.pdf-disclaimer {
  background-color: #F5F5F7;
  padding: 20px;
  border-radius: 12px;
  border-left: 6px solid #FF9500;
  margin-bottom: 28px;
}

/* ========================================================
   16. HONEYPOT FELD (Anti-Spam)
   ======================================================== */
.honeypot-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ========================================================
   17. TOUCH-TARGET MINIMUM (44×44px)
   ======================================================== */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Alle interaktiven Elemente im Modal */
.modal-content button,
.modal-content a,
.modal-content input,
.modal-content select,
.modal-content [role="button"],
.modal-content [role="tab"] {
  min-height: 44px;
}

/* Fix: Close-Buttons in Modals immer perfekt rund halten.
   min-height: 44px oben macht runde Buttons oval (40×44px).
   aspect-ratio: 1 erzwingt gleiche Breite/Höhe → Kreis. */
.modal-overlay button.rounded-full,
.modal-content button.rounded-full {
  aspect-ratio: 1 !important;
  min-height: unset !important;
  min-width: unset !important;
}

/* Footer Links */
footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Cookie-Banner Buttons */
.cookie-btn {
  min-height: 44px;
}

/* ========================================================
   18. ACCESSIBILITY HELPERS (WCAG 2.1 AA)
   ======================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus-Visible Ring (konsistent für alle interaktiven Elemente) */
:focus-visible {
  outline: 2px solid var(--apple-blue, #0051D5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--apple-blue, #0051D5);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 4 — Mobile Optimizations für Preise & Pakete Section
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ Optimization 1: Touch-targets für Info-Icons (WCAG 44×44px) ═══ */
#preise button[onclick*="showInfo"] {
    position: relative;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ═══ Optimization 2: Bodenplatte Mobile Fix ═══ */
@media (max-width: 640px) {
    .bodenplatte-card {
        margin-left: 0 !important;
        padding: 1.25rem 1.25rem !important;
    }
}

/* ═══ Optimization 4: WhatsApp FAB Mobile Offset ═══ */
@media (max-width: 640px) {
    #whatsapp-float {
        bottom: 90px !important;
    }
}

/* ═══ Optimization 5: Summary Box Mobile Breathing Room ═══ */
@media (max-width: 640px) {
    #preise [class*="border-t"][class*="bg-"] .text-xs {
        line-height: 1.6;
    }
}
