/* Grundlayout, Vollbild-Hintergrund */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: "Microsoft YaHei UI Light", "Microsoft YaHei UI",
                 "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    color: #fdfdfd;
}

body {
    background-image: url("img/hintergrund.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* halbtransparente Overlay-Box für bessere Lesbarkeit */
.page-wrapper {
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

/* Kopfbereich mit Titel + Datum/Zeit + Textbox in gleicher Höhe */
.header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center; /* vertikal mittig ausrichten */
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-title {
    font-size: 1.8rem;
    letter-spacing: 0.1rem;
}

.nav {
    margin-top: 5px;
}

.nav a {
    color: #fdfdfd;
    text-decoration: none;
    margin-right: 15px;
    font-size: 0.95rem;
}

.nav a:hover {
    text-decoration: underline;
}

/* rechter oberer Sektor, Datum/Zeit zentriert */
.datetime-wrapper {
    position: relative;
    width: 50vw;   /* rechter Halb-Bereich */
    height: 25vh;  /* oberes Viertel */
}

.datetime-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 28pt;
}

/* Bereich unter dem Header:
   links Textbox, rechts (unsichtbar) Platzhalter, damit Textbox
   auf gleiche vertikale Höhe wie Datum/Zeit gebracht wird */
.main {
    flex: 1;
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Zeile direkt unter dem Header */
.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Textbox vertikal auf Höhe Datum/Zeit */
    gap: 20px;
}

/* Textbox links oben */
.text-box {
    max-width: 800px;
    background: rgba(0, 0, 0, 0.35);
    padding: 15px 20px;
    border-radius: 8px;
}

/* Textbox-Inhalt für Scroll-Text */
.text-box-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* normaler Text (erste Zeile) */
.text-static {
    font-size: 1.8rem;
}

/* zweite Zeile: horizontaler Lauftext innerhalb der Textbox */
.text-marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;       /* nur innerhalb der Box sichtbar */
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 6px;
}

.text-marquee {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
}

/* Animation von rechts nach links */
@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Bildcontainer */
.image-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Bilder in Galerie: 2 pro Zeile, flexibel */
.gallery-image {
    flex: 1 0 calc(50% - 15px);  /* zwei Items pro Reihe */
    max-width: calc(50% - 15px);
}

.gallery-image img {
    width: 100%;       /* füllt die verfügbare Breite */
    height: auto;      /* keine Verzerrung */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Footer mit dynamischem Copyright */
.footer {
    font-size: 0.75rem;
    text-align: center;
    padding: 8px 5px 10px 5px;
    color: #f0f0f0;
}

/* Responsiv */
@media (max-width: 900px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .datetime-wrapper {
        width: 100vw;
        height: 20vh;
    }

    .top-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 1.4rem;
    }

    .datetime-box {
        font-size: 22pt;
    }

    .gallery-image {
        flex: 1 0 100%;
        max-width: 100%;
    }
}
