/* Hauptbox für Inhalte */
section.project {
    background-color: #f8f8f8; /* Weißer Hintergrund für die gesamte Box */
    padding: 40px; /* Innenabstand zur weißen Box */
    margin: 0; /* Kein externer Abstand */
    border: none; /* Keine Umrandung */
    box-shadow: none; /* Kein Schatten */
    margin-top: 20px; /* Abstand nach oben (zwischen Navbar und Content) */
}

/* Galerie mit flexiblem Grid */
.project-gallery {
    display: grid;
    gap: 100px; /* Abstand zwischen Bildern */
}

/* Standardlayout: 2 Spalten */
.grid-2-cols {
    grid-template-columns: repeat(2, 1fr);
}

/* Layout für 5 Spalten */
.grid-5-cols {
    grid-template-columns: repeat(5, 1fr);
}

/* 5 Spalten: Für größere Bildschirme (z. B. Desktop im Vollbild) */
@media (min-width: 1200px) {
    .project-gallery {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 4 Spalten: Für größere Bildschirme (z. B. Desktop im Vollbild) */
@media (min-width: 950px) and (max-width: 1199px) {
    .project-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 3 Spalten: Für mittlere Bildschirme (z. B. Tablets, kleine Laptops) */
@media (min-width: 768px) and (max-width: 950px) {
    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 Spalten: Für kleine Bildschirme (z. B. größere Smartphones) */
@media (max-width: 767px) {
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 Spalte: Für sehr kleine Bildschirme (z. B. ältere Smartphones) */
@media (max-width: 480px) {
    .project-gallery {
        grid-template-columns: repeat(1, 1fr);
    }
}


.project-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 50px;
}

/* Container für das Bild bleibt quadratisch */
.project-image-container {
    width: 100%;
    aspect-ratio: 1 / 1; /* Quadrat */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Stellt sicher, dass das Bild das Quadrat gleichmäßig füllt */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1); /* leichtes Hereinzoomen für horizontale Bilder */
}

/* Die Projektnummer kommt direkt über das Bild */
.project-number {
    font-size: 16px;
    color: black;
    margin-bottom: 5px; /* Abstand zur Bildbox */
}

/* Projekttitel ist anfangs unsichtbar */
.project-title {
    margin-top: 10px;
    font-size: 18px;
    color: black;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Titel wird beim Hover über das Bild sichtbar */
.project-image-container:hover + .project-title,
.project-link:hover .project-title {
    opacity: 1;
    visibility: visible;
}

/* Link */
.project-link {
    display: block; /* Macht den gesamten Bereich anklickbar */
    text-decoration: none; /* Entfernt die Standard-Unterstreichung von Links */
}

/* Bilder füllen den Container */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.1);
}
