body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #fffaf5;
    color: #333;
}

header {
    background-color: #e2b07f;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

.top-bar {
    background-color: #d19965;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    text-align: center;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.logo img {
    max-width: 120px;
    margin: 0 auto;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    background-color: #f3e6d3;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0.5rem 1rem;
}

nav ul li a {
    text-decoration: none;
    color: #5a3e1b;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #b2743b;
}

nav ul li a.active {
  color: #b2743b;
  text-decoration: underline;
}

.hero {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    background: url('img/backstube.webp') center/cover no-repeat;
    background-attachment: fixed;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    z-index: 0;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* halbtransparenter schwarzer Overlay */
    z-index: 1;
}

.hero h2,
.hero p {
    position: relative;
    background-color: rgba(0, 0, 0, 0.6);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 2; /* damit der Text über dem Overlay bleibt */
}

.galerie, .rezensionen, .kontaktbereich {
    padding: 2rem;
    text-align: center;
}

h2 {
    color: #5a3e1b;
    margin-bottom: 1rem;
}

.bildergalerie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.bildergalerie img {
    width: 100%;
    height: 70%; /* feste Höhe */
    object-fit: cover; /* Bild wird zugeschnitten, behält aber Seitenverhältnis */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.bildergalerie img:hover {
    transform: scale(1.05);
}

.produkte {
    padding: 2rem;
    text-align: center;
}

.produkt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.produkt-card {
    background: #fff8f0;
    border: 2px solid #e2c9a3;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.produkt-card:hover {
    transform: scale(1.03);
}

.produkt-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.produkt-card p {
    font-size: 1rem;
    color: #333;
}

.produkt-bilder-grid {
    display: grid;
    grid-template-columns: repeat(4, 2fr); /* genau 4 Spalten */
    gap: 15px;
    margin-top: 30px;
    padding: 0 20px 40px;
    padding-left: 100px;
}

.produkt-bilder-grid img {
    width: 70%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.produkt-bilder-grid img:hover {
    transform: scale(1.05);
}

.review {
    background-color: #fff0e6;
    margin: 1rem auto;
    padding: 1rem;
    max-width: 600px;
    border-radius: 6px;
    font-style: italic;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

footer {
    background-color: #e2b07f;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Kontaktformular */
form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    background-color: #fff0e6;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

form input, form textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #d8b898;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fffaf5;
}

form textarea {
    resize: vertical;
}

button {
    background-color: #d19965;
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b2743b;
}

.galerie iframe {
    width: 100%;
    height: 300px; /* Passen Sie die Höhe an, falls erforderlich */
    border: 0;
}

/* Responsive Verbesserungen */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    nav ul {
        flex-direction: column;
    }

    .bildergalerie {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    .hero {
        background-attachment: scroll; /* Deaktiviert Parallax auf kleinen Bildschirmen */
    }
    .produkt-bilder-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 1024px) {
    .produkt-bilder-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Smartphone: 1 Spalte */
@media (max-width: 600px) {
    .produkt-bilder-grid {
        display: grid;
        grid-template-columns: 1fr;
        place-items: center;       /* zentriert Inhalte horizontal & vertikal */
        gap: 1rem;
        padding: 1rem;
    }

    .produkt-bilder-grid img {
        width: 100%;
        max-width: 250px;          /* verhindert zu große Bilder */
        height: auto;
        display: block;
    }
    .galerie iframe {
        height: 250px; /* Kleinere Höhe auf Mobilgeräten */
    }
}