/* Allgemeine Stil-Einstellungen */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #333;
    background: url('images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column; /* Ermöglicht ein flexibles Layout mit Footer */
    min-height: 100vh; /* Bildschirmhöhe ausfüllen */
    overflow-x: hidden; /* Entfernt horizontales Scrollen */
}

/* Topbar */
.topbar {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: center; /* Zentriert den Text horizontal */
    align-items: center; /* Zentriert den Text vertikal */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0; /* Fixiert die Topbar am oberen Rand */
    z-index: 10; /* Überlagert andere Elemente */
}

.topbar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    margin: 0 15px; /* Abstand zwischen Links */
}

.topbar a:hover {
    text-decoration: underline;
}

/* Header */
header {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8); /* Halbtransparenter Hintergrund */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    font-size: 2rem;
    margin: 0;
    color: #000;
}

header p {
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
}

/* Main */
main {
    flex: 1; /* Nimmt den verfügbaren Platz zwischen Header und Footer ein */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Kategorie-Abschnitte */
.category-section {
    background-color: rgba(255, 255, 255, 0.9); /* Sichtbarer Bereich */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center; /* Zentriert die Überschriften und Inhalte */
}

.category-section h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #222;
}

/* Karussell für Kategorien */
.category-carousel {
    display: flex;
    overflow-x: auto; /* Ermöglicht horizontales Scrollen */
    gap: 15px;
    padding: 10px 0;
    scroll-snap-type: x mandatory; /* Aktiviert Snap-Scrolling */
    scrollbar-width: none; /* Versteckt Scrollbar in Firefox */
    -ms-overflow-style: none; /* Versteckt Scrollbar in IE und Edge */
}

.category-carousel::-webkit-scrollbar {
    display: none; /* Versteckt Scrollbar in Webkit-Browsern */
}

.category-carousel div {
    flex: 0 0 70%; /* Flexible Breite der Elemente */
    max-width: 300px; /* Maximale Breite */
    height: 250px; /* Höhe anpassen, um Platz für den Button zu schaffen */
    background-color: #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Ermöglicht vertikale Ausrichtung von Inhalt und Button */
    align-items: center;
    justify-content: flex-start; /* Inhalt nach oben ausrichten */
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease; /* Für den Hover-Effekt */
    scroll-snap-align: center; /* Zentriert das Element im Karussell */
}

/* Hover-Effekt für die Box */
.category-carousel div:hover {
    transform: scale(1.1); /* Vergrößert die Box */
}

/* Bilder im Karussell */
.category-carousel img {
    width: 100%; /* Bilder auf die volle Boxenbreite */
    height: auto; /* Proportionale Anpassung der Höhe */
    border-radius: 10px;
    transition: transform 0.3s ease; /* Für den Hover-Effekt */
}

/* Bilder im Karussell beim Hover */
.category-carousel div:hover img {
    transform: scale(1.1); /* Vergrößert das Bild beim Hover */
}

/* Button für jede Kategorie */
.category-button {
    background-color: #ff6600; /* Orangefarbener Hintergrund */
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 20px; /* Abstand zum Bild */
    text-align: center; /* Zentriert den Button innerhalb des Containers */
}

/* Hover-Effekt für den Button */
.category-button:hover {
    background-color: #e65c00; /* Dunkleres Orange beim Hover */
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    margin-top: auto; /* Drückt den Footer nach unten */
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-carousel div {
        flex: 0 0 90%; /* Breitere Boxen auf kleineren Bildschirmen */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem; /* Kleinere Schriftgröße auf kleinen Bildschirmen */
    }
    .category-carousel div {
        flex: 0 0 100%; /* Boxen passen sich voll an */
    }
}
