/* CSS Variablen für Farben und Abstände */
:root {
    --bg-color: #f0f4f8;
    /* Heller Hintergrund */
    --text-color: #333333;
    --text-muted: #666666;

    /* Rheomi Logo Farben */
    --brand-blue: #0e3d6b;
    /* Dunkelblau aus dem Logo */
    --brand-teal: #2cbfb2;
    /* Türkis aus dem Logo */
    --brand-teal-hover: #22998e;
    --brand-green: #51af75;
    /* Grün aus dem Logo rgb(81,175,117) */
    --brand-green-hover: #419460;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 8px 32px 0 rgba(14, 61, 107, 0.1);
    /* Leichter Blaustich im Schatten */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    /* Ein abstrakter, weicher Hintergrund, um den Monitor-Effekt zu erzielen */
    background: radial-gradient(circle at top left, #ffffff, #e1e9f0);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Der große, gläserne Hauptcontainer (Monitor-Look) */
.glass-monitor {
    width: 100%;
    max-width: 1400px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 40px 60px;
    position: relative;

    /* Falls Inhalt übersteht (für die Kontaktbox nützlich) */
    overflow: visible;
}

/* =========================================
   1. Header & Navigation
   ========================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.logo img {
    height: auto;
    width: 360px;
    /* Logo exakt wie gewünscht vergrößert */
    max-width: 100%;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.navigation a:hover {
    color: var(--brand-teal);
}

.separator {
    color: #cbd5e1;
}

.navigation .btn-contact {
    background-color: var(--brand-green);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
}

.navigation .btn-contact:hover {
    background-color: var(--brand-green-hover);
    color: white;
}

/* =========================================
   2. Hero Section
   ========================================= */
.hero-section {
    display: flex;
    align-items: center;
    background: rgba(240, 248, 255, 0.5);
    /* leicht bläuliches Glas */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #84b7d4;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.8rem;
    color: #1e3a5f;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #4a5568;
    max-width: 90%;
}

.btn-primary {
    background-color: var(--brand-green);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--brand-green-hover);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   3. News Section
   ========================================= */
.news-section {
    margin-bottom: 80px;
}

.news-section h2 {
    color: var(--brand-blue);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    /* Damit alle Boxen in der Reihe gleich hoch werden */
}

.news-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Nimmt die volle Höhe des Grids ein */
    width: 100%;
    /* Stellt sicher, dass das Grid 1fr exakt ausgenutzt wird */
    overflow: hidden;
    /* Verhindert, dass innere Elemente die Box in die Breite drücken */
}

/* Begrenzung der riesigen Bilder! */
.news-card img {
    width: 100%;
    height: 180px;
    /* Einheitliche Bildhöhe */
    object-fit: cover;
    /* Schneidet das Bild hübsch zu, ohne es zu verzerren */
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.news-card img.contain-img {
    object-fit: contain;
    background-color: #fff;
    padding: 10px;
}

.esa-logo-wrapper {
    width: 100%;
    height: 180px;
    /* Muss der Bildhöhe der anderen entsprechen */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.esa-logo-wrapper img {
    height: auto;
    max-height: 50px;
    /* ESA Logo halb so groß (vorher 100px) */
    width: auto;
    max-width: 75%;
    /* Anpassung nach Nutzerfeedback */
    margin-bottom: 0;
}

.news-card h3 {
    font-size: 1.1rem;
    color: var(--brand-blue);
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-card p {
    font-size: 0.95rem;
    /* Etwas größere Schrift in den Boxen */
    color: var(--text-muted);
    flex-grow: 1;
    /* Schiebt den Link ganz nach unten, Text hat den Raum dazwischen */
    margin-bottom: 20px;
}

.read-more {
    color: var(--brand-green);
    /* Farbe in Rheomi-Grün geändert */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* =========================================
   5. Unterseiten: Über uns & Projekte
   ========================================= */

.content-section {
    padding: 20px 0;
}

.page-title {
    color: var(--brand-blue);
    font-size: 2.2rem;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--brand-green);
    display: inline-block;
    padding-bottom: 5px;
}

/* Glass-Panel als wiederkehrendes Box-Design */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 40px;
}

.text-block h2,
.team-section h2 {
    color: var(--brand-blue);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.text-block p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.text-block a {
    color: var(--brand-green);
    font-weight: 600;
}

.text-block a:hover {
    text-decoration: underline;
}

.project-goals {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-goals li {
    background: rgba(81, 175, 117, 0.08);
    border-left: 4px solid var(--brand-green);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.0rem;
}

.project-figure {
    margin: 30px 0;
}

.project-figure img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: block;
}

.project-figure figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

.team-content-stacked {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.team-image-large {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-image-large img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.image-caption {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    max-width: 80%;
}

.team-text {
    flex: 2;
}

.team-text-bottom p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* Projekt Listen Ansicht */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-detail-card {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.project-img-container {
    flex: 1;
    min-width: 300px;
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Wenn ein Bild im Container vollständig (ohne Zuschnitt) dargestellt werden soll */
.project-img-container img.contain-img {
    object-fit: contain;
    background-color: #fff;
    padding: 10px;
    height: auto;
}

.project-img-container.esa-container {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 8px;
}

img.esa-logo-large {
    max-width: 80%;
    height: auto;
    object-fit: contain;
}

.project-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h2 {
    color: var(--brand-blue);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.project-tag {
    color: var(--brand-green);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.project-info p:not(.project-tag) {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.project-info .btn-primary {
    align-self: flex-start;
    margin-top: 10px;
}

/* =========================================
   7. Projekt-Detailseiten
   ========================================= */

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.project-detail-hero {
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.project-hero-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    width: 100%;
}

.project-hero-img.contain-img {
    object-fit: contain;
    background: transparent;
}

.esa-hero-logo {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.esa-hero-logo img {
    max-width: 300px;
    height: auto;
}

/* =========================================
   8. Responsive (Mobile)
   ========================================= */

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .glass-monitor {
        border-radius: 0;
        margin: 0;
        padding: 20px 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .logo img {
        width: 160px;
    }

    .navigation {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hero-section {
        flex-direction: column;
    }

    .hero-image {
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .project-detail-card {
        flex-direction: column;
    }

    .project-img-container {
        min-width: unset;
        width: 100%;
    }

    .team-content-stacked {
        gap: 20px;
    }

    .page-title {
        font-size: 1.6rem;
    }
}

/* =========================================
   9. Kontaktsektion (Startseite)
   ========================================= */

.contact-section {
    margin-top: 60px;
    margin-bottom: 20px;
}

.contact-section h2 {
    color: var(--brand-blue);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.contact-card {
    padding: 30px;
}

.contact-card h3 {
    color: var(--brand-blue);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   6. Footer
   ========================================= */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(14, 61, 107, 0.1);
}

.footer-logos img {
    height: 40px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--brand-blue);
}