/*
Theme Name: Hundertblumen2
Theme URI: 
Author: 
Description: Ein sauberes WordPress Theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hundertblumen2
*/

/* Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Geneva, sans-serif;
}

/* Layout */
.container {
    width: 1024px;
    margin: 0 auto;
}

/* Header */
header {
    width: 100%;
    text-align: center;
}

/* Navigation */
.main-menu,
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 3;
}

.main-menu li {
    position: relative;
    font-size: 14px;
    float: left;
}

.main-menu a {
    display: block;
    width: 128px;
    padding: 5px 15px 5px 20px;
    border-top: 1px solid white;
    border-right: 1px solid white;
    background: #de3832;
    color: white;
    text-decoration: none;
}

/* Aktive Menüpunkte */
.main-menu .current-menu-ancestor > a,
.main-menu .current-menu-parent > a,
.main-menu .current-menu-item > a,
.main-menu li:hover li a:hover {
    background: #de3832 url(img/blume_gruen.gif) no-repeat;
}

/* Untermenü */
.sub-menu {
    display: none;
    font-size: 11px;
    margin: 0;
    padding: 0;
    z-index: 4;  /* Höherer z-index für Untermenüs */
}

.main-menu li:hover .sub-menu {
    display: block;
    position: absolute;
}

.main-menu li:hover li {
    float: none;
    font-size: 11px;
}

/* Content */
#content {
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 22px;
}

#content > div {
    margin: 0;
    padding: 0;
}

.entry-content {
    margin: 0;
    padding: 0;
}

/* Überschriften */
#content h1 {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin: 0 0 15px 0;
    position: relative;
}

#content h2 {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    margin: 0 0 15px 0;
    position: relative;
}

/* Startseiten-Überschrift */
.home #content h2 {
    font-size: 16px;  /* Größer wie h1 auf anderen Seiten */
    font-weight: bold;
    color: #000000;
    margin: 0 0 15px 0;
    position: relative;
}

/* Bilder und Text */
#content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

#content p, #content div {
    margin: 0 0 15px 0;
}

#content p:last-child, #content div:last-child {
    margin-bottom: 0;
}

/* Seitenleiste */
td.left {
    width: 190px !important;
    min-height: 500px;
    background-color: #9fdc31;
    padding: 15px 0;
}

.green-box {
    width: 185px;
    margin: 5px auto;
}

.green-box .box {
    padding: 10px 15px;
    width: 185px;
    background-color: #7CBC0A;
    border-radius: 8px;
    font-size: 11px;
    line-height: 16px;
}

/* Footer */
td.footer {
    width: 1024px;
    text-align: center;
    background: #de3832;
    padding: 8px 0;
}

#text {
    font-size: 11px;
    color: white;
    line-height: 24px;
}

#text a {
    color: #FFF;
    text-decoration: none;
}

#text a[href*="impressum"] {
    text-decoration: underline;
}

/* Tabellen-Layout */
#master {
    width: 1024px;
    border-collapse: collapse;
    table-layout: fixed;
}

#master td {
    vertical-align: top;
}

/* Content-Spalte */
td[style*="width: 710px"] {
    width: 710px !important;
    position: relative;
    padding: 25px 25px;
}

/* Sidebar ausblenden */
#sidebar,
#secondary,
.widget-area {
    display: none !important;
}

/* Mobile Menü Basis */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 15px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9999;
    background: #de3832;
    border-radius: 3px;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.4s;
}

/* Aktiver Zustand */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Styles */
@media (max-width: 1024px) {
    /* Tabellen-Layout für Mobile */
    #master,
    #master tbody,
    #master tr {
        display: flex;
        flex-direction: column;
    }

    /* Content zuerst */
    td[style*="width: 710px"] {
        order: 1;
        width: 100% !important;
        padding: 15px;
        box-sizing: border-box;
    }

    /* Seitenleiste danach */
    td.left {
        order: 2;
        width: 100% !important;
        margin: 20px 0;
        padding: 15px;
    }

    /* Footer zuletzt */
    td.footer {
        order: 3;
        width: 100% !important;
        padding: 15px;
    }

    /* Basis-Layout */
    .container {
        width: 100%;
        max-width: 100%;
        padding: 15px;  /* Zurück zu 15px */
    }

    #master {
        width: 100% !important;
    }

    /* Alle Text-Container */
    #content,
    .green-box,
    .green-box .box,
    #text,
    .entry-content,
    article,
    .page-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px;  /* Zurück zu 15px */
        word-wrap: break-word;
        box-sizing: border-box;
    }

    /* Überschriften und Text */
    #content h1,
    #content h2 {
        width: 100%;
        margin: 0 0 20px 0;
        font-size: 1.4em;  /* Größere Schrift */
    }

    #content p {
        width: 100%;
        font-size: 1.1em;  /* Größere Schrift */
        line-height: 1.6;
    }

    /* Bilder im Content */
    #content img {
        width: 100%;
        height: auto;
        margin: 20px 0;
    }

    /* Navigation */
    nav .main-menu {
        display: none !important;  /* Versteckt standardmäßig */
    }

    nav .main-menu.active {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        background: #de3832;
        padding: 60px 0 20px;
        z-index: 9998;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    /* Burger-Button anzeigen */
    .menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9999;
        background: #de3832;
        padding: 15px;
        border: none;
        border-radius: 3px;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: white;
        margin: 5px 0;
    }

    /* Aktiver Zustand des Burger-Buttons */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Basis-Menü-Stil */
    nav .main-menu.active li {
        float: none !important;
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    /* Klickbare Menü-Links */
    nav .main-menu.active li a {
        display: block !important;
        width: 100% !important;
        padding: 12px 25px !important;
        color: white !important;
        background: none !important;
        border: none !important;
        font-size: 14px;
        transition: none !important;
    }

    /* Nicht klickbare Menü-Headlines */
    nav .main-menu.active li > a[style*="cursor: default"] {
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 12px !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 20px 25px 10px !important;
        pointer-events: none;
    }

    /* Untermenüs */
    nav .main-menu.active .sub-menu {
        display: block !important;
        width: 100% !important;
        position: static !important;
        background: none !important;
        padding: 0 0 10px 0 !important;
        margin: 0 !important;
    }

    nav .main-menu.active .sub-menu li a {
        padding: 8px 25px 8px 35px !important;
        font-size: 13px !important;
        opacity: 0.9;
    }

    /* Hover-Effekte */
    nav .main-menu.active a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    /* Keine Hover-Effekte für Headlines */
    nav .main-menu.active li > a[style*="cursor: default"]:hover {
        background: none !important;
    }

    /* Responsiver Header */
    header {
        width: 100%;
        overflow: hidden;
    }

    header img {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* Überschriften-Handling */
/* Erste Überschriften anzeigen */
#content > h1:first-child,
#content > h2:first-child,
#content > div:first-child > h1:first-child,
#content > div:first-child > h2:first-child {
    display: block !important;
    margin-bottom: 20px;
}

/* Doppelte Überschriften in verschachtelten Divs ausblenden */
#content > div:not(:first-child) h1,
#content > div:not(:first-child) h2,
#content > div > .article-content h1:not(:first-child),
#content > div > .article-content h2:not(:first-child),
#content > div > div > h1:not(:first-child),
#content > div > div > h2:not(:first-child) {
    display: none !important;
}

/* Startseiten-spezifische Überschriften */
.home #content h1,
.home #content h2 {
    display: block !important;
    margin-bottom: 20px;
} 