﻿.project {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
    border-top: 0px;
    padding-top: 40px;
    position: relative;
}

    .project.reverse {
        flex-direction: column;
    }

/* Bildcontainer */
.with-image .project-image {
    position: relative;
    width: 100%;
    max-width: 700px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Bild */
.project-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    margin-top: 0px;
}

.project.with-image:hover .project-image img {
    transform: scale(1.02);
}

/* Textoverlay */
.with-image .project-text {
    width: 100%;
    max-width: 700px;
    transform: translateX(-50%);
    position: absolute;
    top: 0;
    left: 50%;
    right: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
    padding: 20px;
    pointer-events: none;
    z-index: 2;
}

.project-text {
    width: 100%;
    max-width: 700px;
}

/* Jetzt wird der Text beim Hover über das Projekt sichtbar */
.project.with-image:hover .project-text {
    opacity: 1;
    pointer-events: auto;
}

/* Überschrift bleibt sichtbar und sitzt unten links im Bild */
.with-image .project-text h4 {
    position: absolute;
    bottom: 10px;
    left: 15px;
    z-index: 3;
    color: black;
    font-size: 22px;
    margin: 0;
    background: rgba(255, 255, 255, 0.75);
    padding: 5px 10px;
    border-radius: 3px;
}

/* Mehr dazu-Link - Positioniere ihn auf der rechten Seite des Bildes */
.with-image .project-image .mehr-link {
    position: absolute;
    right: 15px; /* Rechts unten */
    bottom: 10px;
    z-index: 3;
    color: var(--main-color);
    font-size: 18px;
    background: rgba(255, 255, 255, 0.75);
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease;
}

.project-image .mehr-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--main-color);
    font-size: 18px;
    background: rgba(255, 255, 255, 0.75);
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease;
}
    /* Hover-Effekt für den Mehr-Dazu-Link */
    .project-image .mehr-link:hover {
        color: var(--hover-color);
        background: rgba(255, 255, 255, 1); /* Setze den Hintergrund auf 100% sichtbar */
    }

/* Die restlichen Texte sind zuerst unsichtbar */
.with-image .project-text p {
    opacity: 0;
    background: rgba(255, 255, 255, 0.85);
    padding: 15px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    max-width: 85%;
    pointer-events: none;
}

.with-image .project-text .mehr-link {
    /*    opacity: 0;
    background: rgba(255, 255, 255, 0.85);*/
    padding: 0px;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    max-width: 85%;
    pointer-events: none;
}

/* Beim Hover erscheinen nur die Inhalte */
.project.with-image:hover .project-text p,
.project.with-image:hover .project-text .mehr-link {
    opacity: 1;
    pointer-events: auto;
}

.project-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.mehr-link {
    margin-top: 0px;
    font-size: 0.9rem;
    color: var(--main-color);
    text-decoration: none;
}


    .mehr-link:hover {
        color: #3C2F7F;
        text-decoration: underline;
    }

@media (max-width: 768px) {
    .project-text {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

        .project-text p,
        .project-text .mehr-link {
            opacity: 1 !important;
            pointer-events: auto !important;
        }
}
