/* --- DESIGN SYSTEM & VARIABLEN (PREMIUM RED & NAVY PALETTE - RAHMENLOS) --- */
:root {
    --bg-page: #f8f9fa;          /* Seitenhintergrund & Hintergrund der Schriftfelder */
    --color-logo: #D50025;       /* Firmenlogo Markenfarbe (PRIMARY_RED) */
    --color-activity: #D50025;   /* Hervorhebung der Tätigkeiten (ACCENT_RED) */
    --color-box: #669bbc;        /* BOX_BLUE für die Vorderseite der Wendekarten */
    --bg-dark-header: #D50025;   /* Obere Menüzeile im Ausgangszustand (PRIMARY_RED) */
    --bg-banner-blue: #003049;   /* NAVY_BLUE für Seiten-Banner, Text dunkel */
    
    --dark-text: #003049;        /* Textfarbe für tiefen Kontrast auf hellem Grund */
    --white: #FFFFFF;            /* WHITE für Menüzeile gescrollt & Banner-Texte */
    --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --grid-width: 1240px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none !important;    /* Konsequenter Ausschluss aller harten Rahmenlinien */
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--dark-text);
    background-color: var(--bg-page);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 115px;
    /* Aktivierung der automatischen Silbentrennung */
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
}

/* Zweisprachigkeits-Steuerung */
body.lang-de .lang-en { display: none !important; }
body.lang-en .lang-de { display: none !important; }

/* --- LAYOUT-CONTAINER --- */
.container {
    width: 100%;
    max-width: var(--grid-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* UNIFORME, HARMONISIERTE INHALTSBLÖCKE (AUF ALLEN SEITEN) */
.content-block {
    background-color: var(--bg-page);
    padding: 10px 0;
    margin-bottom: 5px;
}

/* UNIFORME FLIESS- UND TEXTABSTÄNDE (AUF ALLEN SEITEN) */
.content-p { 
    font-size: 1.05rem; 
    margin-bottom: 10px; 
    text-align: justify; 
    color: var(--dark-text); 
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* --- STYLING FÜR DIE AUFZÄHLUNGEN --- */
.custom-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
    margin-bottom: 10px;
}

.custom-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 18px;
    text-align: justify;
    font-size: 1.05rem;
    color: var(--dark-text);
    hyphens: auto;
    -webkit-hyphens: auto;
}

.custom-list li::before {
    content: "•";
    position: absolute;
    left: 5px;
    color: var(--color-activity); /* ACCENT_RED */
    font-weight: bold;
    font-size: 1.4rem;
    top: -4px;
}

.custom-list li strong {
    color: var(--bg-banner-blue); /* NAVY_BLUE für optische Strukturierung */
    font-weight: 700;
}

/* --- FIXED DYNAMIC HEADER (PERFECT ALIGNMENT & SCROLL EFFECT) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--bg-dark-header); /* Startzustand: PRIMARY_RED */
    z-index: 99999;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

header.scrolled {
    background-color: var(--white); /* Scroll-Zustand: WHITE */
    box-shadow: 0 3px 12px rgba(0, 48, 73, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 85px;
    padding: 10px 0;
    transition: min-height 0.35s ease;
}
header.scrolled .nav-container {
    min-height: 70px;
}

.logo {
    font-weight: 800;
    font-size: 1.7rem; 
    letter-spacing: -0.5px;
    color: var(--white); /* Startzustand: WHITE auf rot */
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.35s ease;
}
header.scrolled .logo {
    color: var(--color-logo); /* Scroll-Zustand: PRIMARY_RED auf weiss */
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.35s ease;
    white-space: nowrap;
    padding: 8px 4px;
}
header.scrolled nav a {
    color: var(--dark-text); /* Scroll-Zustand: NAVY_BLUE */
}

nav a:active, nav a.active {
    color: rgba(255, 255, 255, 0.8);
}
header.scrolled nav a:active, header.scrolled nav a.active {
    color: var(--color-activity);
    font-weight: 700;
}

@media (hover: hover) {
    nav a:hover { color: rgba(255, 255, 255, 0.8); }
    header.scrolled nav a:hover { color: var(--color-activity); }
    .btn-back:hover { background-color: var(--dark-text); color: var(--white); }
    .tab-btn:hover { background-color: var(--color-activity); color: var(--white); }
}

.lang-switch {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--white);
    white-space: nowrap;
    margin-left: 5px;
    border-radius: 4px;
    transition: all 0.35s ease;
}
header.scrolled .lang-switch {
    background: rgba(0, 48, 73, 0.06);
    color: var(--dark-text);
}
header.scrolled .lang-switch:hover {
    background-color: var(--color-activity);
    color: var(--white);
}

/* --- HERO --- */
.hero { padding: 25px 0 15px 0; text-align: center; }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 10px; color: var(--dark-text); letter-spacing: -1px; }
.hero p { font-size: 1.25rem; color: var(--color-activity); max-width: 750px; margin: 0 auto; font-style: italic; font-weight: 600; }

/* --- STRUCTURAL BANNER --- */
.section-header-full {
    background-color: var(--bg-banner-blue); /* NAVY_BLUE */
    color: var(--white);
    padding: 18px 0;
    width: 100%;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.1);
}
.section-header-full h2 { font-size: 1.75rem; font-weight: 700; color: var(--white); }
.section-header-full p { color: #669bbc; margin-top: 4px; font-size: 1.05rem; }

.sub-section-title { 
    font-size: 1.45rem; 
    color: var(--dark-text); 
    margin-top: 7px; 
    margin-bottom: 5px; 
    padding-bottom: 4px; 
    font-weight: 700; 
}

/* --- MATRIZEN / RAHMENLOSE TABELLEN --- */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0 20px 0;
    background-color: var(--white);
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 48, 73, 0.04);
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.95rem; table-layout: fixed; }
th, td { padding: 16px 14px; vertical-align: top; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
th { background-color: var(--bg-banner-blue); color: var(--white); font-weight: 700; font-size: 0.95rem; }
tr:nth-child(even) { background-color: rgba(102, 155, 188, 0.05); }

.col-phase { width: 11%; }
.col-stakeholder { width: 15%; }
.col-challenge { width: 26%; }
.col-integration { width: 30%; }
.col-result { width: 18%; }

.phase-column { font-weight: 700; color: var(--dark-text); }
.solutions-column {
    background-color: rgba(102, 155, 188, 0.1); 
    font-weight: 700; 
    color: var(--dark-text);
}
th.solutions-column { background-color: var(--color-box); color: var(--white); font-weight: 700; }

.highlight-text {
    font-style: italic;
    color: var(--color-activity);
    font-weight: bold;
}

/* --- TABS & KARTENDESIGN (SE FAKTEN) --- */
.nav-tabs { margin-bottom: 25px; display: flex; flex-wrap: wrap; gap: 8px; }
.tab-btn { background: rgba(0, 48, 73, 0.05); padding: 12px 20px; font-size: 1rem; font-weight: 700; color: var(--dark-text); cursor: pointer; transition: all 0.2s ease; border-radius: 4px; }
.tab-btn.active { color: var(--white); background-color: var(--bg-banner-blue); }

.tab-content { display: none; }
.tab-content.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }

.matrix-card { background: var(--white); padding: 24px; box-shadow: 0 4px 15px rgba(0, 48, 73, 0.03); }

.thesis-box { 
    background-color: var(--bg-page);
    color: var(--dark-text);
    padding: 14px; 
    margin-bottom: 14px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    font-style: italic; 
    border-radius: 2px; 
}
.refutation-box { background-color: rgba(102, 155, 188, 0.08); padding: 14px; }
.refutation-text { font-size: 0.95rem; color: var(--dark-text); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* --- FORMULARFELDER --- */
.grid-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
.form-control { width: 100%; padding: 14px; background-color: var(--white); font-family: var(--font-family); font-size: 16px; color: var(--dark-text); box-shadow: inset 0 1px 3px rgba(0, 48, 73, 0.05); }
.form-control:focus { outline: none; background-color: rgba(102, 155, 188, 0.04); }
.btn-submit { background-color: var(--color-box); color: var(--white); padding: 14px 32px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease; width: 100%; }
.btn-submit:hover { background-color: var(--color-activity); }
.alert-success { display: none; background-color: #E6FFFA; color: #38A169; padding: 15px; margin-top: 20px; font-weight: 500; }

.impressum-box { background-color: var(--bg-banner-blue); color: var(--white); padding: 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.impressum-box h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--white); }
.impressum-box p { color: rgba(255, 255, 255, 0.9); margin-bottom: 10px; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; }
.impressum-box a { color: var(--white); text-decoration: underline; transition: color 0.2s ease; display: inline-flex; align-items: center; }
.impressum-box a:hover { color: var(--color-box); }

.btn-back { background: var(--white); color: var(--dark-text); padding: 10px 20px; cursor: pointer; font-weight: 600; margin-top: 5px; margin-bottom: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.04); text-decoration: none; display: inline-block; }
footer { text-align: center; padding: 35px 20px; font-size: 0.9rem; color: var(--dark-text); background-color: rgba(0, 48, 73, 0.04); font-weight: 700; margin-top: 40px; }
footer .footer-content { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
footer a { color: var(--dark-text); text-decoration: underline; transition: color 0.2s ease; display: inline-flex; align-items: center; }
footer a:hover { color: var(--color-activity); }

.linkedin-svg { fill: currentColor; vertical-align: middle; transition: transform 0.2s ease; }
.linkedin-svg:hover { transform: scale(1.05); }

/* --- INTERAKTIVE WENDEKARTEN (LEAN MBSE) --- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 15px 0 25px 0; width: 100%; }
.flip-card { background-color: transparent; perspective: 1000px; height: 180px; cursor: pointer; outline: none; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: left; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }

@media (hover: hover) {
    .flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; padding: 24px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.flip-card-front { background-color: var(--color-box); color: var(--white); align-items: center; text-align: center; }
.flip-card-front h4 { font-size: 1.25rem; font-weight: 700; color: var(--white); margin: 0; line-height: 1.4; }

.flip-icon-container { margin-top: 15px; color: rgba(255, 255, 255, 0.65); transition: color 0.3s ease, transform 0.5s ease; display: flex; justify-content: center; align-items: center; }
.flip-card:hover .flip-icon-container { color: var(--white); transform: rotate(180deg); }

.flip-card-back { background-color: var(--bg-banner-blue); color: var(--white); transform: rotateY(180deg); }
.flip-card-back p { font-size: 0.95rem; color: rgba(255, 255, 255, 0.95); line-height: 1.5; margin: 0; text-align: justify; }

/* --- RESPONSIVE STRUCTURING (OPTIMIZED COMPACT MOBILE RE-DESIGN) --- */
@media (max-width: 1120px) {
    body { padding-top: 110px !important; }
    header { padding-top: 6px !important; padding-bottom: 6px !important; }
    .nav-container { flex-direction: column !important; gap: 6px !important; padding: 6px 0 !important; min-height: auto !important; }
    header.scrolled .nav-container { min-height: auto !important; }
    .logo { font-size: 1.35rem !important; margin-bottom: 2px !important; padding: 2px 0 !important; }
    nav { gap: 6px 12px !important; flex-wrap: wrap !important; justify-content: center !important; }
    nav a { font-size: 0.85rem !important; padding: 4px 6px !important; line-height: 1.2 !important; }
    .lang-switch { padding: 4px 8px !important; font-size: 0.8rem !important; margin-left: 2px !important; }
}

@media (max-width: 768px) {
    body { padding-top: 135px !important; } /* Ausbalancierter Abstand, da das Menü bei 768px kompakter umbricht */
    .services-grid { grid-template-columns: 1fr; gap: 15px; }
    .flip-card { height: 200px; }
    .services-grid .flip-card[style*="grid-column"] { grid-column: auto !important; }
    .grid-two-col { grid-template-columns: 1fr; gap: 30px; }
    
    /* Maximale Kompaktheit für sehr kleine Bildschirme */
    nav { gap: 4px 8px !important; }
    nav a { font-size: 0.82rem !important; padding: 3px 5px !important; }
}