/* ==========================================================================
   1. GLOBALE EINSTELLUNGEN & VARIABLEN
   ========================================================================== */
:root {
    /* Farbpalette: Seriös, klar und kontrastreich für Fachverlage & IT */
    --primary-color: #0f2d59;     /* Edles Dunkelblau */
    --accent-color: #007791;      /* Modernes Teal/Blaugrün für Links/Icons */
    --text-dark: #222222;         /* Fast Schwarz für optimale Lesbarkeit */
    --text-light: #555555;        /* Grau für sekundäre Texte */
    --bg-light: #ffffff;          /* Reines Weiß */
    --bg-alt: #f4f6f9;            /* Sehr helles Grau für kontrastierende Sektionen */
    --border-color: #e2e8f0;      /* Subtile Trennlinien */
    
    /* Layout-Konstanten */
    --max-width: 1100px;
    --nav-height: 70px;
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    scroll-behavior: smooth; /* Sorgt für weiches Scrollen bei Klick auf Menülinks */
}

body {
    background-color: var(--bg-light);
    padding-top: var(--nav-height); /* Verhindert, dass die Sticky-Nav den Inhalt verdeckt */
}

/* Container für zentrierten Inhalt */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Standards für Sektionen */
.section-padding {
    padding: 80px 0;
}

.alt-bg {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* ==========================================================================
   2. STICKY NAVIGATION
   ========================================================================== */
.main-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: 1.5px;
    position: relative;
    cursor: default;
}

/* Wir färben die "MUC"-Endung in der Akzentfarbe für mehr Dynamik */
.logo::after {
    content: "MUC";
    color: var(--accent-color);
    margin-left: -1px; /* Verhindert eine zu große Lücke */
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative; /* Wichtig für die Positionierung der Linie */
    padding-bottom: 4px; /* Schafft minimal Platz für die Linie */
}

/* Wir erstellen eine unsichtbare, hauchdünne Linie unter dem Link */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Dicke der Linie */
    background-color: var(--accent-color);
    transform: scaleX(0); /* Standardmäßig auf Breite 0 zusammengezogen */
    transform-origin: left; /* Linie wächst von links nach rechts */
    transition: transform 0.25s ease-out; /* Schöne, geschmeidige Bewegung */
}

/* Wenn die Maus darüberfährt, färbt sich der Text NICHT komplett um, 
   sondern die Linie gleitet elegant auf volle Breite auf */
.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a:hover::after {
    transform: scaleX(1); /* Linie fährt auf 100% Breite aus */
}


/* ==========================================================================
   3. HERO SECTION (Neues, asymmetrisches Premium-Layout)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 450px; /* Gibt dem Bereich eine schöne Tiefe */
    display: flex;
    align-items: center; /* Zentriert den Inhalt vertikal */
    
    /* Hier binden wir Ihr Bild ein */
    background-image: url('Steine_HP.jpg');
    background-size: cover;
    background-position: center 65%; /* Fokussiert die Kante zwischen Holz und Stein */
    background-repeat: no-repeat;
    
    border-bottom: 4px solid var(--primary-color); /* Eine klare Kante passend zum Holz */
}

/* Der Text-Container wird nach links geschoben und bekommt einen edlen Glaseffekt */
.hero-content {
    max-width: 650px;
    margin-left: max(40px, calc((100% - var(--max-width)) / 2 + 20px)); /* Richtet sich bündig am Menü aus */
    margin-right: 40px;
    padding: 40px;
    text-align: left; /* Linksbündiger Text wirkt moderner und professioneller */
    
    /* Moderner "Frosted Glass" (Glaseffekt), damit der Text auf den Steinen perfekt lesbar ist */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0px;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.6;
}


/* ==========================================================================
   4. BEREICH 1: LEISTUNGS-CARDS (Anklickbar)
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 Grid auf Desktop */
    gap: 30px;
}

.card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 30px;
    cursor: pointer; /* Zeigt dem Nutzer die Klickbarkeit durch den Zeigefinger */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Subtiler, eleganter Hover-Effekt statt wilder Animationen */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(15, 45, 89, 0.08);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   5. BEREICH 2: BRANCHEN- & SYSTEMKOMPETENZ (Matrix-Layout)
   ========================================================================== */
.competence-content {
    max-width: 850px;
    margin: 0 auto;
}

/* Eine einzelne System-Zeile */
.competence-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px 30px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Linke Seite: Name und Technologie übereinander */
.system-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.system-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.system-tech {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Rechte Seite: Die Kompetenz-Labels (Badges) */
.badge {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Farbnuancen für Ihren Status (Seriös, nicht zu knallig) */
.badge-highest {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #ceead6;
}

.badge-senior {
    background-color: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #d2e3fc;
}

/* Die darauffolgende Info-Box für den Fließtext */
.competence-focus-box {
    margin-top: 40px;
    background-color: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    padding: 30px;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.competence-focus-box h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.competence-focus-box p {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
}

.competence-focus-box p:last-child {
    margin-bottom: 0;
}

/* Mobile Optimierung für die System-Zeilen */
@media (max-width: 600px) {
    .competence-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .badge {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   6. BEREICH 3: ARBEITSWEISE & INNOVATION
   ========================================================================== */

   .philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten auf Desktop */
    gap: 30px;
    margin-top: 20px;
}

.philosophy-item {
    background-color: var(--bg-alt);
    padding: 35px 30px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Zwingt eventuelle Links immer sauber nach unten */
    border-top: 3px solid var(--border-color);
    transition: border-color 0.2s ease;
}

.philosophy-item:hover {
    border-top: 3px solid var(--accent-color); /* Subtiler visueller Fokus beim Drüberfahren */
}

.philosophy-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.philosophy-item p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Der neue, elegante Weiterlesen-Link */
.read-more-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.read-more-link:hover {
    text-decoration: underline;
    transform: translateX(4px); /* Der Pfeil rückt beim Hovern minimal nach rechts */
}

/* ==========================================================================
   7. BEREICH 4 & 5: KONTAKT & LEGAL FOOTER (Perfekt zentriert)
   ========================================================================== */
#kontakt {
    padding-top: 40px;
    padding-bottom: 80px;
    background-color: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr; /* Harmonische Aufteilung */
    gap: 50px;
    max-width: 900px; /* Begrenzt die Gesamtbreite, damit es kompakt in der Mitte bleibt */
    margin: 30px auto 0 auto; /* Zentriert das gesamte Grid perfekt unter der Überschrift */
    align-items: start;
}

.contact-text-block {
    text-align: left; /* Auf dem PC bleibt der Text lesefreundlich linksbündig */
}

.contact-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 6px; /* Hält die Adresszeilen kompakt zusammen */
}

.contact-lead-light {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 15px; /* Abstand vor den Telefon/Mail-Links */
}

.contact-lead-meta {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 6px;
}

/* Styling für die klickbaren Kontaktdaten */
.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Mobile Rettung: Beseitigt den seitlichen Versatz auf dem Smartphone */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Untereinander brechen */
        gap: 35px;
        margin-top: 25px;
    }
    .contact-text-block {
        text-align: center; /* Zwingt BEIDE Spalten und alle Zeilen mobil exakt in die Mitte */
    }
}


/* Legal Footer ganz unten */
.legal-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0;
    font-size: 0.85rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--bg-light);
    text-decoration: underline;
}


/* ==========================================================================
   8. RESPONSIVE DESIGN (Optimierung für Mobilgeräte)
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 0; /* Sticky Nav wird mobil aufgelöst für besseren Lesefluss */
    }
    
    .main-navigation {
        position: relative;
        height: auto;
        padding: 20px 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
        /* Diese Zeilen innerhalb der bestehenden @media (max-width: 768px) Klammer ergänzen: */
    .hero-section {
        min-height: auto;
    }
    
    .hero-content {
        margin: 40px 20px; /* Zentriert die Textbox mobil mit feinem Abstand */
        padding: 30px 20px;
        text-align: center; /* Mobil ist zentriert meistens lesbarer */
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
    }
    
    .hero-tagline {
        font-size: 1.05rem;
    }
    
    /* Grids schrumpfen mobil auf 1 Spalte zusammen */
    .cards-grid, 
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
/* ==========================================================================
   9. MODAL / POP-UP LAYOUT (Edler Overlay-Effekt)
   ========================================================================== */
.modal-overlay {
    display: none; /* Standardmäßig unsichtbar */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 45, 89, 0.6); /* Abrundung mit leicht bläulichem Schatten */
    backdrop-filter: blur(5px);
    z-index: 2000; /* Liegt über der Sticky-Nav */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-box {
    background-color: var(--bg-light);
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-top: 6px solid var(--accent-color);
    
    /* Hier ist die neue, geschmeidige Animation (Einblenden + leichtes Hochgleiten) */
    animation: slideUpFade 0.25s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideUpFade {
    from { 
        opacity: 0; 
        transform: translateY(15px); /* Startet leicht versetzt weiter unten */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Der Schließen-Button (X) oben rechts */
.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Inhaltliche Formatierung im Pop-up */
.modal-header-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-body-content h4 {
    color: var(--accent-color);
    font-size: 1.15rem;
    margin: 20px 0 10px 0;
    font-weight: 700;
}

.modal-body-content h4:first-child {
    margin-top: 0;
}

.modal-body-content p {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.modal-body-content ul {
    list-style: none;
    margin-bottom: 25px;
}

.modal-body-content ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Stilisiertes Aufzählungszeichen */
.modal-body-content ul li::before {
    content: "▪";
    position: absolute;
    left: 5px;
    color: var(--accent-color);
    font-weight: bold;
}

/* Kleiner visueller Hinweis auf den Cards */
.card-more {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    transition: transform 0.2s ease;
}

.card:hover .card-more {
    transform: translateX(5px); /* Der Pfeil rückt beim Hovern leicht nach rechts */
}

/* Mobile Anpassung für Pop-ups */
@media (max-width: 600px) {
    .modal-box {
        padding: 30px 20px; /* Etwas mehr Luft nach oben */
    }
    .modal-header-title {
        font-size: 1.25rem;
        padding-right: 35px; /* NEU: Verhindert zwingend die Überlagerung durch das Kreuz */
        line-height: 1.3;
    }
}
