/* --- CSS Variablen (Farben aus dem Logo) --- */
:root {
    --text-dark: #2C3E50;
    --brand-blue: #007bb5;
    --brand-green: #4CAF50;
    --brand-purple: #673AB7;
    --bg-light: #f8f9fa;
    --border-color: #ddd;
}

/* --- Basis Styling --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body { color: var(--text-dark); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; } /* Sorgt dafür, dass der Footer immer unten bleibt */

/* --- Navigation --- */
header { background-color: #ffffff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; width: auto; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-blue); }

/* --- Hero Section (Startseite) --- */
.hero { background: linear-gradient(135deg, var(--bg-light) 0%, #eef2f5 100%); padding: 100px 20px; text-align: center; }
.hero h1 { font-size: 2.8rem; margin-bottom: 20px; color: var(--text-dark); }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 30px auto; color: #555; }
.btn { display: inline-block; background-color: var(--brand-blue); color: white; padding: 12px 30px; text-decoration: none; border-radius: 5px; font-weight: bold; transition: background-color 0.3s; border: none; cursor: pointer; }
.btn:hover { background-color: #005f8cc0; }

/* --- Teaser Section (Startseite) --- */
.teaser { padding: 80px 20px; max-width: 1200px; margin: 0 auto; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-top: 4px solid var(--brand-blue); text-align: left; }
.card:nth-child(2) { border-top-color: var(--brand-green); }
.card:nth-child(3) { border-top-color: var(--brand-purple); }

/* --- Kontakt & Formular --- */
.page-header { background-color: var(--text-dark); color: white; padding: 60px 20px; text-align: center; }
.contact-section { padding: 80px 20px; max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 50px; }
.contact-info h3 { color: var(--brand-blue); margin-bottom: 15px; }
.contact-info p { margin-bottom: 10px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 5px rgba(0,123,181,0.2); }

/* --- Footer --- */
footer { background-color: #1a252f; color: #888; text-align: center; padding: 20px; font-size: 0.9rem; }
footer a { color: #888; margin: 0 10px; text-decoration: none; }
footer a:hover { color: white; }

/* Responsive */
@media (max-width: 768px) {
    .contact-section { grid-template-columns: 1fr; }
    .nav-links { display: none; /* Für Mobile später anpassen */ }
}

/* --- Leistungen Detailseite --- */
.service-detail {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    /* gap: 50px;  <-- HIER ENTFERNT. Gap und feste 50% Breiten vertragen sich schlecht. Wir regeln den Abstand jetzt über Padding */
    border-bottom: 1px solid var(--border-color);
}

/* Entfernt den Rahmen beim letzten Element */
.service-detail:last-of-type {
    border-bottom: none; 
}

/* Abwechselnde Ausrichtung für bessere Lesbarkeit */
.service-detail:nth-child(even) {
    flex-direction: row-reverse;
}

.service-content {
    flex: 1;
    /* NEU: Harte Grenze, damit der Textblock nicht vom Bild zerdrückt wird */
    width: 50%; 
    padding: 0 30px; /* NEU: Abstand nach innen statt "gap" */
}

.service-content h2 {
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.service-content p {
    margin-bottom: 15px;
}

.service-content ul {
    margin-left: 20px;
    margin-top: 15px;
}

.service-content li {
    margin-bottom: 10px;
}

/* --- Bilder auf der Leistungen Detailseite --- */
.service-visual {
    flex: 1;
    /* NEU: Harte Grenze. Der Container darf maximal die Hälfte der Breite haben, egal wie groß das Bild ist. */
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px; /* NEU: Abstand nach innen */
}

.service-visual img {
    /* NEU: Das Bild darf niemals breiter sein als sein eigener Container (die 50% oben) */
    max-width: 100%; 
    height: auto;
    max-height: 400px; /* Ein bisschen mehr Höhe erlaubt, falls nötig */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.service-visual img:hover {
    transform: scale(1.02);
}

/* Farbliche Akzente passend zum Logo */
#einzelhandel h2 { color: var(--brand-blue); }
#logistik h2 { color: var(--brand-green); }
#buero h2 { color: var(--brand-purple); }

/* Responsive Anpassung für Mobile */
@media (max-width: 768px) {
    .service-detail, .service-detail:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 30px; /* Auf Mobile ist gap wieder okay, da sie untereinander stehen */
    }
    
    /* NEU: Auf Mobile müssen die 50% Grenzen aufgehoben werden */
    .service-content, .service-visual {
        width: 100%;
        padding: 0;
    }

    .service-content ul {
        text-align: left;
        display: inline-block;
    }
    .service-visual img {
        max-height: 250px;
        width: 100%; /* Sicherstellen, dass es auf Mobile die volle Breite nutzt */
    }
}