/* =========================================
   1. GRUNDLAGEN & LAYOUT
   ========================================= */
body {
    font-family: "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
    color: #333;
    background-color: #e9ecef;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.layout-container {
    max-width: 1150px; 
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column; 
}

/* =========================================
   2. KOPFZEILE & FOOTER
   ========================================= */
.site-header {
    background-color: #003399;
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
}
.site-header img {
    height: 60px;
    margin-right: 20px;
}
.site-header h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: 1px;
}

.site-footer {
    background-color: #333;
    color: #ccc;
    text-align: center;
    padding: 20px;
    font-size: 12px;
}
.site-footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
}
.site-footer a:hover {
    text-decoration: underline;
}

/* =========================================
   3. HAUPTBEREICH & NAVIGATION
   ========================================= */
.main-content {
    display: flex;
    padding: 25px;
}

.main-nav {
    width: 220px;
    flex-shrink: 0;
    margin-right: 35px;
}
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-nav li a {
    display: block;
    background-color: #f4f4f4;
    color: #003399;
    padding: 12px 15px;
    margin-bottom: 5px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.main-nav li a:hover, .main-nav li a.active {
    background-color: #e9ecef;
    color: #003399; /* Kein Orange bei der Schrift */
    border-left: 4px solid #FF6600; /* Der linke Rahmen bleibt als Highlight */
}

/* Hamburger Button */
.menu-toggle {
    display: none; 
    width: 100%;
    background-color: #FF6600; 
    color: white;
    padding: 10px;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    border-radius: 4px;
}
.menu-toggle:hover {
    background-color: #cc5200;
}

/* =========================================
   4. INHALTSBEREICH & NORMALE LINKS
   ========================================= */
.content-area {
    flex-grow: 1;
}
.breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.breadcrumb a {
    color: #003399;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #003399; 
    text-decoration: underline;
}

h2 {
    color: #003399;
    border-bottom: 2px solid #FF6600;
    padding-bottom: 5px;
    display: inline-block;
    margin-top: 0;
}

.content-area ul {
    list-style-type: square;
    padding-left: 20px;
}
.content-area li {
    margin-bottom: 6px;
}

/* Standard-Links im Textbereich */
.content-area a {
    color: #003399;
    text-decoration: none;
    font-weight: bold;
}
.content-area a:hover {
    color: #003399; 
    text-decoration: underline;
}


/* =========================================
   5. KLEINE LINK-BUTTONS FÜR TABELLEN
   ========================================= */
/* .content-area a.link-btn schützt den Button vor Überschreibung durch normale Links */
.content-area a.link-btn {
    display: inline-block !important;
    padding: 4px 8px !important;
    margin: 2px 2px 2px 0 !important;
    font-size: 11px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    color: white !important;
    font-weight: bold !important;
    text-align: center !important;
    white-space: nowrap !important;
    transition: opacity 0.2s;
}
.content-area a.link-btn:hover {
    opacity: 0.7 !important;
    color: white !important;
    text-decoration: none !important;
}

/* Button-Farben */
a.btn-forum { background-color: #FF6600 !important; border: none !important; } 
a.btn-prins { background-color: #003399 !important; border: none !important; } 
a.btn-osm   { background-color: #28a745 !important; border: none !important; } 
a.btn-info  { background-color: #6c757d !important; border: none !important; } 


/* =========================================
   6. PHORUM GLOBALE REPARATUREN (DESKTOP)
   ========================================= */
input[type="text"], 
input[type="password"], 
select, 
textarea {
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px; 
}

.PhorumStdBlock, 
.PhorumStdBlockHeader, 
.PhorumNavBlock,
.PhorumRowBlock,
.PhorumRowBlockAlt,
.PhorumStdTable, 
table.PhorumStdTable,
div.PhorumStdBlock {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.PhorumStdBlock, 
.PhorumStdTable, 
table.PhorumStdTable {
    border-right: 1px solid #808080 !important;
}

/* Verhindert das Foren-Orange bei normalen Links */
.PDDiv a:hover,
.PhorumStdBlock a:hover,
.PhorumReadBodyText a:hover,
.PhorumLargeFont a:hover {
    color: #003399 !important; 
    text-decoration: underline !important;
}

a.PhorumNavLink:hover {
    color: #003399 !important;
    border-color: #003399 !important; 
    background-color: #e9ecef !important; 
    text-decoration: none !important; 
}


/* =========================================
   7. SMARTPHONE ANSICHT (WICHTIG: GANZ UNTEN!)
   ========================================= */
@media (max-width: 768px) {
    
    .layout-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .main-content {
        flex-direction: column;
        padding: 10px;
    }

    .main-nav {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav ul {
        display: none; 
    }

    .site-header {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    
    .site-header img {
        margin-right: 0;
        margin-bottom: 10px;
        height: 50px; 
    }

    .site-header h1 {
        font-size: 22px; 
    }

    .content-area {
        width: 100%;
        overflow-wrap: break-word; 
        word-wrap: break-word;
    }

    /* PHORUM: Formulare stapeln */
    table.PhorumFormTable, 
    table.PhorumFormTable tbody, 
    table.PhorumFormTable tr, 
    table.PhorumFormTable td {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }
    
    table.PhorumFormTable td {
        padding: 5px 0 !important;
    }
    
    input[type="submit"], 
    .PhorumSubmit {
        width: 100%;
        padding: 10px !important;
        margin-top: 10px;
        font-size: 16px !important;
    }

    /* PHORUM: Wischbare Tabellen auf dem Handy */
    .PDDiv, .content-area {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        display: block !important;
    }

    table.PhorumStdTable {
        display: table !important; 
        min-width: 700px !important; 
        max-width: none !important; 
    }
    
    table.PhorumStdTable td, 
    table.PhorumStdTable th {
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .PhorumRowBlock, 
    .PhorumRowBlockAlt, 
    .PhorumStdBlockHeader {
        min-width: 750px !important; 
        max-width: none !important;  
        display: block !important;
    }
    
    .PhorumLargeFont, 
    .PhorumFloatingText,
    .PhorumLargeFont a {
        word-break: normal !important;
        overflow-wrap: normal !important;
        white-space: normal !important;
    }
}

/* --- STYLING FÜR EINKLAPPBARE TABELLEN --- */
.land-header td {
    background-color: #e9ecef;
    font-weight: bold;
    color: #003399;
    font-size: 15px;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    cursor: pointer; /* Zeigt die Klick-Hand an */
    user-select: none; /* Verhindert, dass Text markiert wird beim Doppelklick */
}

.land-header:hover td {
    background-color: #dde2e6; /* Wird etwas dunkler beim Drüberfahren */
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    color: #FF6600; /* Autobahn-Orange für den Pfeil */
    font-size: 14px;
}