/**
 * assets/css/style.css - BYTESFACTORY Modern Design
 * Überarbeitet: Clean & Minimal, Professional
 */

/* ========================================
   CSS VARIABLES (Design Token)
   ======================================== */
:root {
    /* Primary - Logo-konform #0f70b4 */
    --primary-color: #0f70b4;
    --primary-dark: #0a5a91;
    --primary-light: #2580c4;
	
	/* Legacy Colors (für Kontakt, Preise, Entsorgung) */
    --accent-green: #28a745;
    --accent-blue: #17a2b8;
    --accent-orange: #fd7e14;
    --secondary-color: #f1f5f9;
    
    /* Neutral Scale (Cool Gray) */
    --color-50: #f8fafc;
    --color-100: #f1f5f9;
    --color-200: #e2e8f0;
    --color-300: #cbd5e1;
    --color-400: #94a3b8;
    --color-500: #64748b;
    --color-600: #475569;
    --color-700: #334155;
    --color-800: #1e293b;
    --color-900: #0f172a;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Backgrounds */
    --bg-color: var(--color-50);
    --card-bg: var(--color-white);
    
    /* Text */
    --text-dark: var(--color-700);
    --text-heading: var(--color-800);
    --text-light: var(--color-500);
    
    /* Typography */
    --font-family: system-ui, -apple-system, 'Inter', 'Segoe UI', sans-serif;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Spacing (8px Grid) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Borders & Shadows */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* White Color */
    --color-white: #ffffff;
}

/* ========================================
   RESET & BASIS
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: var(--leading-normal);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Focus States für Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    line-height: var(--leading-tight);
    margin-top: 0;
}

h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
h3 { font-size: var(--font-2xl); }
h4 { font-size: var(--font-xl); }

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

strong {
    color: var(--text-heading);
    font-weight: 600;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-8);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-5);
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 50px;
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
}

.logo-light {
    display: block !important;
}

.logo-dark {
    display: none !important;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: var(--font-base);
    text-decoration: none;
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--transition-fast);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: var(--space-2);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all var(--transition-fast);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: var(--font-lg);
    transition: all var(--transition-fast);
    margin-left: var(--space-4);
    color: var(--text-dark);
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background-color: var(--card-bg);
    padding: var(--space-16) var(--space-5);
    margin-top: var(--space-5);
    text-align: center;
    margin-bottom: var(--space-10);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius-lg);
}

.hero h1 {
    color: var(--text-heading);
    font-size: var(--font-4xl);
    margin: 0 0 var(--space-4) 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero p {
    color: var(--text-light);
    font-size: var(--font-lg);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   STATISTICS SECTION (KPIs)
   ======================================== */
.stats-section {
    background-color: var(--card-bg);
    padding: var(--space-10) 0;
    margin: var(--space-10) 0;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.stat-card {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: var(--color-50);
    border-radius: var(--border-radius);
    border-top: 4px solid var(--primary-color);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: var(--font-3xl);
    margin-bottom: var(--space-2);
    display: inline-block;
}

.stat-number {
    font-size: var(--font-3xl);
    font-weight: 800;
    color: var(--primary-color);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--font-sm);
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
    padding: var(--space-10) 0;
    margin-bottom: var(--space-8);
}

.about-content {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
}

.about-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--space-2);
    flex-shrink: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-line {
    width: 3px;
    flex-grow: 1;
    background-color: var(--primary-color);
    opacity: 0.3;
    min-height: 60px;
}

.about-text h2 {
    color: var(--text-heading);
    font-size: var(--font-2xl);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.about-text p {
    color: var(--text-dark);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
    font-size: var(--font-base);
}

/* ========================================
   SERVICES GRID
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    margin: var(--space-10) 0;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-200);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Icon Bereich */
.service-card-icon {
    background-color: var(--color-50);
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--color-200);
}

.icon-large {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    transition: transform var(--transition-base);
}

.service-card:hover .icon-large {
    transform: scale(1.1);
}

.service-card-content {
    padding: var(--space-6);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    color: var(--text-heading);
    margin-bottom: var(--space-3);
    font-size: var(--font-xl);
    font-weight: 700;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: var(--space-5);
    line-height: var(--leading-relaxed);
    flex-grow: 1;
    font-size: var(--font-sm);
}

.service-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: color var(--transition-fast);
    font-size: var(--font-base);
}

.service-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: var(--font-base);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   CERTIFICATION BOX
   ======================================== */
.certification-box {
    background: var(--card-bg);
    padding: var(--space-10) var(--space-8);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: var(--space-10) 0;
    text-align: center;
    border-top: 5px solid var(--success);
}

.certification-icon {
    font-size: var(--font-4xl);
    margin-bottom: var(--space-4);
}

.certification-box h3 {
    color: var(--text-heading);
    margin: 0 0 var(--space-4) 0;
}

.certification-box p {
    color: var(--text-light);
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   CONTACT CALLOUT
   ======================================== */
.contact-callout {
    background: var(--card-bg);
    padding: var(--space-10) var(--space-8);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: var(--space-10) 0;
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.contact-callout h2 {
    color: var(--text-heading);
    margin-top: 0;
    margin-bottom: var(--space-2);
}

.contact-callout p {
    color: var(--text-light);
    margin-bottom: var(--space-6);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: var(--space-10);
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-align: left;
}

.contact-icon {
    font-size: var(--font-3xl);
}

.contact-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-text a:hover {
    text-decoration: underline;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background-color: var(--color-900);
    color: var(--color-100);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-16);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-20);
    margin-bottom: var(--space-10);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-5);
}

.footer-column {
    text-align: left;
    flex: 0 1 auto;
    max-width: 400px;
}

.footer-column h4 {
    color: var(--color-white);
    margin-bottom: var(--space-5);
    font-size: var(--font-lg);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: var(--space-2);
    display: inline-block;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: var(--space-2);
}

.footer-column a {
    color: var(--color-300);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: var(--font-sm);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-400);
    font-size: var(--font-sm);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        padding: var(--space-5);
        box-shadow: var(--shadow-md);
        gap: var(--space-3);
        border-top: 1px solid var(--color-200);
    }

    nav ul.active {
        display: flex;
    }

    nav a {
        padding: var(--space-2) 0;
        font-size: var(--font-lg);
    }

    .hero h1 {
        font-size: var(--font-3xl);
    }

    .hero {
        padding: var(--space-10) var(--space-4);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }

    .stat-number {
        font-size: var(--font-2xl);
    }

    .stat-icon {
        font-size: var(--font-2xl);
    }

    .about-content {
        flex-direction: column;
        gap: var(--space-4);
    }

    .about-timeline {
        flex-direction: row;
        padding-top: 0;
    }

    .timeline-line {
        width: auto;
        height: 3px;
        min-height: auto;
        min-width: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        gap: var(--space-5);
    }

    .contact-item {
        justify-content: center;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-8);
        align-items: center;
    }

    .footer-column {
        max-width: 100%;
        text-align: center;
    }

    .footer-column h4 {
        display: block;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
        padding: 0 var(--space-4);
    }

    .stat-card {
        padding: var(--space-4) var(--space-2);
        border-radius: var(--border-radius-sm);
    }

    .stat-number {
        font-size: var(--font-xl);
    }

    .stat-label {
        font-size: var(--font-xs);
    }

    .stat-icon {
        font-size: var(--font-xl);
        margin-bottom: var(--space-1);
    }

    .container {
        padding: 0 var(--space-4);
    }
}

/* ========================================
   HEADER IMPROVEMENTS
   ======================================== */

/* Hamburger Animation */
.menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

/* Active Nav Link als Pill */
nav a.active {
    color: var(--primary-color);
    background-color: rgba(15, 112, 180, 0.1); /* Leichtes Blau */
    padding: 6px 12px;
    border-radius: 20px;
}

nav a.active::after {
    width: 0 !important; /* Unterstrich deaktivieren */
}

/* Theme Toggle SVG Styling */
.theme-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    margin-left: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.icon-sun {
    display: none;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Dark Mode Header Border */
[data-theme="dark"] header {
    border-bottom: 1px solid #334155;
}

/* Mobile Menu Animation */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        padding: 0;
        box-shadow: var(--shadow-md);
        gap: 0;
        border-top: 1px solid var(--color-200);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    nav ul.active {
        display: flex;
        max-height: 300px; /* Genug Platz für 4 Items */
    }

    nav ul li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--color-100);
    }

    nav a:last-child {
        border-bottom: none;
    }
}

/* ========================================
   FOOTER IMPROVEMENTS
   ======================================== */

/* Footer Gap reduzieren */
.footer-content {
    gap: var(--space-12); /* 3rem statt 5rem */
}

/* Back-to-Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Copyright Zeile aufwerten */
.footer-bottom {
    text-align: center;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-400);
    font-size: var(--font-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.footer-logo-small {
    width: 40px;
    height: auto;
    opacity: 0.7;
    margin-bottom: var(--space-2);
}

/* ========================================
   RESPONSIVE FOOTER
   ======================================== */
@media (max-width: 768px) {
    .footer-content {
        gap: var(--space-8);
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}