:root {
    --bg-midnight: #0b1121;
    --bg-card: #1e293b;
    --accent-red: #ef4444;
    --text-head: #f8fafc;
    --text-body: #94a3b8;
    --max-width: 1200px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-midnight);
    color: var(--text-body);
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: var(--text-head);
    margin-top: 0;
    font-weight: 800;
    line-height: 1.1;
}
a {
    color: var(--accent-red);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Navigations-Header */
header {
    padding: 40px 0;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-head);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--accent-red);
    text-decoration: none;
}
.back-btn::before {
    content: '←';
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 50px;
}

.page-title h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.page-title p {
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

/* Lade-Spinner */
.gallery-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.gallery-loader::after {
    content: '';
    width: 48px;
    height: 48px;
    border: 3px solid rgba(248, 250, 252, 0.15);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: gallery-spin 0.8s linear infinite;
}

@keyframes gallery-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-loader::after {
        animation: none;
        border-top-color: rgba(248, 250, 252, 0.4);
    }
}

/* Bildraster */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 60px;
}

.gallery-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.3);
}

.gallery-item:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

.gallery-status {
    text-align: center;
    padding: 60px 0;
    color: var(--text-body);
}

.gallery-status[hidden] {
    display: none;
}

/* Lightbox */
body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background-color: rgba(11, 17, 33, 0.95);
    color: var(--text-head);
}

.lightbox::backdrop {
    background: transparent;
}

.lightbox-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 40px);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(11, 17, 33, 0.7);
    color: var(--text-head);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    background: var(--accent-red);
    color: #fff;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Rechtlicher Hinweis */
.gallery-notice {
    max-width: 760px;
    margin: 0 auto 60px;
    padding: 24px 28px;
    background-color: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.gallery-notice p {
    margin: 0;
}

.gallery-notice p + p {
    margin-top: 12px;
}

footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #64748b;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.legal-links a {
    color: #64748b;
    transition: color 0.3s;
    text-decoration: none;
}
.legal-links a:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .gallery-notice {
        padding: 20px;
    }
    .lang-switch {
        top: 20px;
        right: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item,
    .lightbox-close,
    .lightbox-nav {
        transition: none;
    }
    .gallery-item:hover,
    .gallery-item:focus-visible {
        transform: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .lightbox-image {
        max-width: 100vw;
        max-height: calc(100vh - 140px);
    }
    .lightbox-close,
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    .lightbox-nav {
        top: auto;
        bottom: 24px;
        transform: none;
    }
    .lightbox-prev {
        left: calc(50% - 60px);
    }
    .lightbox-next {
        right: calc(50% - 60px);
    }
}
