/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== Page ===== */
body {
    margin: 0;
    padding: 30px;
    font-family: Tahoma, sans-serif;
    background: #72b2e8 url("../images/cloud.jpg") repeat;
    color: #1e3a52;
}

.page {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Header ===== */
.header {
    text-align: center;
    background: #7cc9f4;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.header h1 {
    margin: 0 0 10px;
    color: white;
}

.nav-button {
    display: inline-block;
    padding: 8px 18px;
    background: white;
    color: #337ab7;
    text-decoration: none;
    font-weight: bold;
    border-radius: 20px;
}

/* ===== Window ===== */
.project-window {
    background: rgba(235, 245, 255, 0.9);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    overflow: hidden;
    border: 1px solid #ffffff;
}

/* ===== Title Bar ===== */
.title-bar {
    height: 36px;
    padding: 0 10px;
    background: linear-gradient(to bottom, #3d9dea, #2a8ad8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.title-text {
    font-size: 0.95em;
}

/* ===== Window Buttons ===== */
.window-buttons {
    display: flex;
    gap: 6px;
}

.win-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.25);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.5);
}

.win-btn.minimize { background: #c2a3fd; }
.win-btn.maximize { background: #a796e8; }
.win-btn.close    { background: #896deb; }

/* Den Container für die Bilder optimieren */
.project-image-box {
    height: 420px; /* Deine gewünschte Standardhöhe */
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden; 
}

/* Spezialfall für das Split-Layout */
.project-image-box.split {
    display: flex;
    flex-direction: row; /* Bilder nebeneinander */
    gap: 15px;
    align-items: stretch; /* Damit beide Slots gleich hoch sind */
}

.image-slot {
    flex: 1; /* Teilt den Platz 50/50 auf */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
    min-width: 0; /* Verhindert, dass Flex-Items ausbrechen */
}

/* Die wichtigste Regel für die Bilder selbst */
.project-image-box img,
.image-slot img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Bild wird nie verzerrt oder abgeschnitten */
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Kleiner Schatten für Tiefe */
}

/* Responsive Anpassung für schmale Bildschirme */
@media (max-width: 600px) {
    .project-image-box {
        height: auto; /* Auf Handy lieber untereinander fließen lassen */
        min-height: 300px;
    }
    .project-image-box.split {
        flex-direction: column;
    }
    .image-slot {
        width: 100%;
        height: 200px;
    }
}

/* Flexiblerer Container für das 4er Layout */
.project-image-box.quad-grid {
    display: flex;
    flex-wrap: wrap;       /* Erlaubt den Umbruch in die nächste Zeile */
    gap: 10px;
    height: auto;          /* WICHTIG: Festgelegte Höhe entfernen */
    min-height: 420px;     /* Aber Mindesthöhe beibehalten */
    padding: 10px;
    background: rgba(0,0,0,0.06);
}

/* Jeder Slot bekommt exakt 50% Breite minus den Gap */
.project-image-box.quad-grid .image-slot {
    flex: 1 1 calc(50% - 10px); 
    height: 200px;         /* Feste Höhe für die kleine Vorschau */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.35);
    border-radius: 6px;
    overflow: hidden;
}

/* Sicherstellen, dass die Bilder in den kleinen Slots nicht ausbrechen */
.project-image-box.quad-grid .image-slot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-description {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.5); /* Etwas heller als das Fenster-Blau */
    border-top: 1px solid rgba(0, 0, 0, 0.1); /* Trennlinie nach oben */
    font-size: 0.9em;
    line-height: 1.4;
    color: #1e3a52;
}

.project-description p {
    margin: 0; /* Verhindert unnötige Abstände */
}