:root { --primary: #bc6c25; --dark: #1a1a1a; --bg: #fff; --text: #333; --card-bg: #fff; --border: #eee; --shadow: 0 10px 25px rgba(0,0,0,0.08); --footer-bg: #111; --footer-text: #ccc; }
[data-theme="dark"] { --bg: #121212; --text: #eee; --card-bg: #1e1e1e; --border: #333; --shadow: 0 10px 25px rgba(0,0,0,0.5); --footer-bg: #0a0a0a; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; transition: background 0.3s, color 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }

header { background: var(--card-bg); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); border-bottom: 1px solid var(--border); transition: 0.3s; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo img { transition: height 0.3s; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 20px; }
nav ul li { position: relative; }
nav ul li a { text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px; text-transform: uppercase; padding: 10px 0; display: block; transition: color 0.2s; }
nav ul li a:hover { color: var(--primary); }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background-color: var(--card-bg); min-width: 220px; box-shadow: var(--shadow); z-index: 1; border-top: 3px solid var(--primary); }
nav ul li:last-child .dropdown-content, nav ul li:nth-last-child(2) .dropdown-content { left: auto; right: 0; } 
.dropdown-content a { color: var(--text); padding: 12px 16px; border-bottom: 1px solid var(--border); text-transform: none; }
.dropdown-content a:hover { background-color: var(--border); color: var(--primary); padding-left: 20px; transition: 0.3s; }
nav ul li:hover .dropdown-content { display: block; }

.page-content { padding: 0 0 50px 0; flex: 1; width: 100%; max-width: 100vw; overflow-x: hidden; }

/* Block Widths */
.w-100vw { width: 100vw !important; max-width: 100vw !important; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); border-radius: 0 !important; }
.w-100 { width: 100%; max-width: 1200px; margin: 0 auto; border-radius: 12px; overflow: hidden; }
.w-80 { width: 80%; max-width: 960px; margin: 0 auto; border-radius: 12px; overflow: hidden; }
.w-60 { width: 60%; max-width: 720px; margin: 0 auto; border-radius: 12px; overflow: hidden; }
.w-50 { width: 50%; max-width: 600px; margin: 0 auto; border-radius: 12px; overflow: hidden; }

/* Hero */
.block-hero, .hero { background-size: cover !important; background-position: center center !important; background-repeat: no-repeat !important; color: white; padding: 120px 0; text-align: center; border-bottom: 5px solid var(--primary); position: relative; margin-bottom: 50px; display: block; }
.block-hero::before, .hero::before { content: ''; position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.65); }
.block-hero .container, .hero .container { position: relative; z-index: 2; width: 100%; padding: 0 20px; box-sizing: border-box; }
.block-hero h1, .hero h1 { font-size: 3.2rem; margin-bottom: 15px; text-shadow: 2px 2px 8px rgba(0,0,0,0.8); line-height: 1.2; margin-top:0; color: #fff; }
.block-hero p, .hero p { font-size: 1.3rem; max-width: 800px; margin: 0 auto 30px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); color: #eee; }
.btn-hero { display: inline-block; padding: 15px 30px; margin: 10px; border-radius: 5px; text-decoration: none; font-weight: bold; font-size: 1.1rem; transition: 0.3s; background: var(--primary); color: white; border: 2px solid var(--primary); }
.btn-hero:hover { background: transparent; color: white; }

/* Feature Kontakt (Slide Animation) */
.block-feature-contact { padding: 60px 20px; overflow: hidden; color: #fff; margin-bottom: 50px; box-sizing: border-box; }
.fc-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; max-width: 1200px; margin: 0 auto; }
.fc-left, .fc-right { opacity: 0; transition: all 1s ease-out; }
.fc-left { transform: translateX(-150px); text-align: right; flex: 1; min-width: 300px; font-size: 2.2rem; font-weight: bold; line-height: 1.2; }
.fc-right { transform: translateX(150px); text-align: left; flex: 1; min-width: 300px; }
.fc-right .btn-hero { font-size: 1.2rem; padding: 15px 35px; background: #fff; color: #333; border: 2px solid #fff; }
.fc-right .btn-hero:hover { background: transparent; color: #fff; }
.block-feature-contact.is-visible .fc-left, .block-feature-contact.is-visible .fc-right { opacity: 1; transform: translateX(0); }
@media(max-width: 768px) { .fc-left, .fc-right { text-align: center !important; transform: translateX(0); opacity: 1; } }

/* Benchmarks */
.block-benchmark { background: var(--card-bg); padding: 60px 0; display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 50px; }
.bench-item { flex: 1; min-width: 200px; }
.bench-num { font-size: 3.5rem; font-weight: bold; color: var(--primary); margin-bottom: 5px; line-height: 1; }
.bench-txt { font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); font-weight: bold; }

/* Rating Badges */
.block-badges { display: flex; justify-content: center; gap: 30px; margin: 40px auto; flex-wrap: wrap; background: var(--card-bg); padding: 40px; border: 1px solid var(--border); box-shadow: var(--shadow); box-sizing: border-box; }
.badge-box { background: var(--bg); color: var(--text); padding: 20px 40px; border-radius: 12px; border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow); text-decoration: none; transition: 0.3s; }
.badge-box:hover { transform: translateY(-5px); border-color: var(--primary); }
.badge-title { font-size: 1.5rem; color: var(--text); font-weight: bold; margin-bottom: 5px; display:flex; align-items:center; gap:8px;}
.badge-sub { font-size: 1rem; color: var(--text-muted); }

/* Service Cards */
.block-services { display: grid; gap: 20px; margin: 40px auto; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.service-card { background: var(--card-bg); color: var(--text); padding: 30px; border-radius: 8px; text-decoration: none; border-top: 4px solid transparent; transition: 0.3s; display: block; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; }
.service-card:hover { transform: translateY(-5px); border-top-color: var(--primary); }
.service-icon { font-size: 3rem; color: var(--primary); margin-bottom: 15px; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--text); }
.service-card p { color: var(--text-muted); margin-bottom: 20px; }
.service-list { list-style: none; padding: 0; text-align: left; display: inline-block; margin: 0 auto; }
.service-list li { color: var(--text); margin-bottom: 8px; position: relative; padding-left: 25px; font-size: 0.95rem; }
.service-list li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

/* Reviews */
.block-reviews-grid { display: grid; gap: 30px; margin: 40px auto; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.review-card { background: var(--card-bg); color: var(--text); padding: 25px; border-radius: 8px; box-shadow: var(--shadow); border-top: 3px solid var(--primary); border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.review-stars { color: #f1c40f; font-size: 1.4rem; margin-bottom: 10px; letter-spacing: 2px; }
.review-author { font-weight: bold; margin-bottom: 5px; color: var(--primary); }
.review-text { font-style: italic; color: var(--text-muted); flex-grow: 1; }

/* Banner Zentriert */
.block-banner-wrap { display: flex; justify-content: center; margin: 40px auto; width: 100%; box-sizing: border-box; }
.block-banner { display: block; text-align: center; transition: transform 0.3s; width: 100%; }
.block-banner:hover { transform: scale(1.02); }
.block-banner img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow); display: block; margin: 0 auto; object-fit: contain; }
.banner-size-original img { width: auto; max-width: 100%; } .banner-size-full img { width: 100%; max-width: 100%; } .banner-size-80 img { width: 80%; max-width: 80%; } .banner-size-75 img { width: 75%; max-width: 75%; } .banner-size-60 img { width: 60%; max-width: 60%; } .banner-size-50 img { width: 50%; max-width: 50%; } .banner-size-30 img { width: 30%; max-width: 30%; } .banner-size-20 img { width: 20%; max-width: 20%; } .banner-size-10 img { width: 10%; max-width: 10%; }

.block-single-img { display: flex; justify-content: center; overflow: hidden; margin: 40px auto; }
.block-single-img img { display: block; height: auto; box-shadow: var(--shadow); border-radius: 8px; }
.w-150 { width: 150%; max-width: 150% !important; flex-shrink: 0; margin-left:-25%; }

.block-text { margin: 40px auto; font-size: 1.1rem; padding: 20px; }
.block-text h2, .block-text h3 { color: var(--text); margin-bottom: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 5px; display: inline-block; }
.block-html { margin: 40px auto; width: 100%; overflow-x: auto; padding: 20px; }
.block-img-left, .block-img-right { display: flex; gap: 40px; align-items: flex-start; margin: 60px auto; background: var(--card-bg); padding: 20px; border-radius: 8px; border: 1px solid var(--border); box-shadow: var(--shadow); box-sizing: border-box; }
.block-img-right { flex-direction: row-reverse; }
.block-img-left img, .block-img-right img { width: 45%; border-radius: 8px; box-shadow: var(--shadow); object-fit: cover; }
.block-img-text { width: 55%; font-size: 1.1rem; }

/* FIX VIDEO */
.block-video { margin: 50px auto; text-align: center; display: flex; justify-content: center; }
.block-video iframe, .block-video video { width: 100%; height: 500px; border-radius: 8px; box-shadow: var(--shadow); border: none; background: #000; }

.block-spacer { height: 60px; border-bottom: 1px solid var(--border); margin: 60px auto; }
.block-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 50px auto; }
.block-dual img { width: 100%; border-radius: 8px; box-shadow: var(--shadow); height: 350px; object-fit: cover;}

.block-slider { position: relative; margin: 40px auto; overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); background: #000; }
.slider-track { display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.slider-slide { min-width: 100%; position: relative; display: block; text-decoration: none; color: inherit; }
.slider-slide img { width: 100%; height: 500px; object-fit: cover; display: block; }
.slider-text { position: absolute; bottom: 30px; left: 30px; right: 30px; background: rgba(0,0,0,0.7); color: #fff; padding: 15px 20px; border-radius: 5px; font-size: 1.1rem; }

.teaser-grid { display: grid; gap: 30px; margin: 60px auto; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.teaser-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: all 0.4s ease; display: flex; flex-direction: column; }
.teaser-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); border-color: var(--primary); }
.teaser-img-wrap { overflow: hidden; height: 230px; }
.teaser-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.teaser-card:hover .teaser-img-wrap img { transform: scale(1.08); }
.teaser-card-body { padding: 25px; flex-grow: 1; }
.teaser-card-body h3 { margin-bottom: 10px; font-size: 1.4rem; margin-top:0; }

/* FIX: Kontaktformular Breite & Styling */
.block-contact { background: var(--card-bg); padding: 40px; border-radius: 8px; border: 1px solid var(--border); margin: 40px auto; width: 100%; box-shadow: var(--shadow); box-sizing: border-box; }
.block-contact input, .block-contact textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 4px; font-family: inherit; background: var(--bg); color: var(--text); box-sizing: border-box; }
.block-contact button { background: var(--primary); color: white; border: none; padding: 15px 30px; font-size: 1.1rem; cursor: pointer; border-radius: 4px; font-weight: bold; width: 100%; transition: 0.3s; box-sizing: border-box; }
.block-contact button:hover { opacity:0.9; }
.dsgvo-box { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; text-align: left; }
.dsgvo-box label { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.dsgvo-box input[type="checkbox"] { width: auto; margin-top: 3px; cursor: pointer; }
.phone-group { display: flex; gap: 20px; margin-bottom: 20px; }
.phone-group > div { flex: 1; }
.phone-group label { font-size: 12px; font-weight: bold; color: var(--text-muted); display: block; margin-bottom: 5px; }
.phone-group input { margin-bottom: 0 !important; }
.error-border { border-color: red !important; background: #fff0f0 !important; color: #333 !important; }

/* FOOTER */
footer { background: var(--footer-bg); color: var(--footer-text); padding: 60px 0 20px; margin-top: auto; width: 100%; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; padding: 0 20px; border-bottom: 1px solid #333; padding-bottom: 40px; margin-bottom: 20px; }
.footer-col h3 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; text-transform: uppercase; }
.footer-col p { margin-bottom: 10px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--footer-text); text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--primary); padding-left: 5px; }
.social-icons { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap;}
.social-icons a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #222; border-radius: 50%; color: #fff; text-decoration: none; border: 1px solid #333; transition: 0.3s; }
.social-icons a:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.social-icons a svg { width: 20px; height: 20px; fill: currentColor; }
.footer-bottom { text-align: center; font-size: 0.85rem; }

.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.95); color: #fff; padding: 20px; text-align: center; z-index: 9999; display: none; font-size: 15px; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
.cookie-btn { border: none; padding: 10px 25px; margin-left: 10px; cursor: pointer; font-weight: bold; border-radius: 4px; transition: 0.2s; }
.btn-cookie-acc { background: #2ecc71; color: white; }
.btn-cookie-rej { background: #e74c3c; color: white; }

/* Admin Styling (Immer hell) */
.admin-layout { display: flex; min-height: 100vh; background: #f4f5f7; color: #333;}
.admin-sidebar { width: 260px; background: #2c3e50; color: white; padding: 20px 0; flex-shrink: 0; }
.admin-menu { list-style: none; margin-top: 20px; }
.admin-menu li a { display: block; color: #ecf0f1; text-decoration: none; padding: 15px 20px; border-left: 4px solid transparent; }
.admin-menu li a:hover, .admin-menu li a.active { background: #34495e; border-left-color: var(--primary); }
.admin-content { flex: 1; padding: 30px; overflow-y: auto; background: #f4f5f7; }
.admin-panel { background: #fff; color: #333; padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 30px; }
.admin-panel input, .admin-panel select, .admin-panel textarea { background: #fff; color:#333; border:1px solid #ccc; }
.form-control { width: 100%; padding: 10px; border-radius: 4px; font-family: inherit; margin-bottom: 10px; box-sizing: border-box; }
.btn { background: var(--primary); color: white; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; display: inline-block; text-decoration: none; transition: 0.2s; }
.btn-danger { background: #e74c3c; } .btn-success { background: #2ecc71; } .btn-info { background: #3498db; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 20px; }
.media-card { background: #fafafa; border: 1px solid #ddd; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; }
.media-card img { width: 100%; height: 120px; object-fit: cover; border-bottom: 1px solid #eee; }
.builder-block { background: #f8f9fa; border: 1px solid #ddd; border-left: 5px solid var(--primary); padding: 15px; margin-bottom: 15px; border-radius: 5px; }
.builder-block-header { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px; align-items: center; }
.block-actions button { padding: 5px 10px; margin-left: 5px; border-radius: 3px; border: none; background: #3498db; color: white; cursor:pointer;}
.wysiwyg-toolbar { background: #e9ecef; padding: 5px; border: 1px solid #ccc; border-bottom: none; border-radius: 4px 4px 0 0; }
.wysiwyg-toolbar button { padding: 4px 8px; margin-right: 5px; cursor: pointer; background: #fff; border: 1px solid #ccc; font-weight: bold; color:#333; }
.wysiwyg-editor { min-height: 150px; border: 1px solid #ccc; padding: 10px; background: #fff; border-radius: 0 0 4px 4px; color:#333; }

/* URL Truncation für lange Links */
.truncate-url { max-width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }

@media(max-width: 768px) { .block-img-left, .block-img-right { flex-direction: column; } .block-img-left img, .block-img-right img, .block-img-text { width: 100%; } .admin-layout { flex-direction: column; overflow: auto; } .admin-sidebar { width: 100%; } .block-benchmark { gap: 20px; flex-direction: column; } .phone-group { flex-direction: column; gap: 0; } }

/* Mobile Menu Patch */
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001; }
.menu-toggle span { width: 30px; height: 3px; background-color: var(--text); transition: 0.3s; border-radius: 2px; }
@media(max-width: 768px) {
    .menu-toggle { display: flex; }
    nav ul { position: fixed; top: 0; right: -100%; height: 100vh; width: 260px; background-color: var(--card-bg); flex-direction: column; padding-top: 80px; box-shadow: -5px 0 15px rgba(0,0,0,0.2); transition: 0.3s ease-in-out; z-index: 1000; align-items: flex-start; overflow-y: auto; }
    nav ul.nav-active { right: 0; }
    nav ul li { width: 100%; padding: 0 20px; }
    .dropdown-content { position: static; box-shadow: none; border-left: 2px solid var(--primary); border-top: none; padding-left: 10px; margin-top: 5px; width: 100%; min-width: auto; display: none; }
    nav ul li:hover .dropdown-content { display: block; }
    
    /* Hamburger Animation zum X */
    .menu-toggle.toggle-active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .menu-toggle.toggle-active span:nth-child(2) { opacity: 0; }
    .menu-toggle.toggle-active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }
}

/* FINAL MOBILE FIX */
@media(max-width: 768px) {
  .w-80, .w-60, .w-50 { width: 100% !important; max-width: 100% !important; padding: 0 10px !important; box-sizing: border-box !important; }
  .block-contact { padding: 25px 15px !important; width: 100% !important; margin: 20px 0 !important; }
}
