/* style.css */

/* --- 1. Grundlegende Resets & Basisstile --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, sans-serif;
    font-size: 10pt;
    color: #333;
    line-height: 1.6;
    background-color: #DDD7B5; /* Einfache beige Hintergrundfarbe */
    background-repeat: repeat;
    background-attachment: scroll;
}

/* --- 2. Allgemeine Link-Stile --- */
a {
    color: #000;
    text-decoration: none;
    font-size: 9pt; /* Standard-Linkgröße */
    transition: color 0.3s, background-color 0.3s, font-weight 0.3s;
}

a:hover,
a:focus {
    color: red;
    font-weight: bold;
}

/* --- 3. Header-Bereich (mit Titel und Navigation) --- */
.site-header {
    background-color: #DDD7B5;
    padding: 20px 0;
    border-bottom: 1px solid #c0c0c0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Styling für das Header-Bild */
.site-title-image {
    max-width: 100%; /* Bild soll nicht über den Container hinausgehen */
    height: auto; /* Höhe proportional anpassen */
    display: block; /* Für Zentrierung */
    margin: 0 auto; /* Zentriert das Bild */
    padding-bottom: 10px; /* Etwas Abstand zur Navigation, falls gewünscht */
}

/* --- 4. Hauptnavigation --- */
.main-nav {
    width: 100%;
    text-align: center;
}

.main-nav .nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 15px;
    position: relative;
    z-index: 20;
}

.main-nav li {
    position: relative;
    flex-shrink: 0;
}

.main-nav li a {
    display: block;
    padding: 8px 12px;
    font-size: 10pt;
    font-weight: bold;
    color: #000;
    border-radius: 5px;
    white-space: nowrap;
    background-color: transparent;
}

.main-nav li a:hover {
    background-color: rgba(0,0,0,0.08);
    color: red;
}

/* --- 5. Dropdown-Menü für News --- */
.dropdown-container {
    position: relative;
}

.dropdown-container .toggle-dropdown {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.dropdown-container .arrow-down {
    margin-left: 5px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.dropdown-container.active .arrow-down {
    transform: rotate(-135deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fefefe;
    min-width: 180px;
    box-shadow: 0px 5px 15px 0px rgba(0,0,0,0.15);
    z-index: 10;
    border-radius: 4px;
    padding: 5px 0;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    border: 1px solid #eee;
    text-align: left;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    color: #333;
    padding: 10px 15px;
    font-size: 9pt; /* Standardgröße für Dropdown-Links */
    display: block;
    font-weight: normal;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #e0e0e0;
    color: red;
    font-weight: bold;
}

/* --- 6. Hauptinhaltsbereich --- */
.content-wrapper {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.main-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

/* Container für Bild mit Trauerstreifen */
.image-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto 30px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: inline-block;
}

/* NEUE, ZUVERLÄSSIGE REGEL für den Trauerflor */
.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    /* Erzeugt ein Dreieck in der oberen rechten Ecke */
    border-style: solid;
    border-width: 0 80px 80px 0; /* Die Größe des Flors kann hier angepasst werden (80px) */
    border-color: transparent rgba(0,0,0,0.6) transparent transparent; /* Farbe und Transparenz */
    z-index: 2;
}

.welcome-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.intro-text {
    font-size: 1.2em;
    color: #444;
    margin-bottom: 1.5em;
    line-height: 1.8;
    text-align: left;
}


/* --- 7. Footer-Bereich --- */
.site-footer {
    background-color: #333;
    color: #eee;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    font-size: 1em;
}

.site-footer .footer-links {
    margin-bottom: 15px;
}

.site-footer .footer-links a {
    color: #add8e6;
    margin: 0 15px;
    font-weight: normal;
    font-size: 10pt;
}

.site-footer .footer-links a:hover {
    color: #fff;
    font-weight: bold;
}

/* --- 8. Modals (Impressum/Datenschutz) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    position: relative;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content iframe {
    flex-grow: 1;
    border: none;
    width: 100%;
    min-height: 400px;
}

.close-button {
    color: #888;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #333;
}

/* --- 9. Responsive Design Anpassungen (Media Queries) --- */
@media (max-width: 992px) {
    .main-nav .nav-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav li a {
        padding: 8px 10px;
    }

    .site-title-image {
        max-width: 90%; /* Etwas kleiner auf Tablets */
    }
}

@media (max-width: 768px) {
    .site-header,
    .content-wrapper,
    .site-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-content {
        gap: 15px;
    }

    .site-title-image {
        max-width: 100%; /* Volle Breite auf Mobil */
    }

    .main-nav .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0;
        overflow-x: visible;
        padding-bottom: 0;
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 10px;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        text-align: center;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav li a {
        padding: 12px 15px;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #e6e6e6;
        border-radius: 0;
        border-top: 1px solid rgba(0,0,0,0.1);
        padding: 0;
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu li a {
        padding: 10px 25px;
        font-weight: normal;
    }

    .main-content {
        padding: 25px;
    }

    .intro-text {
        font-size: 1.1em;
    }

    .modal-content {
        width: 95%;
        padding: 25px;
    }

    .welcome-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .site-title-image {
        max-width: 100%; /* Sicherstellen, dass es auf sehr kleinen Bildschirmen passt */
    }

    .site-footer .footer-links a {
        display: block;
        margin: 5px 0;
    }

    .intro-text {
        font-size: 1em;
    }
}

/* --- 10. Unter-Navigation (z.B. für Historie) --- */
.sub-nav {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #c0c0c0; /* Trennlinie wie beim Header */
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.sub-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Wichtig für mobile Ansicht */
    gap: 15px;
    padding: 0;
}

.sub-nav li a {
    display: block;
    padding: 8px 12px;
    font-size: 10pt; /* Gleiche Größe wie Hauptmenü */
    font-weight: bold; /* Gleiches Gewicht */
    color: #000;
    border-radius: 5px;
    white-space: nowrap;
    background-color: transparent;
    transition: color 0.3s, background-color 0.3s;
}

.sub-nav li a:hover,
.sub-nav li a:focus {
    background-color: rgba(0,0,0,0.08);
    color: red; /* Gleicher Hover-Effekt */
}

/* Stil für den aktiven, aktuell ausgewählten Menüpunkt */
.sub-nav li.active a {
    background-color: rgba(0,0,0,0.08);
    color: #333;
    cursor: default;
    font-weight: bold;
}