﻿/* ####################################################### */
/* ################ BASE STYLES & TYPOGRAPHY ############# */
/* ####################################################### */

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; /* Sehr helles Grau */
    color: #333;
}

.container {
    width: 90%;
    max-width: 1250px; 
    margin: 0 auto;
}

h1, h2, h3, h4 {
    color: #003355; /* Dunkelblau (angepasst an Logo) */
}

a {
    color: #003355;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #F9A400; /* Orange (angepasst an Logo) */
}

.highlight {
    color: #F9A400; /* Orange für Hervorhebungen */
}

/* ####################################################### */
/* ################ HEADER & NAVIGATION ################## */
/* ####################################################### */

.main-header {
    background-color: #ffffff;
    border-bottom: 3px solid #003355; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 1.8em;
    margin: 0;
    color: #003355; 
}

.logo h1 .logo-dark {
    color: #F9A400;
}

.logo p {
    font-size: 0.9em;
    margin: 0;
    color: #666;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}

.main-nav li {
    position: relative; 
}

.main-nav li a {
    display: block;
    padding: 10px 15px;
    text-transform: uppercase;
    font-weight: bold;
    color: #666; 
    transition: background-color 0.2s, color 0.2s;
    border-radius: 5px;
}

.main-nav li a:hover,
.main-nav li.active > a {
    background-color: #003355;
    color: #ffffff; 
}

/* DROPDOWN-MENÜ */
.dropdown-content {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #003355; 
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4); 
    z-index: 1000; 
    border-radius: 0 0 5px 5px;
    padding: 0; 
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    text-transform: none; 
    font-weight: normal;
    white-space: nowrap; 
    border-radius: 0; 
}

.dropdown-content a:hover {
    background-color: #F9A400; 
}

.main-nav li:hover .dropdown-content {
    display: block;
}


/* ####################################################### */
/* ################ MAIN CONTENT & LAYOUT ################ */
/* ####################################################### */

.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.section-title {
    color: #003355;
    text-align: center; 
    margin-bottom: 30px;
    font-size: 2.2em;
    display: block; 
    border-bottom: 2px solid #F9A400;
    padding-bottom: 5px;
    
    width: 80%; 
    margin-left: auto; 
    margin-right: auto;
}

.intro-text {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Service Grids / Cards (Stabile 3er-Spalten mit gleicher Höhe) */
.services-section {
    margin-top: 40px;
}

/* Zentriert die Überschrift "Unsere Kernkompetenzen" */
.services-section h3 {
    text-align: center; 
    color: #003355; 
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 30px; 
}

/* 🏆 FIX 1: Flexbox Container für Zentrierung und GLEICHE HÖHE */
.services-grid {
    display: flex; 
    flex-wrap: wrap; 
    gap: 30px; 
    margin: 20px 0 30px; 
    justify-content: center; /* Zentriert die Kacheln in der letzten Reihe */
    align-items: stretch; /* WICHTIG: Stellt sicher, dass die Items die volle Höhe der Reihe einnehmen */
}

/* 🏆 FIX 2: Breiten-Definition für Link-Wrapper und direkte Artikel */
.service-card-link,
.services-grid > article.service-card {
    /* Breiten-Berechnung für 3 Spalten */
    flex-basis: calc(33.333% - 20px); 
    max-width: calc(33.333% - 20px);
    
    flex-grow: 1; 
    /* HIER WURDE height: 100% ENTFERNT, da align-items: stretch dies übernimmt */
    
    /* Nur für den Link-Wrapper relevant: */
    display: flex; 
    flex-direction: column; 
    
    text-decoration: none; 
    color: inherit; 
    box-sizing: border-box; 
}

/* Stil-Container (article) */
.service-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    
    width: 100%; 
    
    /* 🏆 WICHTIG: Sorgt dafür, dass die Kachel die gesamte Höhe des Link-Wrappers ausfüllt */
    flex-grow: 1; 
    height: 100%; 
    
    box-sizing: border-box; 
    
    transition: transform 0.3s, box-shadow 0.3s;
    
    /* Definiert Flexbox für innere Elemente (h4, p) */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
}

.service-card p {
    /* Lässt den Paragraph den restlichen Platz füllen, damit die Kachel gefüllt wird */
    flex-grow: 1; 
    margin-bottom: 0; 
    min-height: 1.6em; 
}

/* Hover-Effekt für klickbare Kacheln (über den Link) */
.service-card-link:hover .service-card {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Hover-Effekt für NICHT-klickbare Kacheln */
.services-grid > article.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Überschrift der Kacheln */
.service-card h4 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px; 
    text-align: center; 
}

/* Service List (für Feature-Listen) */
.service-list {
    column-count: 2; 
    column-gap: 40px;
    margin-bottom: 30px;
}

.service-list ul {
    list-style: none;
    padding: 0;
}

.service-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.service-list li::before {
    content: '»';
    position: absolute;
    left: 0;
    color: #F9A400; 
    font-weight: bold;
}

/* Separator */
.separator {
    border: 0;
    height: 1px;
    background-color: #ccc;
    margin: 40px 0;
}

/* Call-to-Action (CTA) Box */
.cta-box {
    background-color: #e9e9e9;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 40px;
}

.cta-box h3 {
    margin-top: 0;
    color: #003355;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #F9A400;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s;
    margin-top: 15px;
}

.button:hover {
    background-color: #e68a00; 
    color: white;
}

/* ####################################################### */
/* ################ FOOTER ############################### */
/* ####################################################### */

.main-footer {
    background-color: #333;
    color: #ffffff;
    padding: 20px 0;
    font-size: 0.9em;
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-footer a {
    color: #F9A400;
}

.main-footer a:hover {
    color: #ffffff;
}


/* ####################################################### */
/* ################ RESPONSIVE DESIGN (MOBIL) ############ */
/* ####################################################### */

@media (max-width: 768px) {
    
    /* 1. HAUPTNAVIGATION (Main-Nav) */
    .header-content {
        flex-direction: column; 
        text-align: center;
        padding-bottom: 10px;
    }

    .main-nav ul {
        flex-direction: column; 
        gap: 0; 
        width: 100%;
        margin-top: 10px;
        background-color: white; 
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #ccc; 
    }
    
    .main-nav a {
        padding: 10px 0;
        text-align: center;
        color: #666; 
    }
    
    .main-nav li a:hover,
    .main-nav li.active > a {
        background-color: #f4f4f4;
        color: #003355;
    }

    /* Mobile Dropdown Anpassung */
    .dropdown-content {
        display: none; 
        position: static; 
        box-shadow: none;
        background-color: transparent; 
        padding: 0;
    }

    .main-nav li.active .dropdown-content {
        display: block; 
    }
    
    .dropdown-content a {
        padding: 8px 0 8px 25px; 
        color: #333; 
        background-color: #f4f4f4; 
        border-radius: 0;
        border-bottom: 1px solid #eee; 
        font-weight: normal; 
    }
    
    .dropdown-content a:hover {
        background-color: #e9e9e9;
    }

    /* ####################################################### */
    /* ################ ANDERE RESPONSIVE ANPASSUNGEN ######### */
    /* ####################################################### */
    .container {
        padding: 0 15px; 
    }
    
    .section-title {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Kacheln im Mobile-Modus untereinander (Flexbox-Fix) */
    .services-grid {
        gap: 20px; 
        margin: 20px 0; 
    }
    
    /* FIX: Kacheln im Mobile 100% Breite */
    .service-card-link,
    .services-grid > article.service-card {
        flex-basis: 100%; 
        max-width: 100%;
    }
    
    .service-card h4 {
        text-align: center; 
    }
    .service-list {
        column-count: 1; 
    }
    .main-footer .container {
        flex-direction: column;
        text-align: center;
    }
}