/* ============================================
   DARK MODE - Complete Color System
   ============================================ */

:root {
    /* Light Mode Colors (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    
    /* Brand Colors */
    --brand-primary: #2563eb;
    --brand-primary-dark: #1e40af;
    --brand-primary-light: #3b82f6;
    --brand-secondary: #64748b;
    --brand-accent: #0ea5e9;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    --shadow-lg: rgba(0, 0, 0, 0.8);
    
    /* Brand Colors - darker, more pleasant tones for dark mode */
    --brand-primary: #2563eb;
    --brand-primary-dark: #1e40af;
    --brand-primary-light: #3b82f6;
    --brand-secondary: #94a3b8;
    --brand-accent: #0ea5e9;
    
    /* Status Colors */
    --success: #22c55e;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #3b82f6;
}

/* ============================================
   BASE ELEMENTS
   ============================================ */

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-primary);
}

a {
    color: var(--brand-primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-primary-light);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.header.scrolled {
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.nav-list a {
    color: var(--text-primary);
}

.nav-list a:hover {
    color: var(--brand-primary);
}

.nav-list a.active {
    color: var(--brand-primary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white !important;
}

/* Mobile menu */
@media (max-width: 768px) {
    .main-nav {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 30px var(--shadow-lg);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.8));
}

[data-theme="dark"] .hero-overlay {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.95), rgba(15, 23, 42, 0.9));
}

.hero-title,
.hero-subtitle {
    color: white;
}

.hero-contact a {
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.hero-contact a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */

.section {
    background-color: var(--bg-primary);
}

.why-section,
.services-section,
.features-section,
.testimonials-section,
.faq-section,
.cta-section {
    background-color: var(--bg-primary);
}

/* Alternating backgrounds */
.services-section {
    background-color: var(--bg-secondary);
}

.testimonials-section {
    background-color: var(--bg-secondary);
}

.card,
.benefit-card,
.service-card,
.feature-card,
.testimonial-card,
.faq-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
}

.card:hover,
.benefit-card:hover,
.service-card:hover,
.feature-card:hover {
    box-shadow: 0 8px 24px var(--shadow-hover);
    transform: translateY(-4px);
}

.service-card {
    color: var(--text-primary);
}

.service-card h3 {
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
}

.service-link {
    color: var(--brand-primary);
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

input,
textarea,
select {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

label {
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

footer,
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

footer h3,
footer h4 {
    color: var(--text-primary);
}

footer a {
    color: var(--text-secondary);
}

footer a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
}

/* ============================================
   TABLES
   ============================================ */

table {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

thead {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--bg-tertiary);
}

th, td {
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* ============================================
   BLOG & CONTENT
   ============================================ */

.blog-post,
.post-card,
.article {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.blog-post h1,
.blog-post h2,
.blog-post h3 {
    color: var(--text-primary);
}

.blog-post p,
.blog-post li {
    color: var(--text-primary);
}

.post-meta {
    color: var(--text-tertiary);
}

[data-theme="dark"] .blog-post img,
[data-theme="dark"] img {
    opacity: 0.9;
}

/* ============================================
   FLOATING BUTTONS (Suche, Theme, WhatsApp, Sprache, Cookies)
   ============================================ */

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-60px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.7;
}

.theme-toggle svg {
    color: var(--text-primary);
    fill: currentColor;
}

.theme-toggle:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-60px) scale(1.1);
    opacity: 1;
}

.theme-toggle:active {
    transform: translateY(-60px) scale(0.95);
}

/* Search Button */
.search-button-fixed {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-120px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.7;
}

.search-button-fixed svg {
    color: var(--text-primary);
    fill: currentColor;
}

.search-button-fixed:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-120px) scale(1.1);
    opacity: 1;
}

/* WhatsApp Button */
.whatsapp-button-fixed {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(0px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.7;
    text-decoration: none;
}

.whatsapp-button-fixed svg {
    color: var(--text-primary);
    fill: currentColor;
}

.whatsapp-button-fixed:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(0px) scale(1.1);
    opacity: 1;
}

/* Language Button */
.language-button-fixed {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(60px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.7;
}

.language-button-fixed svg {
    color: var(--text-primary);
    fill: currentColor;
}

.language-button-fixed:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(60px) scale(1.1);
    opacity: 1;
}

.lang-code-small {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}

/* Language Menu */
.language-menu-fixed {
    position: fixed;
    right: 80px;
    top: 50%;
    transform: translateY(60px);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    padding: 8px;
    z-index: 9998;
    min-width: 180px;
}

.lang-menu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.lang-menu-option:hover {
    background: var(--bg-secondary);
}

.lang-menu-option.active {
    background: var(--brand-primary);
    color: #ffffff;
}

.lang-flag-text {
    font-weight: 600;
    min-width: 28px;
}

.lang-name-text {
    font-size: 14px;
}

/* Cookie Settings Button */
.cookie-settings-button {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(120px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.7;
}

.cookie-settings-button svg {
    color: var(--text-primary);
    fill: currentColor;
}

.cookie-settings-button.hidden {
    display: none;
}

.cookie-settings-button:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(120px) scale(1.1);
    opacity: 1;
}

.cookie-settings-button:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(120px) scale(1.1);
    opacity: 1;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .theme-toggle {
        top: 50%;
        transform: translateY(-60px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .theme-toggle:hover {
        transform: translateY(-60px) scale(1.1);
    }
    
    .search-button-fixed {
        top: 50%;
        transform: translateY(-110px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .search-button-fixed:hover {
        transform: translateY(-110px) scale(1.1);
    }
    
    .whatsapp-button-fixed {
        top: 50%;
        transform: translateY(-5px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .whatsapp-button-fixed:hover {
        transform: translateY(-5px) scale(1.1);
    }
    
    .cookie-settings-button {
        top: 50%;
        transform: translateY(100px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .cookie-settings-button:hover {
        transform: translateY(100px) scale(1.1);
    }
    
    .language-button-fixed {
        top: 50%;
        transform: translateY(50px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .language-button-fixed:hover {
        transform: translateY(50px) scale(1.1);
    }
    
    .language-menu-fixed {
        right: 65px;
        top: 50%;
        transform: translateY(50px);
    }
}

/* ============================================
   UTILITIES
   ============================================ */

/* Prevent transition on page load */
body.no-transition,
body.no-transition * {
    transition: none !important;
}

/* Print styles - always light mode */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .theme-toggle,
    .search-button-fixed,
    .whatsapp-button-fixed,
    .language-button-fixed,
    .cookie-settings-button,
    .language-menu-fixed {
        display: none !important;
    }
}
    color: #ffffff;
    transform: translateY(60px) scale(1.1);
    opacity: 1;
}

.lang-code-small {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}

.language-menu-fixed {
    position: fixed;
    right: 80px;
    top: 50%;
    transform: translateY(60px);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    padding: 8px;
    z-index: 9998;
    min-width: 180px;
}

.lang-menu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.lang-menu-option:hover {
    background: var(--bg-secondary);
}

.lang-menu-option.active {
    background: var(--brand-primary);
    color: #ffffff;
}

.lang-flag-text {
    font-weight: 600;
    min-width: 28px;
}

.lang-name-text {
    font-size: 14px;
}

/* Cookie Consent Button (when banner is hidden) */
.cookie-settings-button {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(120px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 9999;
    opacity: 0.3;
}

.cookie-settings-button.hidden {
    display: none;
}

.cookie-settings-button:hover {
    background: var(--brand-primary);
    color: #ffffff;
    transform: translateY(120px) scale(1.1);
    opacity: 1;
}

/* Language Switcher - Fixed in Footer */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.language-switcher:hover {
    background: var(--bg-tertiary);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.lang-toggle i {
    font-size: 14px;
}

.lang-options {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    padding: 8px;
    min-width: 200px;
    z-index: 1000;
}

.language-switcher:not(.collapsed) .lang-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

.lang-option:hover {
    background: var(--bg-tertiary);
}

.lang-option.active {
    background: var(--brand-primary);
    color: #ffffff;
}

.lang-flag {
    font-size: 14px;
    font-weight: 600;
    min-width: 30px;
}

.lang-code {
    font-weight: 500;
}

.lang-name {
    color: var(--text-secondary);
    font-size: 12px;
}

/* No transition class to prevent flash on load */
.no-transition,
.no-transition * {
    transition: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-toggle {
        top: 50%;
        transform: translateY(-60px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .theme-toggle:hover {
        transform: translateY(-60px) scale(1.1);
    }
    
    .search-button-fixed {
        top: 50%;
        transform: translateY(-110px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .search-button-fixed:hover {
        transform: translateY(-110px) scale(1.1);
    }
    
    .whatsapp-button-fixed {
        top: 50%;
        transform: translateY(-5px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .whatsapp-button-fixed:hover {
        transform: translateY(-5px) scale(1.1);
    }
    
    .cookie-settings-button {
        top: 50%;
        transform: translateY(100px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .cookie-settings-button:hover {
        transform: translateY(100px) scale(1.1);
    }
    
    .language-button-fixed {
        top: 50%;
        transform: translateY(50px);
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .language-button-fixed:hover {
        transform: translateY(50px) scale(1.1);
    }
    
    .language-menu-fixed {
        right: 65px;
        top: 50%;
        transform: translateY(50px);
    }
}

/* Print styles - always light mode */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .theme-toggle,
    .language-switcher {
        display: none !important;
    }
}
