
* {
    box-sizing: border-box;
}

:root {
    font-family: 'Arial', sans-serif;
    --color: hsl(120, 100%, 25%);
}

body {
    margin: 0;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    box-shadow: 0 0 0.5em #00000040;
    border-bottom: 1px solid #C0C0C0;
    z-index: 50;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

nav ul li {
    
}

nav ul li a {
    padding: 1em 2em;
    display: block;
    height: 3.125rem;
    color: #808080;
}

nav a:hover, nav a:focus, nav a.active {
    text-decoration: none;
    color: var(--color);
}

header {
    height: 36rem;
    background-image: url('/res/images/gruppenfoto.jpg');
    background-size: 107%;
    background-position: center 35%;
    background-repeat: no-repeat;
}

.main-wrapper {
    min-height: 100vh;
    padding-top: 3.125rem;
}

h1 {
    text-align: center;
    margin: 1.25em 0;
}

h2, h3 {
    text-align: center;
}

a {
    color: var(--color);
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
}

footer {
    background-color: #404040;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    padding: 1em 2em;
    align-items: center;
    gap: 2em;
    --color: hsl(120, 75%, 37.5%);
}

.post {
    width: 32rem;
    margin: 2em auto;
    border: 1px solid #C0C0C0;
    border-radius: 0.5em;
    overflow: hidden;
    box-shadow: 0 0 0.5em #00000040;
}

.post .text {
    padding: 0 1em;
}

.post .meta {
    margin: 1em 0 0 0;
}

.post .date {
    opacity: 0.5;
    margin: 1em 0 0 0;
}

.post h4 {
    margin-top: 0;
}

.post .images {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.post img:first-child {
    width: 100%;
}

.post img {
    width: 25%;
    object-fit: cover;
    transition: transform ease-in-out 0.25s;
}

.post img:focus {
    transform: scale(2);
}

.post:has(img:focus) {
    overflow: unset;
}

.post .images img:first-child:nth-last-child(2),
.post .images img:first-child:nth-last-child(2) ~ img,
.post .images img:nth-child(2):nth-last-child(2),
.post .images img:nth-child(2):nth-last-child(2) ~ img {
    width: 50%;
}

.image-box {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: none;
    padding: 1rem;
    cursor: zoom-out;
    background-color: #FFFFFFC0;
    z-index: 100;
}

.image-box:has(img[src]) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-box img {
    display: block;
    height: fit-content;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 2em #00000040;
}

@media screen and (max-width: 38rem) {
    .post {
        border-radius: 0;
        border-left: none;
        border-right: none;
        width: 100%;
    }
    .image-box {
        padding: 0;
    }
}
