/* --- Allgemeines Layout --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
}

header {
    background-image: url('images/headerbild_4.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

section {
    padding: 2rem;
}

h2 {
    color: #333;
}

/* --- Flexbox Galerie --- */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Außenansichten */
.gallery figure {
    flex: 1 1 calc(33.33% - 16px);
    max-width: 350px;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery figure:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

/* Innenansichten: kleiner, vergrößern beim Hover */
.gallery figure.interior {
    flex: 1 1 calc(20% - 16px);
    max-width: 200px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery figure.interior:hover {
    transform: scale(1.5);
    z-index: 10;
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* Bilder */
.gallery-image {
    width: 100%;
    max-height: 250px;      /* vertikale Bilder begrenzen */
    object-fit: cover;       /* proportional, schneidet Überstände */
    display: block;
}

/* Innenbilder noch kleiner für Start */
.gallery figure.interior .gallery-image {
    max-height: 150px;      /* kleiner für Innenansichten */
}

/* Bildunterschriften */
.gallery figcaption {
    text-align: center;
    font-size: 0.9em;
    padding: 8px;
    background: #f9f9f9;
    color: #333;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .gallery figure {
        flex: 1 1 calc(50% - 16px);
    }
    .gallery figure.interior {
        flex: 1 1 calc(33% - 16px);
    }
}

@media (max-width: 600px) {
    .gallery figure,
    .gallery figure.interior {
        flex: 1 1 100%;
    }
}

/* --- Tabellen --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 1rem;
    text-align: left;
}

/* --- Formulare --- */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Footer --- */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}
