/* Modern German/European Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap');

:root {
    /* Color Palette - Inspired by German Design */
    --primary-dark: #1a1a1a;
    --primary-charcoal: #2d2d2d;
    --accent-slate: #4a5568;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --background-white: #ffffff;
    --background-light: #f7fafc;
    --background-warm: #fafafa;
    --accent-warm: #e2e8f0;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --accent-red: #c53030;
    --accent-green: #38a169;
    --accent-blue: #3182ce;
    
    /* Typography Scale */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Layout */
    --max-width: 1280px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-md);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 400;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.7;
}

/* Layout Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

/* Navigation - Clean German Style */
.navbar {
    background: var(--background-white);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-md) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.nav-logo .brand-primary {
    color: var(--primary-dark);
    font-size: 2.2rem;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    margin: 0;
}

.nav-logo .brand-secondary {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
    margin: 0;
    margin-top: -2px;
    line-height: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--primary-charcoal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-dark);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: var(--space-xs);
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--primary-dark);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section - Minimalist German Approach */
.hero {
    background: linear-gradient(135deg, var(--background-white) 0%, var(--background-light) 100%);
    color: var(--text-primary);
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(247,250,252,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons - Clean European Style */
.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
    min-width: 140px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--background-white);
    box-shadow: 0 4px 14px 0 rgba(26, 26, 26, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-charcoal);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(26, 26, 26, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--background-white);
    border-color: var(--primary-dark);
}

/* Hero section button overrides for better readability */
.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Services Section */
.services {
    padding: var(--space-3xl) 0;
    background: var(--background-white);
}

.services h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--primary-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.service-card {
    background: var(--background-white);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    text-align: left;
    transition: var(--transition);
    position: relative;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px 0 rgba(26, 26, 26, 0.08);
    border-color: var(--border-medium);
}

.service-card h3 {
    margin-bottom: var(--space-md);
    color: var(--primary-dark);
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA Section */
.cta {
    padding: var(--space-3xl) 0;
    background: var(--background-light);
    text-align: center;
}

.cta h2 {
    margin-bottom: var(--space-md);
    color: var(--primary-dark);
}

.cta p {
    margin-bottom: var(--space-xl);
    font-size: 1.125rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--background-white);
    padding: var(--space-xl) 0;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-xs);
}

/* Forms - Clean German Design */
.form-container {
    max-width: 800px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl);
    background: var(--background-white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    background: var(--background-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-medium);
    padding: var(--space-xl);
    text-align: center;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--background-warm);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary-dark);
    background-color: var(--background-light);
}

.file-upload p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

/* Progress and Status */
.upload-progress {
    width: 100%;
    height: 8px;
    background: var(--background-light);
    border-radius: 4px;
    overflow: hidden;
    margin: var(--space-sm) 0;
    display: none;
}

.progress-bar {
    height: 100%;
    background: var(--primary-dark);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.error {
    background: var(--accent-red);
    color: var(--background-white);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    display: none;
    font-weight: 500;
}

.success {
    background: var(--accent-green);
    color: var(--background-white);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    display: none;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .nav-container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 79px;
        flex-direction: column;
        background-color: var(--background-white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        padding: var(--space-xl) 0;
        border-top: 1px solid var(--border-light);
        gap: var(--space-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .service-card {
        padding: var(--space-lg);
    }
    
    .form-container {
        margin: var(--space-lg) auto;
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .nav-container {
        padding: 0 var(--space-sm);
    }
    
    .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }
    
    .btn {
        padding: var(--space-md) var(--space-lg);
        min-width: 120px;
    }
}

/* Resource Cards */
.resource-card {
    background: var(--background-white);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px 0 rgba(26, 26, 26, 0.08);
    border-color: var(--border-medium);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    gap: var(--space-sm);
}

.resource-header h3 {
    color: var(--primary-dark);
    font-size: 1.25rem;
    margin-bottom: 0;
    flex: 1;
}

.resource-type {
    background: var(--background-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.resource-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.topic-tag {
    background: var(--accent-warm);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

.resource-card p {
    flex: 1;
    margin-bottom: var(--space-md);
}

.resource-card .btn {
    align-self: flex-start;
    margin-top: var(--space-sm);
}

/* Image Styling - Modern European Aesthetic */
.hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7) 0%, rgba(26, 26, 26, 0.4) 100%);
    z-index: 1;
}

.hero-image .hero-content {
    position: relative;
    z-index: 2;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    transition: var(--transition);
}

.service-card:hover .service-image {
    transform: scale(1.02);
}

.process-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 24px 0 rgba(26, 26, 26, 0.12);
    transition: var(--transition);
}

.process-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px 0 rgba(26, 26, 26, 0.16);
}

.feature-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--space-lg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 14px 0 rgba(26, 26, 26, 0.1);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px 0 rgba(26, 26, 26, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(26, 26, 26, 0.8));
    color: white;
    padding: var(--space-lg) var(--space-md) var(--space-md);
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.image-placeholder {
    background: linear-gradient(135deg, var(--background-light) 0%, var(--accent-warm) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    min-height: 200px;
}

.icon-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto var(--space-md);
    filter: contrast(1.2) brightness(0.9);
}

/* Technology Showcase */
.tech-showcase {
    background: var(--primary-dark);
    color: var(--background-white);
    position: relative;
    overflow: hidden;
}

.tech-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.tech-showcase .container {
    position: relative;
    z-index: 2;
}

.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.before-after img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Image Handling */
@media (max-width: 768px) {
    .service-image {
        height: 150px;
    }
    
    .process-image {
        height: 200px;
    }
    
    .feature-image {
        height: 250px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .before-after {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .before-after img {
        height: 200px;
    }
}

/* Image Loading and Performance */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

/* WebP Support */
.webp .hero {
    background-image: url('images/hero-manufacturing.webp');
}

.no-webp .hero {
    background-image: url('images/hero-manufacturing.jpg');
}