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

body {
    font: 1rem/1.5 var(--base-font);
    color: var(--color_fg);
    background-color: var(--color_bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.menu-open::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media screen and (max-device-width: 480px) {
    body {
        -webkit-text-size-adjust: 100%;
    }
}

/* ---- logo -------------------------------------------------------- */

.logo-container {
    padding-right: var(--space-md);
}

.logo { }

.logo img {
    display: block;
    height: 48px;
}

@media (min-width: 901px) {
    .logo img {
        padding-left: 10px;
    }
}

/* ---- menu --------------------------------------------------------- */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color_nav_bg);
    color: var(--color_fg);
    font: 0.9rem var(--nav-font);
    font-weight: bold;
    padding: var(--space-md) 0;
}

.top-nav-inner {
    position: relative;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu > li {
    margin: 0 0.25rem;
    overflow: hidden;
}

.menu > li > a.item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 0.9rem;
    line-height: 1;
}

.menu > li > a.item:hover {
    background-color: var(--color_fg);
    color: var(--color_bg);
}

.menu-button-container {
    display: none;
    height: 30px;
    width: 30px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#menu-toggle {
    display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
    display: block;
    background-color: black;
    position: absolute;
    height: 4px;
    width: 30px;
    border-radius: 2px;
}

.menu-button {
    transition:
        background-color 250ms ease,
        transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}

.menu-button::before,
.menu-button::after {
    content: '';
    transition:
        margin-top 250ms cubic-bezier(0.23, 1, 0.32, 1),
        transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}

.menu-button::before {
    margin-top: -8px;
}

.menu-button::after {
    margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
    margin-top: 0;
    transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
    background-color: transparent;
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
    margin-top: 0;
    transform: rotate(-405deg);
}

/* ---- mobile nav via class ---------------------------------------- */

html.nav-mobile .menu-button-container {
    display: flex;
}

html.nav-mobile .menu {
    position: absolute;
    top: calc(100% + 1.1em);
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-height: calc(100dvh - 88px);
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

html.nav-mobile #menu-toggle ~ .menu li {
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    flex-shrink: 0;
    transition: height 250ms ease;
}

html.nav-mobile #menu-toggle:checked ~ .menu {
    overflow-y: auto;
}

html.nav-mobile #menu-toggle:checked ~ .menu li {
    border-top: 1px solid #444;
    height: 56px;
}

html.nav-mobile #menu-toggle:checked ~ .menu li:last-child {
    border-bottom: 1px solid #444;
}

html.nav-mobile .menu > li {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
    background-color: var(--color_menu_bg);
    color: var(--color_fg);
}

html.nav-mobile .menu > li > a.item {
    width: 100%;
    height: 100%;
    padding: 0;
    font-size: 1.05rem;
}

html.nav-mobile .menu > li > a.item:active {
    background-color: var(--color_fg);
    color: var(--color_bg);
}

/* ---- page/container/title ---------------------------------------- */

.container {
    background-color: var(--color_bg);
    color: var(--color_fg);
    display: flex;
    justify-content: center;
}

.content-container {
    font: 1rem/1.4 var(--base-font);
    width: var(--content-width);
    margin: 0 auto;
    padding: 0;
}

.title-src {
    display: none;
}

.title-container {
    width: 100%;
}

.title {
    padding: var(--space-lg) var(--space-md) 0 var(--space-md);
    padding-bottom: 0;
}

#textspalten { }

#spalte1 { }

#spalte2 {
    margin-top: 1em;
}

@media (min-width: 900px) {
    .content-container {
        padding: 0 var(--space-sm);
    }

    .title-container {
        width: 100%;
        background-color: var(--color_bg);
    }

    .title {
        color: black;
    }

    #textspalten { }

    #spalte1 {
        width: 14em;
        float: left;
    }

    #spalte2 {
        margin-top: 0;
    }
}

/* ---- content ----------------------------------------------------- */

.content {
    padding: var(--space-md);
}

.block {
    font-size: 1rem;
    line-height: 1.5;
}

.spacer {
    margin-top: var(--space-lg);
}

/* ---- title/subtitle ---------------------------------------------- */

h1,
h2,
h3 {
    color: var(--color_fg);
}

h1,
h2 {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

h3 {
    margin: 0 0 0.5em 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.title h1,
.title h2 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

/* ---- links ------------------------------------------------------- */

a {
    color: var(--color_link);
}

a:link,
a:visited,
a:active {
    text-decoration: none;
}

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

/* ---- picture ----------------------------------------------------- */

.picture {
    width: 100%;
}

.picture img {
    width: 100%;
    padding: 1.2rem 0 1.2rem 0;
}

.picture-title-big {
    width: 100%;
}

.picture-title-big img {
    height: 25rem;
}

.picture-title {
    width: 100%;
}

.picture-title img {
    height: 12rem;
}

.picture-middle {
    width: 100%;
    display: flex;
    align-items: center;
}

.picture-middle img {
    height: 12rem;
    padding: 0 0.5rem 0.5rem 0;
    backface-visibility: hidden;
}

.picture-icon {
    width: 100%;
    display: flex;
    align-items: center;
}

.picture-icon img {
    height: 2rem;
    padding: 0 0.5rem 0.5rem 0;
}

.picture-small {
    width: 100%;
}

.picture-small img {
    width: 75%;
    padding: 1.2rem 0 1.2rem 0;
}

#pic-container {
    -moz-column-count: 2;
    -webkit-column-count: 2;
    column-count: 2;
    width: 100%;
}

.picture-block {
    width: 95%;
}

.picture-block img {
    width: 100%;
}

@media (min-width: 900px) {
    .picture-small {
        width: 100%;
    }

    .picture-small img {
        width: 40%;
        padding: 1.2rem 0 1.2rem 0;
    }
}

.picture-left {
    width: 100%;
}

.picture-left img {
    float: left;
    width: 30%;
    padding: 1.2rem 1.2rem 1.2rem 0;
}

.picture-left:before {
    content: ' ';
    display: block;
    overflow: hidden;
}

.picture-left-wrap {
    float: left;
    width: 38%;
    max-width: 360px;
    margin: 0 1.2rem 1rem 0;
}

.picture-left-wrap img {
    width: 100%;
    display: block;
}

@media (max-width: 768px) {
    .picture-left-wrap {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0 0 1rem 0;
    }
}

.picture-right {
    width: 100%;
}

.picture-right img {
    float: right;
    width: 30%;
    padding: 1.2rem 0 1.2rem 1.2rem;
}

.picture-right:before {
    content: ' ';
    display: block;
    overflow: hidden;
}

.picture-right-wrap {
    float: right;
    width: 38%;
    max-width: 360px;
    margin: 0 0 1rem 1.2rem;
}

.picture-right-wrap img {
    width: 100%;
    display: block;
}

@media (max-width: 768px) {
    .picture-right-wrap {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0 0 1rem 0;
    }
}

.block .img-no-top {
    padding-top: 0;
}

.block .img-no-bottom {
    padding-bottom: 0;
}

.block .img-no-top-no-bottom {
    padding-top: 0;
    padding-bottom: 0;
}

.hero-image {
    width: 100%;
    margin-bottom: var(--space-lg);
}

.hero-image a {
    display: block;
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
}

@media (min-width: 901px) {
    .hero-image {
        height: 320px;
        overflow: hidden;
    }

    .hero-image a {
        display: block;
        height: 100%;
    }

    .hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }
}

.clear {
    clear: both;
}

/* ---- carousel ---------------------------------------------------- */

.carousel {
    display: grid;
    flex-wrap: wrap;
    gap: var(--space-sm);
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .carousel {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) {
    .carousel {
        grid-template-columns: repeat(10, 1fr);
    }

    .carousel.bigger {
        grid-template-columns: repeat(8, 1fr);
    }
}

.carousel a {
    display: block;
}

.carousel img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* ---- contactsheet ------------------------------------------------ */

.contactsheet {
    background: #f2f0ea;
    padding: var(--space-md);
    border-radius: 4px;
    box-shadow: 0 1px 8px rgba(0,0,0,.12);
}

.contactsheet a {
    background: #111;
    padding: var(--space-xs);
    border-radius: 2px;
    display: block;
}

.contactsheet img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 1px;
}

/* ---- gallery grid ------------------------------------------------ */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 800px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    transition: box-shadow 250ms ease;
}

@media (hover: hover) {
    .gallery-item:hover {
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.70), rgba(0,0,0,0.20));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-md);
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font: 0.95rem/1.3 var(--gallery-font);
    letter-spacing: 0.02em;
}

.text-content p {
    color: var(--color_overlay_text);
    font-weight: bold;
    margin: 0;
    text-shadow: 0 1px 3px var(--color_overlay_shadow);
}

@media (hover: hover) {
    .gallery-item:hover img {
        transform: scale(1.1);
    }
}

/* ---- 404 --------------------------------------------------------- */

.not_found {
    width: 100%;
}

.not_found img {
    width: 60%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 900px) {
    .not_found img {
        width: 40%;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---- footer ------------------------------------------------------ */

footer {
    font: 0.85rem/1.4 var(--base-font);
    color: var(--color_fg_muted);
    padding: var(--space-md);
}

.footer-content {
    width: 100%;
    text-align: center;
}
