/* Header */
header.überschrift {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    margin: 20px auto;
    max-width: 100%;
    opacity: 1;
    transform: translateY(50px);
    transition: all 1s ease-in-out;
    padding: 15px;
    box-sizing: border-box;
}
header.überschrift.visible {
    opacity: 1;
    transform: translateY(0);
}
header.überschrift h1,
header.überschrift h2 {
    background: linear-gradient(to right, #235c6f, #031d3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}
.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.subtitle {
    font-size: 1.1rem;
    color: #bdc3c7;
    font-style: italic;
}

/* Galerie */
.gallery {
    padding: 20px 10px;
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}
.gallery-item {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease-in-out, box-shadow 0.3s ease;
    filter: grayscale(0.1) blur(0.2px) saturate(0.6);
    border: 3px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    /* Schnelleres Rendering */
    content-visibility: auto;
    contain-intrinsic-size: 0 200px;
    will-change: transform;
}
.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    filter: brightness(1.05) saturate(1.1);
}
.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    decoding: async;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

/* Caption */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 8px 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .caption {
    opacity: 1;
}

/* Footer */
footer {
    background-color: #34495e;
    color: white;
    padding: 15px 10px;
    text-align: center;
}
.footer-link {
    color: #ff9800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin: 5px 0;
}
.footer-link:hover {
    color: #ff5722;
    text-decoration: underline;
}

/* Bild Hover Effekt (für .bild Klasse) */
.bild:hover {
    transform: scale(1.09);
    transition: transform 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    header.überschrift {
        margin: 15px auto;
        border-radius: 10px;
    }
    .page-title {
        font-size: 2.2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .gallery-img {
        height: 180px;
    }
}
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 0.95rem;
    }
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .gallery-img {
        height: 160px;
    }
    .caption {
        font-size: 1rem;
        padding: 6px 3px;
    }
}
@media (max-width: 480px) {
    header.überschrift {
        margin: 10px auto;
        border-radius: 8px;
    }
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .page-title {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 0.9rem;
    }
    .gallery-img {
        height: 220px;
    }
    .caption {
        font-size: 0.9rem;
    }
}
