:root {
    --rm-orange: #FD9151;
    --rm-dark: #1a1a1a;
    --rm-darker: #111111;
    --rm-light: #f4f5f7;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --transition-smooth: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }
body { background-color: var(--rm-darker); color: var(--text-white); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }
.text-orange { color: var(--rm-orange); }

.dark-title { font-size: 2.5rem; margin-bottom: 1.5rem; color: var(--rm-darker); font-weight: 700; }
.dark-text { margin-bottom: 1.5rem; color: #444444; line-height: 1.8; }

/* =========================================================
   SCHICHTEN & SCHATTEN
   ========================================================= */
.layer-front {
    position: relative;
    z-index: 30;
    border-top: 4px solid var(--rm-orange);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 -15px 40px rgba(0,0,0,0.7);
}

/* Navigation */
#navbar { position: fixed; top: 0; width: 100%; padding: 1.5rem 0; z-index: 1000; transition: var(--transition-smooth); background-color: transparent; }
#navbar.scrolled { background-color: var(--rm-darker); padding: 1rem 0; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { height: 75px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition-smooth); }
#navbar.scrolled .nav-logo { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-menu { display: flex; list-style: none; gap: 2.5rem; }
.nav-menu a { display: inline-block; color: var(--text-white); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; position: relative; padding-bottom: 5px; transition: transform 0.15s ease, opacity 0.15s ease; }
.nav-menu a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0; background-color: var(--rm-orange); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.4s ease; }
.nav-menu a.nav-link-projekte::after { background-color: #222222; }
#navbar.scrolled .nav-menu a.nav-link-projekte::after { background-color: var(--rm-orange); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu a:active { transform: scale(0.92); opacity: 0.8; }

/* Buttons mit Hover und Glow */
.btn-primary { display: inline-block; background-color: var(--rm-orange); color: var(--text-white); padding: 12px 28px; border-radius: 4px; font-weight: 600; border: 2px solid var(--rm-orange); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease; }
.btn-primary:hover {
    background-color: transparent;
    color: var(--rm-orange);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(253, 145, 81, 0.6);
}

.btn-primary.active {
    background-color: rgba(253, 145, 81, 0.15);
    color: var(--rm-orange);
    border-color: rgba(253, 145, 81, 0.4);
    box-shadow: none;
    pointer-events: none;
}
.btn-outline { display: inline-block; background-color: transparent; color: var(--text-white); padding: 12px 28px; border-radius: 4px; font-weight: 600; border: 2px solid var(--text-white); text-transform: uppercase; letter-spacing: 1px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; }
.btn-outline:hover {
    background-color: var(--text-white);
    color: var(--rm-dark);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}
.btn-outline:active { transform: translateY(0) scale(0.95) !important; box-shadow: inset 0 4px 8px rgba(0,0,0,0.2) !important; background-color: #dddddd; border-color: #dddddd; }

/* Hero Section */
.hero { position: relative; z-index: 1; height: 100vh; display: flex; align-items: center; background: linear-gradient(110deg, var(--rm-dark) 48%, var(--rm-orange) 48%, var(--rm-orange) 50.5%, rgba(0,0,0,0.5) 50.5%), url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=2000&q=80') center; background-attachment: fixed; }
.hero-content { max-width: 650px; margin-left: 5%; color: var(--text-white); position: relative; z-index: 2; }
.hero-brand-display { margin-bottom: 3rem; display: flex; flex-direction: column; align-items: flex-start; }
.hero-main-logo { height: 140px; margin-bottom: 1.5rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
.hero-brand-line { width: 80px; height: 3px; background-color: var(--rm-orange); margin-bottom: 1rem; border-radius: 2px; }
.hero-brand-text { font-size: 1.6rem; font-weight: 700; letter-spacing: 2px; color: var(--text-white); text-transform: uppercase; margin: 0; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; text-transform: uppercase; }
.hero-content p { font-size: 1.1rem; color: #cccccc; margin-bottom: 2.5rem; max-width: 500px; }
.hero-buttons { display: flex; gap: 1.5rem; }

/* Info Banner */
.info-banner { display: flex; justify-content: center; flex-wrap: wrap; gap: 4rem; background-color: var(--rm-darker); padding: 4rem 2rem; color: var(--text-white); width: 100%; }
.info-item { display: flex; align-items: center; gap: 1.5rem; transition: transform 0.4s ease; cursor: default; }

/* FIX 1: !important verhindert, dass scroll-animate den Hover der Info-Items blockiert */
.info-item:hover { transform: translateY(-5px) !important; }

.info-item i { font-size: 3rem; color: var(--rm-orange); filter: none; }
.info-item h4 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.info-item p { color: var(--text-gray); font-size: 0.9rem; }

/* =========================================================
   SERVICES / KOMPETENZEN SEKTION
   ========================================================= */
.services-section { position: relative; z-index: 10; padding: 8rem 2rem; overflow: hidden; }
section.scroll-animate { opacity: 1 !important; visibility: visible !important; transform: none !important; }

.global-curtain { position: absolute; top: -10%; left: -10%; width: 140%; height: 120%; background-color: var(--rm-darker); border-right: 15px solid var(--rm-orange); box-shadow: -15px 0 40px rgba(0,0,0,0.9); transform: skewX(-15deg) translateX(0); z-index: 100; transform-origin: left; transition: transform 1.8s cubic-bezier(0.77, 0, 0.175, 1); pointer-events: none; }
.services-section.is-visible .global-curtain { transform: skewX(-15deg) translateX(-110%); }

.section-header { text-align: center; margin-bottom: 5rem; position: relative; z-index: 2; }
.section-header h2 { font-size: 3rem; color: var(--text-white); margin-bottom: 1rem; text-transform: uppercase; }
.services-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2.5rem; position: relative; z-index: 2; }

/* Kacheln Grund-Styling */
.reveal-card {
    display: flex; gap: 1.5rem; align-items: flex-start;
    background-color: var(--rm-darker); border-radius: 8px; padding: 3rem 2.5rem; color: var(--text-white);
    opacity: 0; transform: translateY(30px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, box-shadow 0.6s ease;
    transition-delay: var(--delay, 0s);
}

/* Macht Kacheln sichtbar, wenn die Sektion oder die Kachel selbst animiert wird */
.services-section.is-visible .reveal-card,
.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* important garantiert den Hover-Effekt (Schatten + Hochrutschen) auf allen Kacheln */
.reveal-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 40px rgba(253, 145, 81, 0.2), 0 5px 15px rgba(253, 145, 81, 0.15) !important;
    transition-delay: 0s !important;
}

.icon-circle { background: #0a0a0a; color: var(--text-white); min-width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; transition: color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.6); }

.reveal-card:hover .icon-circle {
    color: var(--rm-orange);
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(253, 145, 81, 0.6));
}
.text-content h3 { font-size: 1.3rem; margin-bottom: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.text-content p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.7; }

/* Helle Sektion ("Über uns" Split Section) */
.split-section { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: 8rem 2rem; max-width: 1400px; margin: 0 auto; align-items: center; background-color: var(--rm-light); }
.split-text { padding-right: 2rem; }
.split-image-wrapper { position: relative; height: 600px; border-radius: 8px; overflow: hidden; background-color: var(--rm-darker); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.split-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }


/* =========================================================
   TIMELINE SEKTION
   ========================================================= */
.timeline-section { padding: 8rem 2rem; background-color: #161616; }
.timeline { position: relative; max-width: 1000px; margin: 0 auto; padding-left: 2rem; }
.timeline-item { position: relative; margin-bottom: 4rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-icon {
    position: absolute; left: -4rem; top: 2rem; width: 40px; height: 40px;
    background-color: var(--rm-orange); color: var(--text-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4); z-index: 2; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover .timeline-icon { transform: scale(1.15); box-shadow: 0 0 15px var(--rm-orange); }

.timeline-content {
    background-color: var(--rm-darker); padding: 2.5rem; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border-left: 4px solid transparent;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.timeline-content:hover { transform: translateY(-5px) translateX(5px); border-color: var(--rm-orange); box-shadow: 0 15px 40px rgba(253, 145, 81, 0.15), 0 5px 15px rgba(253, 145, 81, 0.1); }
.timeline-content h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.timeline-content h4 { font-size: 1.5rem; color: var(--text-white); margin-bottom: 1rem; }
.timeline-content p { color: var(--text-gray); line-height: 1.7; font-size: 1rem; }


/* =========================================================
   PARTNER SEKTION
   ========================================================= */
.partner-section { position: relative; z-index: 10; background-color: #333333; padding: 8rem 2rem; overflow: hidden; }

.partner-container {
    max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 4rem;
    background-color: var(--rm-darker); padding: 3rem; border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, background-color 0.4s ease;
}

.partner-container:hover {
    transform: translateY(-15px) !important;
    box-shadow: 0 25px 40px rgba(253, 145, 81, 0.25), 0 10px 15px rgba(253, 145, 81, 0.15);
    background-color: #1a1a1a;
}

.partner-logo-clean { display: block; max-width: 250px; filter: grayscale(100%) brightness(1.5); transition: filter 0.5s ease; }
.partner-container:hover .partner-logo-clean { filter: grayscale(0%) brightness(1); }
.partner-text h3 { color: var(--text-white); font-size: 2rem; margin-bottom: 0.5rem; }
.partner-location { color: var(--text-gray); font-weight: 500; margin-bottom: 1.5rem; font-size: 0.95rem; }
.partner-text p:last-child { color: #bbb; line-height: 1.8; }

@media (max-width: 768px) { .partner-container { flex-direction: column; text-align: center; gap: 2rem; padding: 2rem; } }


/* CTA Section */
.cta-section { background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)), url('https://images.unsplash.com/photo-1541888086925-0c670a4db0f1?auto=format&fit=crop&w=2000&q=80') center/cover; background-attachment: fixed; padding: 10rem 2rem; text-align: center; color: var(--text-white); overflow: hidden; }
.cta-content { max-width: 700px; margin: 0 auto; }
.cta-content h2 { font-size: 2.5rem; margin-bottom: 1rem; text-transform: uppercase; }
.cta-content p { font-size: 1.1rem; color: #ccc; margin-bottom: 2.5rem; }

/* =========================================================
   KONTAKT FORMULAR (Premium Dark-Theme mit Orange Glow)
   ========================================================= */
.contact-form-box {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid transparent;
    border-radius: 12px;
}
.contact-form-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 20px rgba(253, 145, 81, 0.1);
    border-color: rgba(253, 145, 81, 0.3);
}

.form-row { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; }
.half-width { flex: 1; }
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-row .form-group { margin-bottom: 0; }

.form-label { display: block; margin-bottom: 0.8rem; color: var(--text-white); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.5px; }

.form-control {
    width: 100%;
    background-color: #121212;
    border: 2px solid #2a2a2a;
    color: var(--text-white);
    padding: 16px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-control::placeholder { color: #555; font-style: italic; }

.form-control:focus {
    outline: none;
    border-color: var(--rm-orange);
    background-color: #0a0a0a;
    box-shadow: 0 0 15px rgba(253, 145, 81, 0.4);
    transform: translateY(-2px);
}

textarea.form-control { resize: vertical; min-height: 160px; }

/* Dropdown-Menü Styling */
select.form-control {
    appearance: none;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23FD9151" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: center;
}
select.form-control option { background-color: #1a1a1a; color: white; padding: 10px; }

@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 1.5rem; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer-border-top {
    position: relative;
    z-index: 50;
    background-color: var(--rm-darker);
    color: var(--text-gray);
    padding-top: 5rem;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -15px 40px rgba(0,0,0,0.6);
}
.footer-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 4rem; }
.footer-logo { height: 130px; margin-bottom: 1.5rem; }
.footer-col h4 { color: var(--text-white); font-size: 1.2rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { list-style: none; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.footer-icon { min-width: 20px; margin-top: 5px; text-align: center; }
.contact-text { line-height: 1.6; }

.contact-link { display: inline-block; position: relative; padding-bottom: 2px; transition: color 0.3s ease, transform 0.15s ease; }
.contact-link::after { content: ''; position: absolute; width: 0; height: 1px; bottom: 0; left: 0; background-color: var(--rm-orange); transition: width 0.4s ease; }
.contact-link:hover { color: var(--text-white); }
.contact-link:hover::after { width: 100%; }
.contact-link:active { transform: scale(0.95); opacity: 0.8; }

.copy-btn { margin-left: 12px; font-size: 1.1rem; cursor: pointer; color: var(--text-gray); transition: color 0.3s ease, transform 0.15s ease, filter 0.3s ease; }
.copy-btn:hover {
    color: var(--rm-orange);
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(253, 145, 81, 0.6));
}
.copy-btn:active { transform: scale(0.85) !important; color: var(--text-white) !important; }

.quick-links li { margin-bottom: 1rem; }
.footer-link { display: inline-flex; position: relative; align-items: center; gap: 8px; color: var(--text-gray); padding-bottom: 4px; transition: color 0.3s ease, transform 0.15s ease; font-size: 1.05rem;}
.footer-link .arrow-icon { color: var(--rm-orange); font-size: 1.4rem; font-weight: bold; transition: transform 0.3s ease; }
.footer-link:hover { color: var(--text-white); }
.footer-link:hover .arrow-icon { transform: translateX(6px); }
.footer-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background-color: var(--rm-orange); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.footer-link:hover::after { width: 100%; }
.footer-link:active { transform: scale(0.95); opacity: 0.8; }

.footer-bottom { padding: 2rem 0; font-size: 0.9rem; }
.footer-bottom-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.legal-links { display: flex; gap: 1rem; align-items: center; }
.legal-links a { color: var(--text-gray); transition: color 0.3s ease, transform 0.15s ease; display: inline-block; }
.legal-links a:hover { color: var(--text-white); }
.legal-links a:active { transform: scale(0.95); }
.separator { color: #444; }


/* KORREKTUR DER ANIMATIONEN */
.scroll-animate { opacity: 0; visibility: hidden; transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); will-change: opacity, visibility, transform; }
.scroll-animate.is-visible { opacity: 1; visibility: visible; transform: translate(0, 0) scale(1); transition-delay: 0s; }
.fade-up { transform: translateY(60px); }
.fade-left { transform: translateX(-80px); }
.fade-right { transform: translateX(80px); }

/* =========================================================
   CUSTOM 404 PAGE
   ========================================================= */
.page-404 { height: 100vh; background-color: var(--rm-darker); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; text-align: center; }
.corner-decor { position: absolute; width: 400px; height: 400px; z-index: 1; }
.corner-decor.top-right { top: -50px; right: -50px; }
.corner-decor.bottom-left { bottom: -50px; left: -50px; }
.corner-line { position: absolute; height: 800px; top: -200px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.top-right .l-dark { width: 90px; background: #1a1a1a; right: 20px; transform: rotate(35deg); }
.top-right .l-light { width: 40px; background: #2a2a2a; right: 130px; transform: rotate(41deg); }
.top-right .l-white { width: 12px; background: var(--text-white); right: 200px; transform: rotate(29deg); }
.top-right .l-orange { width: 6px; background: var(--rm-orange); right: 230px; transform: rotate(38deg); }
.bottom-left .l-dark { width: 120px; background: #1a1a1a; left: 10px; transform: rotate(38deg); }
.bottom-left .l-light { width: 35px; background: #2a2a2a; left: 160px; transform: rotate(30deg); }
.bottom-left .l-white { width: 10px; background: var(--text-white); left: 220px; transform: rotate(45deg); }
.bottom-left .l-orange { width: 8px; background: var(--rm-orange); left: 250px; transform: rotate(34deg); }
.error-content { z-index: 2; position: relative; display: flex; flex-direction: column; align-items: center; }
.error-icon { font-size: 5rem; color: var(--rm-orange); filter: none; margin-bottom: 1rem; animation: floatUpDown 3s ease-in-out infinite; }
@keyframes floatUpDown { 0% { transform: translateY(0); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0); } }
.error-code { font-size: 8rem; font-weight: 800; line-height: 1; margin: 0; color: var(--rm-orange); letter-spacing: -2px; }
.error-title { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-white); text-transform: uppercase; }
.error-text { font-size: 1.1rem; color: #aaa; margin-bottom: 2.5rem; line-height: 1.8; }

/* =========================================================
   LEGAL PAGES (Datenschutz & Impressum)
   ========================================================= */
.legal-content-section {
    max-width: 1000px;
    margin: -4rem auto 4rem auto;
    background-color: var(--text-white);
    padding: 5rem 4rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    color: #333333;
    position: relative;
    z-index: 10;
}

.legal-content-section h2 {
    color: var(--rm-orange);
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.legal-content-section h2:first-child {
    margin-top: 0;
}

.legal-content-section h3 {
    color: var(--rm-darker);
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.legal-content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.legal-content-section li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .legal-content-section {
        padding: 3rem 2rem;
        margin: -2rem 1rem 4rem 1rem;
    }
}