/* --- 1. FONTS --- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-v20-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-v20-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-v20-latin-700.woff2') format('woff2'); }

/* --- 2. BASIS & STICKY FOOTER --- */
:root {
    --primary: #0f4c81; --accent: #3b82f6; --dark: #0f172a;
    --text: #334155; --text-light: #64748b; --bg-light: #f8fafc;
    --white: #ffffff; --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; display: flex; flex-direction: column; min-height: 100vh; 
    color: var(--text); background: var(--bg-light); 
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word; hyphens: auto; 
    
    /* KOPIERSCHUTZ BASIS: Verhindert Textmarkierungen & Mobile-Menüs */
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-touch-callout: none;
}
main { flex: 1; width: 100%; } 
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- 3. HEADER & SPRACHSCHALTER --- */
header#main-header {
    position: fixed; top: 25px; left: 50%; transform: translateX(-50%);
    width: 94%; max-width: var(--max-width); height: 85px;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0,0,0,0.08); border-radius: 100px;
    display: flex; align-items: center; justify-content: space-between; z-index: 9999;
    transition: all 0.4s ease;
    padding: 0 30px; 
}
header#main-header.scrolled { top: 10px; width: 98%; height: 70px; background: rgba(255, 255, 255, 0.98); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

.header-inner-pill { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }

/* LOGO: mix-blend-mode für Transparenz + KLICKBARKEIT TROTZ SCHUTZ */
.logo-container img { 
    height: 75px; width: auto; display: block; transition: 0.3s; mix-blend-mode: multiply; 
    pointer-events: auto !important; /* WICHTIG: Erlaubt Klicks auf das Logo trotz globaler Sperre */
}
header#main-header.scrolled .logo-container img { height: 50px; }

nav { display: flex; align-items: center; gap: 20px; }
nav ul { display: flex; list-style: none; gap: 20px; align-items: center; }
nav a { text-decoration: none; color: var(--dark); font-weight: 700; font-size: 0.95rem; }

.lang-toggle { display: flex; background: #e2e8f0; border-radius: 30px; padding: 4px; margin-left: 10px; align-items: center; }
.lang-toggle button { background: transparent; border: none; padding: 6px 14px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; color: var(--text-light); cursor: pointer; transition: 0.3s; font-family: inherit; }
.lang-toggle button.active { background: var(--white); color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* --- 3.1 NEUE FUNKTIONEN (PWA, BURGER) --- */
.pulse-button {
    background: var(--accent); color: white; border: none; padding: 8px 18px;
    border-radius: 50px; font-weight: 700; font-size: 0.75rem; cursor: pointer;
    animation: pulse-animation 2s infinite; white-space: nowrap; transition: 0.3s;
}
@keyframes pulse-animation {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 122, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}

@media (min-width: 769px) { .header-center-mobile { display: none !important; } }
@media (max-width: 768px) { #pwaInstallBtnDesktopContainer, #pwaInstallBtnDesktop { display: none !important; } }

.burger-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 10001; padding: 5px; }
.burger-btn span { width: 25px; height: 3px; background: var(--dark); border-radius: 3px; transition: 0.3s ease-in-out; }
.burger-btn.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: translateX(10px); }
.burger-btn.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-nav-overlay {
    position: fixed; top: 115px; right: 3%; width: auto; min-width: 220px; max-height: 0;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 10000; display: flex; flex-direction: column; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 30px; border: 1px solid rgba(0,0,0,0.08);
    opacity: 0; pointer-events: none; box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.mobile-nav-overlay.active { max-height: 400px; opacity: 1; pointer-events: auto; padding: 20px 0; }
.mobile-nav-overlay ul { list-style: none; text-align: center; }
.mobile-nav-overlay ul li a { font-size: 1.1rem; font-weight: 700; color: var(--dark); text-decoration: none; padding: 12px 30px; display: block; }

.hidden { display: none !important; }

/* --- 4. ZWEISPRACHIGKEITS-LOGIK --- */
.lang-de, .lang-en { display: none !important; }
body.show-de .lang-de { display: inline-block !important; }
body.show-en .lang-en { display: inline-block !important; }

/* --- 5. SEKTIONEN, GRIDS & KARTEN --- */
.first-section { padding-top: 200px !important; }
section { padding: 100px 0; width: 100%; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 60px; font-weight: 700; color: var(--dark); }

.hero { min-height: 85vh; display: flex; align-items: center; text-align: center; }

.grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { 
    background: var(--white); padding: 35px 25px; border-radius: 30px; 
    border: none !important; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.04); 
    transition: 0.4s; text-decoration: none; color: inherit; display: flex; flex-direction: column; 
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 30px 60px rgba(0,0,0,0.08), 0 0 0 2px var(--accent); 
}
.card i { color: var(--accent); margin-bottom: 25px; display: block; }
.card h3 { margin-bottom: 10px; font-size: 1.3rem; }

/* Accordion */
.accordion-wrapper { max-width: 850px; margin: 0 auto; }
.accordion-item { background: var(--white); border-radius: 20px; margin-bottom: 15px; border: none; box-shadow: 0 10px 25px rgba(0,0,0,0.03); overflow: hidden; transition: 0.3s; }
.accordion-header { padding: 25px 30px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.accordion-content { max-height: 0; padding: 0 30px; transition: 0.4s ease; overflow: hidden; }
.accordion-item.active { box-shadow: 0 15px 35px rgba(0,0,0,0.06), 0 0 0 2px var(--accent); }
.accordion-item.active .accordion-content { max-height: 600px; padding: 0 30px 30px; }

/* Content für Unterseiten & Rechtstexte */
.legal-content { text-align: left; max-width: 900px; margin: 0 auto; padding-top: 180px; padding-bottom: 80px; }
.legal-content h1 { font-size: 2.5rem; color: var(--primary); margin-bottom: 40px; text-align: center; }
.legal-content h2 { color: var(--primary); margin-top: 45px; margin-bottom: 15px; font-size: 1.6rem; }
.legal-content h3 { color: var(--primary); margin-top: 25px; margin-bottom: 10px; font-size: 1.2rem; }
.legal-content p { margin-bottom: 20px !important; line-height: 1.8; display: block; } 
.legal-content ul { margin-bottom: 25px; padding-left: 20px; list-style: disc; }
.legal-content li { margin-bottom: 12px; line-height: 1.8; }
.legal-content a { color: var(--accent); text-decoration: underline; }

/* Formulare & Hub - Schwebend */
.contact-form-container, .ticket-container, .hub-container {
    max-width: 650px; margin: 0 auto; background: var(--white); padding: 40px; 
    border-radius: 30px; border: none; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.04); 
}

/* --- 6. FOOTER --- */
footer { background: var(--dark); color: white; padding: 60px 0; text-align: center; margin-top: auto; }
.footer-links { margin-bottom: 25px; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; margin: 0 15px; font-size: 0.95rem; }
.footer-links a:hover { color: white; }
.footer-copy { opacity: 0.4; font-size: 0.85rem; }
.ustg-notice { font-size: 0.75rem; opacity: 0.4; margin-top: 20px; font-style: italic; }

/* --- 7. MOBILE OPTIMIERUNG --- */
@media (max-width: 768px) {
    header#main-header { width: 98%; top: 10px; height: 70px; padding: 0 15px; } 
    .logo-container img { height: 32px !important; } 
    header#main-header.scrolled .logo-container img { height: 28px !important; }
    nav#desktop-nav { display: none; }
    .burger-btn { display: flex; }
    .header-center-mobile { display: flex; flex: 1; justify-content: center; }
    .lang-toggle { margin-left: 0; padding: 3px; }
    .lang-toggle button { padding: 4px 8px; font-size: 0.75rem; }
    .first-section { padding-top: 150px !important; }
    body.scrolled-active .mobile-nav-overlay { top: 85px; }
    .legal-content { padding-top: 120px; padding-bottom: 40px; }
    .legal-content h1 { font-size: 1.8rem; margin-bottom: 25px; }
    .legal-content h2 { font-size: 1.4rem; margin-top: 30px; }
    .legal-content p, .legal-content li { font-size: 0.95rem; line-height: 1.6; }
}

/* --- 8. FLOATING CHAT WIDGET --- */
.chat-widget-btn {
    position: fixed; bottom: 30px; right: 30px; background: var(--primary); color: white; 
    width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; 
    cursor: pointer; box-shadow: 0 5px 20px rgba(15, 76, 129, 0.4); z-index: 10000; transition: all 0.3s ease; border: none;
    pointer-events: auto !important; /* KLICKBAR TROTZ SCHUTZ */
}
.chat-widget-btn:hover { transform: scale(1.1); }
.chat-widget-btn i { pointer-events: none; } 

.chat-widget-panel {
    position: fixed; bottom: 100px; right: 30px; width: 350px; height: 450px; 
    background: white; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); 
    display: none; flex-direction: column; z-index: 10000; overflow: hidden; border: none;
    pointer-events: auto !important; /* INTERAKTIV TROTZ SCHUTZ */
}
.chat-widget-panel.open { display: flex; animation: slideUp 0.3s ease; }
.chat-header { background: var(--primary); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f8fafc; }
.chat-footer { padding: 10px 15px; background: #f0f2f5; display: flex; gap: 10px; align-items: center; }
.chat-footer input { flex: 1; padding: 12px 20px; border-radius: 25px; border: none; outline: none; background: white; pointer-events: auto !important; }
.chat-send-btn { background: #25D366; color: white; border: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; pointer-events: auto !important; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media(max-width: 480px) { 
    .chat-widget-btn { bottom: 20px; right: 20px; width: 55px; height: 55px; }
    .chat-widget-panel { width: 90%; right: 5%; bottom: 85px; height: 400px; } 
}

/* --- 9. GLOBALER KOPIERSCHUTZ (BILDER) --- */
img {
    -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;
    pointer-events: none; /* Macht Bilder für Klicks "unsichtbar" -> kein Rechtsklick-Menü */
}
