/* ==========================================================================
   1. GLOBALE VARIABLEN & BASICS
   ========================================================================== */
:root {
    --primary: #2c3e50;    /* Dunkles Blau/Grau für Seriosität */
    --accent: #3498db;     /* Technisches Blau */
    --purple: #5d34a4;     /* Eppenlab Marken-Lila */
    --light: #f4f7f6;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary);
    margin: 0;
    background: var(--light);
}

/* ==========================================================================
   2. HEADER & NAVIGATION (FLEXBOX-LINIE)
   ========================================================================== */
/* Das umschließende Header-Element erzwingt eine perfekte Zeile */
.header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    max-width: 100% !important;
    background-color: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    padding: 15px 5% !important;
    box-sizing: border-box !important;
}

/* Das Logo links */
.header .logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--purple) !important;
    text-decoration: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* Deaktiviert alte Starterkit-Einschränkungen der Navigations-Box */
nav, .header .menu {
    display: block !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    max-width: none !important;
}

/* Bringt die Links horizontal in Reihe mit gleichem Abstand */
.header .menu ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 25px !important;
}

.header .menu li {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

/* Link-Styling & Symmetrie */
.header .menu a {
    text-decoration: none !important;
    color: var(--primary) !important;
    font-weight: 500;
    padding: 8px 12px !important;
    display: inline-block !important;
    transition: color 0.2s ease;
}

.header .menu a:hover,
.header .menu a.active {
    color: var(--purple) !important;
    background: none !important;
}

/* ==========================================================================
   3. HERO-SECTION & LAYOUT-GRID
   ========================================================================== */
.hero {
    padding: 100px 5%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #1a252f 100%);
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
}

/* ==========================================================================
   4. SEITENSPEZIFISCHE SEKTIONEN (LEISTUNGEN & ÜBER UNS)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #0056b3;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card ul {
    padding-left: 20px;
    margin-top: 20px;
    text-align: left;
}

.service-card ul li {
    margin-bottom: 10px;
    color: #555;
}

/* Zentrale Icon-Steuerung */
.service-card .icon-container {
    font-size: 40px;
    margin-bottom: 20px;
}

.icon-ki::before { content: "■"; }
.icon-bau::before { content: "■■"; }
.icon-medizin::before { content: "■"; }

.intro, .bottom-cta {
    text-align: center;
    margin-bottom: 40px;
}

.bottom-cta {
    margin-top: 60px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Über Uns Elemente */
.about-hero {
    text-align: center;
    padding: 60px 20px;
    background: #f4f7f9;
    border-radius: 8px;
    margin-bottom: 40px;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
}

.text-block, .focus-block {
    margin-bottom: 50px;
    line-height: 1.8;
}

.values-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.value-item {
    flex: 1;
    background: var(--white);
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    text-align: center;
}

.value-item h3 {
    color: #0056b3;
    margin-bottom: 10px;
}

.location-note {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 40px;
    font-style: italic;
    color: #555;
}

/* ==========================================================================
   5. RECHTLICHES & FORMULARE
   ========================================================================== */
.legal-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    line-height: 1.7;
    color: #333;
}

.contact-info-box {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 5px;
    border-left: 5px solid #2c3e50;
    margin: 20px 0;
}

.legal-container h1, .legal-container h2 {
    color: #1a1a1a;
}

/* Formular-Styling */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    display: block;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.checkbox-wrapper {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.contact-form button[type="submit"] {
    background-color: #0056b3;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    width: auto;
}

.contact-form button[type="submit"]:hover {
    background-color: #004494;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-form button[type="submit"]:active {
    transform: scale(0.97);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* ==========================================================================
   6. FOOTER (DUNKEL-GRAU)
   ========================================================================== */
footer, .site-footer {
    background-color: #1a202c !important;
    color: var(--white) !important;
    padding: 40px 20px !important;
    text-align: center !important;
    margin-top: auto !important;
}

.site-footer div, .site-footer p {
    background-color: transparent !important;
    margin: 10px 0 !important;
}

.footer-navigation ul {
    display: flex !important;
    justify-content: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 0 0 !important;
    gap: 20px !important;
}

.footer-navigation a {
    color: #cbd5e0 !important;
    text-decoration: none !important;
    font-size: 0.9em !important;
}

.footer-navigation a:hover {
    color: var(--white) !important;
    text-decoration: underline !important;
}

/* Den gesamten Footer-Inhalt zentrieren */
.site-footer {
    text-align: center !important;
    padding: 3rem 0 !important; /* Verringert den riesigen Abstand nach oben */
}

.footer-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Den Navigations-Container selbst zentrieren */
.footer-navigation {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

/* Hebt den störenden Links-Versatz auf und zentriert die Elemente absolut mittig */
.site-footer .footer-container,
.site-footer .footer-navigation {
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Garantiert die zentrierte Ausrichtung der inneren Liste */
.site-footer .footer-navigation ul {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 15px 0 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Erzwingt das quadratische 2x2 Layout und hebelt die Flexbox-Struktur aus */
.services-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Exakt 2 Spalten */
    flex-direction: unset !important; /* Schaltet das alte Layout aus */
    flex-wrap: unset !important;
    gap: 40px !important; /* Erhöhter Abstand für eine klare Trennung links/rechts */
    margin: 3rem 0 !important;
    width: 100% !important;
}

/* Macht alle 4 Karten optisch vollkommen identisch und balanciert sie aus */
.services-grid .service-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: unset !important; /* Verhindert das automatische Quetschen */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important; /* Korrigierter Tippfehler */
    min-height: 420px !important; /* Erhöhte Mindesthöhe für mehr Luft im Kasten */
    box-sizing: border-box !important;
}

/* Auf mobilen Endgeräten rutscht alles wie gewohnt untereinander */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}
