/*
 * default.css  —  Samatha CMS
 * Responsive Version: Desktop + Tablet + Smartphone
 * Farben und Schriften identisch zum Original
 */

/* ── Basis ───────────────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333333;
    background-color: #2773a5;
    margin: 0;
    padding: 0;
}

table {
    font-size: 13px;
}

img {
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    padding: 4px 6px;
    border: 1px solid #2773a5;
    color: #2773a5;
    background-color: white;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    border-radius: 3px;
}

input[type="submit"], button {
    cursor: pointer;
    background-color: #2773a5;
    color: white;
    border: none;
    padding: 5px 12px;
}

input[type="submit"]:hover, button:hover {
    background-color: #1a5a8a;
}

/* ── Haupt-Container ─────────────────────────────────────────────────────── */

div#all {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
    background-color: white;
}

/* ── Header-Bild ─────────────────────────────────────────────────────────── */

div#all > img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Navigationsleiste oben ──────────────────────────────────────────────── */

div#myheadmenu {
    color: white;
    background-color: #2773a5;
    width: 100%;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

div#myheadmenu h1 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: normal;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    width: 100%;
}

#myheadmenu a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

#myheadmenu a:hover {
    color: #ffe066;
    text-decoration: underline;
}

#myheadmenu a.abmelden {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.85;
}

/* ── Haupt-Layout: Sidebar + Content nebeneinander ───────────────────────── */

div#layout-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

div#menu {
    width: 180px;
    min-width: 180px;
    padding: 10px 10px 10px 20px;
    flex-shrink: 0;
}

div#menu img {
    max-width: 140px;
    height: auto;
}

div#menu h1 {
    color: #2773a5;
    padding: 0;
    margin-top: 12px;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.2;
}

div#menu a {
    display: block;
    color: #2773a5;
    padding: 2px 5px;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
}

div#menu a:hover {
    color: red;
    text-decoration: underline;
}

div#menu form {
    margin-top: 5px;
}

div#menu form input[type="text"] {
    width: 100px;
}

#menu table {
    border: 1px solid white;
}

#menu td {
    border: 1px solid #2773a5;
}

.submenu {
    padding-left: 15px;
    color: #2773a5;
    font-size: 12px;
}

/* ── Content-Bereich ─────────────────────────────────────────────────────── */

div#content {
    flex: 1;
    padding: 10px 15px 20px 10px;
    min-height: 500px;
    min-width: 0; /* wichtig für flex + overflow */
}

#content h1 {
    font-size: 16px;
    border-bottom: 1px solid #2773a5;
    margin-bottom: 8px;
    letter-spacing: 1px;
    color: #2773a5;
}

#content a {
    color: #2773a5;
    text-decoration: none;
}

#content a:hover {
    color: red;
    text-decoration: underline;
}

#content td {
    padding: 0 10px;
}

#content img {
    max-width: 100%;
    height: auto;
}

/* ── Lightbox-Thumbnails ─────────────────────────────────────────────────── */

a.lightbox img.thumb {
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
    max-width: 200px;
    height: auto;
}

a.lightbox img.thumb:hover {
    opacity: 0.85;
}

/* ── Lightbox Overlay ────────────────────────────────────────────────────── */

#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#lightbox-overlay.active {
    display: flex;
}

#lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 4px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.6);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

div#footer {
    clear: both;
    text-align: center;
    font-size: 11px;
    color: #666666;
    padding: 15px 10px;
    letter-spacing: 1px;
    border-top: 1px solid #ddd;
}

#footer a {
    color: black;
    text-decoration: none;
}

/* ── Hilfsklassen ────────────────────────────────────────────────────────── */

.marker {
    background-color: yellow;
}

.category_selected {
    background-color: yellow;
    color: #2773a5;
    padding: 1px 4px;
    border-radius: 2px;
}

.pull_down {
    font-size: 0.9em;
    border: none;
    text-align: left;
    background-color: #2773a5;
    color: white;
    max-width: 100%;
}

.code {
    border: 1px solid silver;
    background-color: #F1F1F1;
    font-family: monospace;
    color: #333333;
    font-size: 12px;
    padding: 6px;
    margin: 4px;
    min-height: 100px;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
}

.quote {
    border-left: 3px solid #2773a5;
    padding: 4px 10px;
    margin: 6px 0;
    color: #555;
}

.tab_base {
    font-weight: bold;
    border: 1px solid #2773a5;
}

.table_body {
    background: #FEFDFD;
    font-weight: normal;
    font-size: 12px;
    font-family: sans-serif;
    border-collapse: collapse;
    color: black;
}

.table_sub_heading {
    background: #a3a368;
    font-weight: bold;
}

.table_data {
    text-align: right;
}

.login-box {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #2773a5;
    border-radius: 6px;
}

.login-box h2 {
    color: #2773a5;
    margin-top: 0;
}

/* ── Sitemap-Tabelle ─────────────────────────────────────────────────────── */

table[border="1"] {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

table[border="1"] td,
table[border="1"] th {
    padding: 4px 8px;
    border: 1px solid #ccc;
}

table[border="1"] th {
    background-color: #2773a5;
    color: white;
}

/* ── Spalten-Layout ([1 [2 [3 Shortcode) ─────────────────────────────────── */

table tbody tr td[valign="top"] {
    vertical-align: top;
    padding: 0 8px;
}

/* ── Hamburger-Menü (nur Smartphone) ────────────────────────────────────── */

#menu-toggle {
    display: none;
}

/* ── TABLET: ab 600px ────────────────────────────────────────────────────── */

@media (max-width: 700px) {

    div#menu {
        width: 140px;
        min-width: 140px;
        padding-left: 10px;
    }

    div#content {
        padding: 8px 10px;
    }

    #myheadmenu a {
        font-size: 12px;
        padding: 2px 4px;
    }
}

/* ── SMARTPHONE: bis 520px ───────────────────────────────────────────────── */

@media (max-width: 520px) {

    body {
        font-size: 15px;
    }

    div#all {
        max-width: 100%;
    }

    /* Navigation: vertikal stapeln */
    div#myheadmenu h1 {
        font-size: 13px;
    }

    #myheadmenu a {
        font-size: 13px;
        padding: 4px 6px;
    }

    /* Hamburger-Button */
    #menu-toggle {
        display: block;
        background: #2773a5;
        color: white;
        border: 1px solid white;
        padding: 6px 12px;
        margin: 8px 10px;
        font-size: 18px;
        cursor: pointer;
        border-radius: 4px;
        width: calc(100% - 20px);
        text-align: left;
    }

    /* Sidebar versteckt, aufklappbar */
    div#layout-wrapper {
        flex-direction: column;
    }

    div#menu {
        width: 100%;
        min-width: unset;
        padding: 0 10px 10px;
        display: none;  /* per JS togglebar */
        border-bottom: 2px solid #2773a5;
    }

    div#menu.open {
        display: block;
    }

    div#menu img {
        max-width: 120px;
    }

    div#menu a {
        font-size: 15px;
        padding: 5px 8px;
        border-bottom: 1px solid #eee;
    }

    div#content {
        width: 100%;
        padding: 10px 12px;
    }

    /* Spalten-Tabellen auf Smartphone untereinander */
    table, thead, tbody, tr, td, th {
        display: block;
        width: 100% !important;
    }

    /* Aber normale Datentabellen (Sitemap etc.) bleiben als Tabelle */
    table[border="1"], table[border="1"] thead,
    table[border="1"] tbody, table[border="1"] tr,
    table[border="1"] td, table[border="1"] th {
        display: table;
        display: revert;
        width: auto;
    }

    /* Bilder im Content nicht zu breit */
    #content img {
        max-width: 100%;
    }

    a.lightbox img.thumb {
        max-width: 45vw;
    }

    /* Footer größer lesbar */
    div#footer {
        font-size: 12px;
        letter-spacing: 0;
    }
}
