/* Allgemeine Stile */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Allgemeine Box-Stile für Content */
.content-box {
    background-color: #ffffff;
    padding: 20px;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1000px; /* Breite begrenzen */
}

/* Abstand zwischen den Boxen */
.content-box + .content-box {
    margin-top: 15px;
}

/* Grundlegende Stile */
body {
    color: #333;
    background: linear-gradient(135deg, #e0e0e0, #c7c7c7);
    line-height: 1.6;
}

/* Einheitliche Farbe für obere Leiste und Navigationsleiste */
.top-bar, nav {
    background-color: #003399;
    color: #ffffff;
}

.top-bar {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.top-bar a {
    color: #ffffff;
    text-decoration: none;
}

/* Flaggen-Anpassung */
.top-bar .languages img {
    width: 20px;
    height: auto;
    margin-left: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.top-bar .languages img:hover {
    transform: scale(1.1);
}

/* Navigation */
nav {
    padding: 10px 0;
    text-align: center;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: #cccccc;
}

/* Header */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), 
    url('/assets/images/header-background.jpg') no-repeat center center;
    background-size: cover;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    position: relative;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Logo im Header */
header .logo {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px;
    border-radius: 5px;
}

header .logo img {
    width: 200px;
    height: 150px;
    margin-right: -100px;
}

header .logo-text {
    font-size: 2.5em;
    font-weight: bold;
    color: #949191;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Call-to-Action-Button */
.contact-button {
    color: #ffffff;
    text-decoration: none;
    padding: 12px 25px;
    background-color: #ff5733;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 15px;
}

.contact-button:hover {
    background-color: #cc4627;
    transform: scale(1.05);
}

/* Begrüßungstext */
.welcome-section {
    background-color: rgba(224, 231, 255, 0.8);
    padding: 30px;
    margin: 20px auto;
    border-radius: 10px;
    max-width: 1200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.welcome-section h1 {
    color: #0044cc;
    margin-bottom: 20px;
}

/* Hauptinhalt */
main {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* --- GALERIE-ANPASSUNGEN --- */

/* Desktop: Standard 3-Spalten-Layout */
.gallery, .video-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
}

/* Mobile Ansicht: Videos untereinander */
@media (max-width: 768px) {
    .gallery, .video-gallery {
        grid-template-columns: 1fr; /* Mobil: 1 Spalte */
    }

    .video-container {
        width: 100%;
        max-width: 100%;
    }
}

/* Galerie-Elemente */
.video-item {
    width: 250px;
    text-align: center;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    overflow: hidden;
}

.gallery-item img {
    width: 100%; /* Volle Breite des Containers */
    height: 180px; /* Einheitliche Höhe */
    object-fit: cover; /* Verhindert Verzerrung, schneidet überstehende Teile */
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-thumb, .video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    border-radius: 8px;
}

.gallery-thumb:hover, .video-thumbnail:hover {
    transform: scale(1.05);
}

/* Play-Overlay für Videos */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 2;
}

/* --- POPUP-STIL FÜR BILDER UND VIDEOS --- */

.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.popup-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    background: white;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup img, .popup video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    color: white;
    cursor: pointer;
}

/* --- FOOTER --- */
footer {
    background-color: #222;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    margin-top: 40px;
}

footer p {
    margin-bottom: 8px;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

footer .footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: #cccccc;
}

/* Mobile Ansicht: Videos untereinander und auf gleiche Grˆﬂe setzen */
@media (max-width: 768px) {
    .video-gallery {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .video-container {
        width: 90%;
        max-width: 320px; /* Einheitliche Breite */
        height: auto;
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        background-color: #000; /* Falls Video nicht l‰dt, schwarzer Hintergrund */
    }

    .gallery-item {
        width: 90%;
        max-width: 320px;
        text-align: center;
    }

    .gallery-thumb {
        width: 100%;
        height: 180px; /* Einheitliche Hˆhe */
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }

    /* Falls das Video nicht l‰dt, zeigt es das Poster-Bild */
    .video-container video {
        width: 100%;
        height: 180px;
        object-fit: cover;
        background-color: #000;
    }
}