/* Basis Variablen (Primärfarbe wird über PHP überschrieben) */
:root { --primary: #bc6c25; --dark: #2b1700; --bg: #fff; --shadow: 0 10px 25px rgba(0,0,0,0.08); }
* { 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: #333; background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Frontend Header */
header { background: #fff; padding: 15px 0; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo img { max-height: 60px; 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(--dark); 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: #fff; min-width: 220px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); 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: #333; padding: 12px 16px; border-bottom: 1px solid #eee; text-transform: none; }
.dropdown-content a:hover { background-color: #f1f1f1; color: var(--primary); padding-left: 20px; transition: 0.3s; }
nav ul li:hover .dropdown-content { display: block; }

.page-content { padding: 30px 0; flex: 1; }

/* Frontend Blocks */
.block-hero { background-size: cover; background-position: center; color: white; padding: 120px 0; text-align: center; border-bottom: 5px solid var(--primary); position: relative; margin-bottom: 40px; }
.block-hero::before { content: ''; position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.65); }
.block-hero .container { position: relative; z-index: 2; }
.block-hero h1 { font-size: 3.2rem; margin-bottom: 15px; text-shadow: 2px 2px 8px rgba(0,0,0,0.8); line-height: 1.2; }
.block-hero p { font-size: 1.3rem; max-width: 800px; margin: 0 auto 30px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.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; }

.block-banner { margin: 40px auto; display: block; text-align: center; transition: transform 0.3s; }
.block-banner:hover { transform: scale(1.02); }
.block-banner img { height: auto; border: 1px solid #ddd; border-radius: 4px; box-shadow: var(--shadow); }
.banner-size-original img { max-width: 100%; width: auto; } .banner-size-full img { width: 100%; } .banner-size-75 img { width: 75%; max-width: 75%; } .banner-size-50 img { width: 50%; max-width: 50%; }

.block-text { margin-bottom: 40px; font-size: 1.1rem; }
.block-text h2 { color: var(--dark); margin-bottom: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 5px; display: inline-block; }
.block-html { margin-bottom: 40px; width: 100%; overflow-x: auto; }
.block-img-left, .block-img-right { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 60px; background: #fafafa; padding: 20px; border-radius: 8px; border: 1px solid #eee; }
.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; }
.block-video { margin-bottom: 50px; text-align: center; }
.block-video iframe, .block-video video { width: 100%; max-width: 900px; height: 500px; border-radius: 8px; box-shadow: var(--shadow); border: none; background: #000; }
.block-spacer { height: 60px; border-bottom: 1px solid #eee; margin-bottom: 60px; }
.block-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 50px; }
.block-dual img { width: 100%; border-radius: 8px; box-shadow: var(--shadow); height: 350px; object-fit: cover;}

/* Slider */
.block-slider { position: relative; margin: 40px auto; max-width: 1000px; 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; }
.slider-text a { color: var(--primary); font-weight: bold; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: none; padding: 15px 20px; font-size: 24px; cursor: pointer; z-index: 10; transition: 0.3s; }
.slider-btn:hover { background: var(--primary); }
.slider-prev { left: 0; border-radius: 0 5px 5px 0; } .slider-next { right: 0; border-radius: 5px 0 0 5px; }

/* Teaser Grid */
.teaser-grid { display: grid; gap: 30px; margin-bottom: 60px; }
@media(min-width: 769px) { .grid-cols-1 { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; } .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 768px) { .teaser-grid { grid-template-columns: 1fr !important; } }
.teaser-card { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 4px 10px rgba(0,0,0,0.05); 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 { color: var(--dark); margin-bottom: 10px; font-size: 1.4rem; }
.teaser-card-body .read-more { color: var(--primary); font-weight: bold; margin-top: 15px; display: inline-block; }

.block-contact { background: #fafafa; padding: 40px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 40px; max-width: 800px; margin-left: auto; margin-right: auto; box-shadow: var(--shadow); }
.block-contact input, .block-contact textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.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; }
.block-contact button:hover { background: var(--dark); }

/* Cookie Banner */
.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-acc:hover { background: #27ae60; }
.btn-cookie-rej { background: #e74c3c; color: white; } .btn-cookie-rej:hover { background: #c0392b; }

footer { background: var(--dark); color: #fff; padding: 40px 0; text-align: center; margin-top: auto; }
footer a { color: var(--primary); text-decoration: none; margin: 0 10px; }
footer ul { list-style: none; display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }

/* REPARIERTES ADMIN STYLING */
.admin-layout { display: flex; height: 100vh; overflow: hidden; background: #f4f5f7; }
.admin-sidebar { width: 260px; background: #2c3e50; color: white; padding: 20px 0; flex-shrink: 0; overflow-y: auto; }
.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; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; border: 1px solid #eaeaea; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; margin-bottom: 15px; }
.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:hover { opacity: 0.9; } .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, .media-card video { width: 100%; height: 120px; object-fit: cover; border-bottom: 1px solid #eee; }
.media-info { padding: 8px; font-size: 11px; text-align: center; word-break: break-all; color: #555; display: flex; justify-content: space-between; align-items: center; }
.builder-block { background: #f8f9fa; border: 1px solid #ddd; border-left: 5px solid var(--primary); padding: 15px; margin-bottom: 15px; border-radius: 5px; position: relative; }
.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; cursor: pointer; font-weight: bold; border-radius: 3px; border: none; background: #3498db; color: white; }
.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; }
.wysiwyg-editor { min-height: 150px; border: 1px solid #ccc; padding: 10px; background: #fff; border-radius: 0 0 4px 4px; }
@media(max-width: 768px) { 
    /* NEU: Repariert das Menü auf dem Handy */
    nav { 
        flex-direction: column; 
        gap: 15px; 
    } 
    nav ul { 
        flex-wrap: wrap; 
        justify-content: center; 
        width: 100%; 
        gap: 10px;
    }

    /* Dein bestehender Mobile-Code */
    .block-img-left, .block-img-right { flex-direction: column; padding: 0; background: transparent; border: none; } 
    .block-img-left img, .block-img-right img, .block-img-text { width: 100%; } 
    footer ul { flex-direction: column; gap: 10px; } 
    .slider-slide img { height: 300px; } 
    .admin-layout { flex-direction: column; overflow: auto; } 
    .admin-sidebar { width: 100%; flex-shrink: 0; } 
    .admin-content { overflow: visible; } 
}