:root {
    --text: #494949;
    --text-dark: #2f2f2f;
    --surface: #ffffff;
    --surface-soft: #f4f5f6;
    --surface-muted: #eceff1;
    --accent: #3f3f3f;
    --border: rgba(73, 73, 73, 0.14);
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.16);
    --radius: 12px;
    --header-height: 66px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--surface);
    color: var(--text);
    font-family: 'Roboto Slab', serif;
    line-height: 1.65;
}

body.lightbox-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a,
img[role="button"] {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
img[role="button"]:focus-visible {
    outline: 3px solid #757575;
    outline-offset: 4px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: var(--header-height);
    padding: 0 48px;

    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

#logo {
    flex: 0 0 auto;
}

#logo a {
    display: flex;
    align-items: center;
}

#logo img {
    display: block;
    width: 44px;
    height: auto;
    transition: opacity 200ms ease, transform 200ms ease;
}

#logo a:hover img {
    opacity: 0.75;
    transform: scale(1.03);
}

#main-nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#main-nav a {
    position: relative;
    display: inline-block;
    padding: 22px 0 18px;
    color: var(--text);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

#main-nav a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 14px;
    left: 0;
    height: 2px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 200ms ease;
}

#main-nav a:hover::after,
#main-nav a:focus-visible::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 28px;
}

.menu-toggle::before {
    content: '\f0c9';
    font-family: FontAwesome;
}

.menu-toggle.active::before {
    content: '\f00d';
}

/* Allgemeine Sektionen */
main {
    padding-top: var(--header-height);
}

.page-section {
    width: 100%;
    padding: 72px 24px;
}

.section-heading {
    width: min(100%, 1000px);
    margin: 0 auto 38px;
    text-align: center;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--text-dark);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.section-heading h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.section-heading h2 {
    font-size: clamp(1.85rem, 4vw, 2.7rem);
}

.section-heading hr {
    width: 44px;
    height: 4px;
    margin: 18px auto 0;
    border: 0;
    border-radius: 999px;
    background: var(--text);
}

/* Titelbild */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    background: var(--surface);
}

.hero-image {
    display: block;
    width: min(100%, 1100px);
    max-height: 68vh;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Bilder */
.image-section-light {
    background: var(--surface-soft);
}

.team-section {
    background: var(--surface);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.image-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    min-height: 250px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.image-card::after {
    content: '\f00e';
    position: absolute;
    right: 16px;
    bottom: 16px;

    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;

    border-radius: 50%;
    background: rgba(255, 255, 255, 0.90);
    color: var(--text-dark);
    font-family: FontAwesome;
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
}

.image-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 250px;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 350ms ease, filter 350ms ease;
}

.image-card:hover {
    box-shadow: var(--shadow-hover);
}

.image-card:hover img,
.image-card:focus-within img {
    transform: scale(1.035);
    filter: brightness(0.92);
}

.image-card:hover::after,
.image-card:focus-within::after {
    opacity: 1;
    transform: translateY(0);
}

/* Link-Karten */
.links-section {
    background: var(--surface-muted);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: min(100%, 1100px);
    margin: 0 auto;
}

.gallery-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 112px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.gallery-link:hover,
.gallery-link:focus-visible {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-link-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text-dark);
    font-size: 24px;
}

.gallery-link-title {
    color: var(--text-dark);
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
}

.gallery-link-arrow {
    color: var(--text);
    font-size: 18px;
    transition: transform 200ms ease;
}

.gallery-link:hover .gallery-link-arrow {
    transform: translateX(5px);
}

/* Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 78px 28px 30px;

    background: rgba(12, 14, 16, 0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(1120px, calc(100vw - 210px));
    height: calc(100vh - 115px);
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 44px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.52);
}

.lightbox-counter {
    margin: 14px 0 0;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.lightbox-close,
.lightbox-arrow {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.lightbox-close:hover,
.lightbox-arrow:hover,
.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.06);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 48px;
    height: 48px;
    font-size: 22px;
}

.lightbox-arrow {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    font-size: 24px;
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 26px 24px;
    background: #3f3f3f;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #f0f0f0;
    font-size: 12px;
    line-height: 1.7;
}

.site-footer a {
    color: #c8e5ef;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}

/* Navigation und Tablet */
@media (max-width: 1200px) {
    .site-header {
        padding: 0 18px 0 30px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    #main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        background: #ffffff;
        border-top: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
    }

    #main-nav.active {
        display: block;
    }

    #main-nav ul {
        display: block;
    }

    #main-nav li {
        border-bottom: 1px solid #eeeeee;
    }

    #main-nav a {
        display: block;
        padding: 13px 30px;
        font-size: 15px;
    }

    #main-nav a::after {
        display: none;
    }

    #main-nav a:hover {
        background: var(--surface-soft);
    }
}

@media (max-width: 900px) {
    .page-section {
        padding: 60px 20px;
    }

    .image-grid,
    .link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .image-grid .image-card:last-child,
    .link-grid .gallery-link:last-child {
        grid-column: 1 / -1;
        width: min(100%, calc(50% - 13px));
        justify-self: center;
    }

    .image-lightbox {
        gap: 12px;
        padding: 72px 12px 22px;
    }

    .lightbox-content {
        width: calc(100vw - 130px);
        height: calc(100vh - 100px);
    }

    .lightbox-arrow {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Smartphone */
@media (max-width: 620px) {
    :root {
        --header-height: 62px;
    }

    .site-header {
        min-height: var(--header-height);
        padding: 0 10px 0 18px;
    }

    #logo img {
        width: 40px;
    }

    #main-nav a {
        padding-right: 20px;
        padding-left: 20px;
    }

    .page-section {
        padding: 48px 14px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .section-heading hr {
        margin-top: 14px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .hero-image {
        max-height: none;
        border-radius: 9px;
    }

    .image-grid,
    .link-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .image-grid .image-card:last-child,
    .link-grid .gallery-link:last-child {
        grid-column: auto;
        width: 100%;
    }

    .image-card,
    .image-card img {
        min-height: 215px;
    }

    .gallery-link {
        min-height: 96px;
        padding: 18px;
    }

    .gallery-link-icon {
        width: 50px;
        height: 50px;
        font-size: 21px;
    }

    .gallery-link-title {
        font-size: 15px;
    }

    .image-lightbox {
        display: block;
        padding: 68px 10px 84px;
    }

    .lightbox-content {
        width: 100%;
        height: calc(100vh - 145px);
    }

    #lightbox-image {
        max-height: calc(100% - 34px);
        border-radius: 7px;
    }

    .lightbox-arrow {
        position: absolute;
        bottom: 18px;
        width: 50px;
        height: 50px;
    }

    .lightbox-prev {
        left: calc(50% - 64px);
    }

    .lightbox-next {
        right: calc(50% - 64px);
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .lightbox-counter {
        margin-top: 9px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}