/* Grundlagen */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --gap: 15px;
    --border: 2px solid #000;
}

/* Body und Sticky Footer */

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    padding: var(--gap);
    gap: var(--gap);
}

main {
    flex-grow: 1; /* Inhalt soll die restliche höhe des Bildschirms füllen */
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
/* Links */
a {
    text-decoration: none;
    color: #000;
    font-weight: 600;
}
img {
    max-width: 100%;
}
/* Boxen */
.nav-box,
.hero-box,
.project-box,
.project-detail-box,
.about-box,
.contact-box,
.impressum-box .footer-box {
    border: var(--border);
    padding: var(--gap);
    max-width: 100%;
    border-radius: 0;
}

/* Navigation */
.nav-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-right {
    display: flex;
    gap: var(--gap);
}
.nav-right a {
    position: relative;
    color: inherit;
    padding: 10px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav-right a:hover {
    border-color: blue;
}

/* Startseite Hauptinhalt */
.hero-box {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Desktop: nebeneinander */
    gap: var(--gap);

    &.grow {
        flex-grow: 1;
    }
}

a.hero-box:hover {
    background-color: blue;
}

.hero-text,
.hero-media {
    border: var(--border);
    padding: var(--gap);
    min-height: 700px; /* groß auf Desktop */
    background-color: white;
}
.hero-text_02 {
    padding: var(--gap);
    min-height: 400px; /* groß auf Desktop */
    justify-content: center; /* horizontal */
    grid-column: 1 / -1;
    max-width: 80ch;
    margin-inline: auto;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.hero-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: var(--gap);
    overflow: hidden;

    &.video {
        max-height: 760px;
    }
}
.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-list {
    list-style: none;
}
.contact-list li {
    margin-bottom: 0.5rem;
}

/* Animation Startseite – Hero Media */

.hero-media.video img {
    opacity: 0;
    animation: heroFade 19s infinite;
}

.hero-media.video img:nth-child(1) {
    animation-delay: 0s;
}
.hero-media.video img:nth-child(2) {
    animation-delay: 3s;
}
.hero-media.video img:nth-child(3) {
    animation-delay: 6s;
}
.hero-media.video img:nth-child(4) {
    animation-delay: 9s;
}
.hero-media.video img:nth-child(5) {
    animation-delay: 12s;
}
.hero-media.video img:nth-child(6) {
    animation-delay: 15s;
}

@keyframes heroFade {
    0% {
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    25% {
        opacity: 1;
    }
    31% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Footer */
.footer-box {
    text-align: center;
    font-size: 0.9rem;
    background-color: #000;
    color: #fff;
    border: var(--border);

    .nav-right a {
        padding: 5px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-box {
        grid-template-columns: 1fr; /* untereinander */
        min-height: auto; /* Höhe passt sich an Inhalt an */
    }

    .hero-text,
    .hero-media {
        min-height: 300px; /* immer noch groß genug */
    }

    .nav-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
