/* =========================================
   1. GLOBALE EINSTELLUNGEN & VARIABLEN (DARK MODE)
   ========================================= */
:root {
    /* Farben */
    --primary-color: #A31621;   /* Das Hoffmann Rot */
    --primary-hover: #c91f2c;   /* Helleres Rot für Hover */
    
    /* Dark Mode Palette */
    --bg-body: #121212;         /* Sehr dunkler Hintergrund (fast schwarz) */
    --bg-card: #1e1e1e;         /* Karten-Hintergrund (Dunkelgrau) */
    --bg-input: #2d2d2d;        /* Eingabefelder */
    
    /* Text Farben */
    --text-main: #e0e0e0;       /* Haupttext (Fast Weiß) */
    --text-muted: #a0a0a0;      /* Nebentext (Grau) */
    --text-inverse: #ffffff;    /* Text auf Rot */
    
    /* Borders & Shadows */
    --border-color: #333333;
    --shadow: 0 8px 16px rgba(0,0,0,0.5); /* Stärkerer Schatten für Darkmode */
    --glass-bg: rgba(30, 30, 30, 0.85);   /* Für Overlays */
}

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

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

/* =========================================
   2. HEADER & ANIMIERTE NAVIGATION
   ========================================= */
header {
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
    letter-spacing: 1px;
}

.logo span {
    color: var(--text-main);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

/* Links Styling */
nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

/* Die animierte Linie */
nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav a:hover::after,
nav a.active::after {
    transform: scaleX(1);
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

/* Burger Menu Icon */
.burger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.burger-bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: 0.3s;
    border-radius: 2px;
}

/* =========================================
   3. HERO SEKTION & BUTTONS
   ========================================= */
.hero {
    /* Dunkleres Overlay über dem Bild */
    background: linear-gradient(rgba(18, 18, 18, 0.85), rgba(18, 18, 18, 0.7)), url('https://source.unsplash.com/1600x900/?industry,machine');
    background-size: cover;
    background-position: center;
    color: var(--text-main);
    text-align: center;
    padding: 100px 20px;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #ccc;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(163, 22, 33, 0.4); /* Rotes Leuchten beim Hover */
}

/* =========================================
   4. LAYOUT & SEKTIONEN
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.text-block h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.text-block p {
    color: var(--text-muted);
}

/* Features (USPs) */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    border: 1px solid var(--border-color); /* Feine Linie zur Abgrenzung */
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
}

/* =========================================
   5. PRODUKTE & KONFIGURATOR
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.product-header {
    background-color: #252525; /* Etwas heller als Card BG */
    color: var(--text-main);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.product-body {
    padding: 30px;
    flex-grow: 1;
    color: var(--text-muted);
}

.product-body ul {
    list-style: none;
    margin: 20px 0;
}

.product-body li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.product-body li::before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    display: block;
}

/* Konfigurator Box */
.config-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-main);
}

/* Dark Mode Inputs */
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(163, 22, 33, 0.2);
}

.total-price-display {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.price-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
    display: block;
}

/* =========================================
   6. TECHNISCHE DETAILS & SLIDER
   ========================================= */
.details-section {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

/* Alternierende Hintergründe im Dark Mode kaum sichtbar, 
   daher nutzen wir hier einfach den gleichen BG oder sehr subtil */
.details-section:nth-child(even) {
    background-color: #161616; 
}

.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.tech-table th, .tech-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}

.tech-table th {
    background-color: #252525;
    color: var(--text-main);
    font-weight: bold;
    width: 40%;
}

.tech-table tr:last-child td {
    border-bottom: none;
}

.feature-list-detail {
    list-style: none;
    color: var(--text-muted);
}

.feature-list-detail li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.feature-list-detail li::before {
    content: '►';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 0.8rem;
    top: 4px;
}

/* Image Slider */
.slider-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.slide {
    display: none;
    width: 100%;
    border-radius: 10px;
}

.slide.active {
    display: block;
    animation: fade 0.5s;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.5);
    border: none;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: var(--primary-color);
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* =========================================
   7. SUPPORT BEREICH & OVERLAYS
   ========================================= */
.support-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.support-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, border-color 0.3s;
    border-top: 4px solid transparent;
    border: 1px solid var(--border-color);
    border-top: 4px solid transparent;
}

.support-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--primary-color);
    background-color: #252525;
}

.support-icon {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.support-card h3 {
    color: var(--text-main);
}
.support-card p {
    color: var(--text-muted);
}

/* Full Page Overlays */
.full-page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-body);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: auto;
    visibility: hidden;
}

.full-page-overlay.active {
    transform: translateX(0);
    visibility: visible;
}

.overlay-header {
    background-color: var(--bg-card);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.2s;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--primary-color);
}

.overlay-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px 80px 20px;
    color: var(--text-muted);
}

.overlay-content h2, .overlay-content h3 {
    color: var(--text-main);
    margin-top: 20px;
}

/* Detail Boxen in Overlays */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.detail-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.file-list {
    list-style: none;
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.file-item:last-child {
    border-bottom: none;
}

.download-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.download-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* =========================================
   8. SUCCESS SCREEN (DARK MODE)
   ========================================= */
body.success-page {
    background-color: var(--bg-body);
    overflow-x: hidden;
}

.success-container {
    text-align: center;
    padding: 60px 40px;
    /* Glassmorphism Dark */
    background: var(--glass-bg);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    max-width: 500px;
    margin: 80px auto;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUpFade 0.8s ease-out forwards;
}

.checkmark-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px auto;
}

.checkmark-svg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--bg-body); /* Haken Farbe passend zum BG */
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fillGreen .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fillGreen { 100% { box-shadow: inset 0px 0px 0px 50px #28a745; } }
@keyframes slideUpFade { 0% { transform: translateY(50px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.success-message h1 {
    color: var(--text-main);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease 1s forwards;
}

.success-message p {
    color: var(--text-muted);
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease 1.2s forwards;
}

.success-btn {
    opacity: 0;
    animation: fadeInUp 0.5s ease 1.4s forwards;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color); /* Rotes Konfetti */
    animation: fall linear forwards;
    top: -10px;
    z-index: 1;
}

@keyframes fall {
    to { transform: translateY(100vh) rotate(720deg); }
}

/* =========================================
   9. FOOTER
   ========================================= */
footer {
    background-color: #000000; /* Tiefschwarz für den Footer */
    color: var(--text-muted);
    padding: 60px 20px;
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 60px;
}

.footer-section {
    max-width: 400px;
    margin-bottom: 20px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p, .footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
    line-height: 1.6;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.footer-logos img {
    max-width: 100%;
    height: auto;
    /* Logos optional leicht abdunkeln, damit sie nicht blenden */
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-logos img:hover {
    opacity: 1;
}

.copyright {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* =========================================
   10. RESPONSIVE DESIGN & BURGER MENU
   ========================================= */
@media (max-width: 768px) {
    
    /* Navigation */
    nav {
        padding: 1rem;
    }

    .burger-menu {
        display: flex; /* Icon sichtbar machen */
    }

    /* Links verstecken und positionieren */
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--bg-card); /* Dark BG */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        transition: 0.4s ease-in-out;
        z-index: 1000;
        gap: 30px;
        border-left: 1px solid var(--border-color);
    }

    nav ul.nav-active {
        right: 0; /* Menü reinholen */
    }

    nav a {
        font-size: 1.3rem;
        color: var(--text-main);
    }

    /* Burger Animation zu X */
    .burger-menu.toggle .burger-bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
        background-color: var(--primary-color); /* Rot wenn aktiv */
    }
    .burger-menu.toggle .burger-bar:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.toggle .burger-bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
        background-color: var(--primary-color);
    }

    /* Generelle Grid Anpassungen */
    .about-grid, .tech-grid, .product-grid, .support-dashboard, .footer-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .full-page-overlay {
        width: 100%;
    }
}