/*************************************************************/
/*   SPUN BolderTemplate - Responsive CSS                    */
/*   Mobile-friendly overrides for BolderTemplate            */
/*-----------------------------------------------------------*/
/*   Breakpoints:                                            */
/*   <= 1024px : Hamburger-Menu + Mobile-Nav                 */
/*   <=  768px : Gestapeltes Layout                          */
/*   <=  480px : Kleines Mobile                              */
/*************************************************************/


/* ====================== GLOBAL ====================== */

body {
    min-width: 0 !important;
    overflow-x: hidden;
}

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

/* Content-Bilder skalieren, aber KEINE spacer-gifs beeinflussen */
img:not([src*="clear.gif"]):not(.spacer-gif) {
    max-width: 100%;
    height: auto;
}

video {
    max-width: 100% !important;
    height: auto !important;
}

/* Desktop: Nav-Hover funktioniert auch ohne body.no_js Klasse */
@media screen and (min-width: 1025px) {
    #nav ul li:hover > ul {
        display: block;
    }
}


/* ====================== HAMBURGER-BUTTON ====================== */

.mobile-menu-toggle {
    display: none;
    background: #003746;
    border: none;
    color: #fff;
    padding: 14px 20px;
    font-size: 1.3em;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: bold;
    font-family: 'Lucida Sans Unicode', 'Lucida Grande', Tahoma, Arial, sans-serif;
    letter-spacing: 0.03em;
}

.mobile-menu-toggle:hover {
    background: #014254;
}

.mobile-menu-toggle::before {
    content: "☰  ";
}

.mobile-menu-toggle.open::before {
    content: "✕  ";
}


/* ====================== TABLET + MOBILE NAV (<=1024px) ====================== */

@media screen and (max-width: 1024px) {

    .inner {
        width: 95% !important;
        max-width: 970px;
        padding: 0 10px;
    }

    /* Header: feste Höhe aufheben */
    #header {
        height: auto !important;
        min-height: 60px;
        padding-bottom: 5px;
    }

    /* Oberes Leerzeichen reduzieren */
    #top-space {
        height: 6px !important;
    }

    /* Logo zentrieren, kein Float */
    #logo,
    #logo a {
        display: block !important;
        float: none !important;
        width: 138px !important;
        height: 89px !important;
        margin: 12px auto 0 !important;
    }

    /* Hamburger anzeigen */
    .mobile-menu-toggle {
        display: block;
        margin-top: 8px;
    }

    /* Nav: volle Breite, kein Float */
    #nav {
        float: none !important;
        clear: both;
        width: 100%;
    }

    /* Hauptmenü ausblenden */
    #nav ul.level-1 {
        display: none !important;
        float: none !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Menü offen */
    #nav.mobile-open ul.level-1 {
        display: block !important;
    }

    /* Untertitel-Spans ausblenden */
    #nav ul.level-1 > li > span {
        display: none;
    }

    /* Menü-Einträge gestapelt */
    #nav li {
        float: none !important;
        width: 100%;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid #014254;
        padding: 0 !important;
        position: relative;
    }

    #nav a {
        display: block;
        padding: 14px 20px;
        font-size: 1.25em;
        color: #fff !important;
    }

    #nav a:hover {
        background: rgba(255,255,255,0.08);
        text-decoration: none !important;
        color: #bde2f8 !important;
    }

    /* Sub-Menüs: ausgeblendet */
    #nav ul.sub-menu,
    #nav ul.black ul.sub-menu,
    #nav ul.white ul.sub-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: rgba(0,0,0,0.30) !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        top: auto !important;
        left: auto !important;
    }

    /* 3. Ebene: etwas heller + linker Balken */
    #nav ul.sub-menu ul.sub-menu {
        background: rgba(0,40,60,0.50) !important;
        border-left: 3px solid rgba(255,255,255,0.15) !important;
    }

    /* 4. Ebene: noch differenziert */
    #nav ul.sub-menu ul.sub-menu ul.sub-menu {
        background: rgba(0,30,50,0.60) !important;
        border-left: 3px solid rgba(255,255,255,0.1) !important;
    }

    /* Geöffnetes Sub-Menü */
    #nav li.submenu-open > ul.sub-menu {
        display: block !important;
    }

    /* Sub-Menü-Links */
    #nav ul.sub-menu li,
    #nav ul.black ul.sub-menu li,
    #nav ul.white ul.sub-menu li {
        float: none !important;
        width: 100% !important;
        padding: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    /* 2. Ebene */
    #nav ul.sub-menu li a,
    #nav ul.black ul.sub-menu li a,
    #nav ul.white ul.sub-menu li a {
        display: block !important;
        width: 100% !important;
        padding: 11px 20px 11px 40px !important;
        color: #d0e8f4 !important;
        font-size: 1.1em !important;
        font-weight: normal;
    }

    /* 3. Ebene */
    #nav ul.sub-menu ul.sub-menu li a {
        padding-left: 56px !important;
        color: #b8d8ee !important;
        font-size: 1.05em !important;
    }

    /* 4. Ebene */
    #nav ul.sub-menu ul.sub-menu ul.sub-menu li a {
        padding-left: 72px !important;
        color: #a0c8e0 !important;
        font-size: 1.0em !important;
    }

    /* no_js: Hover-Submenü im Mobile deaktivieren */
    body.no_js #nav ul li:hover > ul {
        display: none !important;
    }

    /* no_js: Geöffnete Submenüs via JS-Klasse (alle Ebenen) */
    body.no_js #nav li.submenu-open > ul.sub-menu,
    body.no_js #nav ul.sub-menu li.submenu-open > ul.sub-menu {
        display: block !important;
    }

    /* Breadcrumb-Leiste */
    .rootlinenav {
        height: auto !important;
        padding: 10px 0;
    }

    /* ---- Inhaltsbilder bereits ab Tablet float aufheben ---- */
    .text .imgtext-table,
    .imgtext-table {
        float: none !important;
        margin: 10px auto !important;
        max-width: 100% !important;
    }

    /* Attribute align="left/right" override für table-Elemente */
    table.imgtext-table[align],
    .text table.imgtext-table[align] {
        float: none !important;
        margin: 10px auto !important;
    }

    /* ---- INHALT: 1-Spalte ab Tablet ---- */
    .text {
        width: 100% !important;
        float: none !important;
    }

    .sidebar,
    .sidebar-home {
        width: 100% !important;
        float: none !important;
        margin-top: 20px;
        border-top: 2px solid #eee;
        padding-top: 15px;
    }

    /* ---- INHALT-BILDER ---- */
    #content img:not([src*="clear.gif"]):not(.spacer-gif) {
        max-width: 100%;
        height: auto !important;
    }

    /* ---- SLIDER ---- */
    #slider,
    #slider .inner {
        height: auto !important;
    }

    #slider .panel {
        position: relative !important;
        height: auto !important;
    }

    #slider .panel .text {
        width: 100% !important;
        float: none !important;
        margin: 20px 0 !important;
    }

    #slider .panel img {
        position: relative !important;
        float: none !important;
        width: 100% !important;
        right: auto !important;
        bottom: auto !important;
    }

    /* ---- TOP-SLOGAN ---- */
    #top-slogan blockquote {
        width: auto !important;
        float: none !important;
        height: auto !important;
    }

    #top-slogan .button-more {
        float: none !important;
        width: auto !important;
        margin: 10px 0 0 !important;
    }

    /* ---- BOX-SECTIONS (Startseite) ---- */
    .box-sections {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }

    /* ---- CALL-TO-ACTION ---- */
    .call-to-action {
        height: auto !important;
        padding: 20px;
    }

    .call-to-action .tagline {
        width: 100% !important;
        float: none !important;
    }

    .call-to-action .button-call {
        float: none !important;
        margin-top: 15px;
    }

    /* Tabellen horizontal scrollbar */
    table:not(.imgtext-table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
}


/* ====================== GESTAPELTES LAYOUT (<=768px) ====================== */

@media screen and (max-width: 768px) {

    .inner {
        width: 100% !important;
        padding: 0 12px;
    }

    /* Text: volle Breite */
    .text {
        width: 100% !important;
        float: none !important;
    }

    /* Sidebar: volle Breite, unter dem Inhalt */
    .sidebar,
    .sidebar-home {
        width: 100% !important;
        float: none !important;
        margin-top: 25px;
        border-top: 2px solid #eee;
        padding-top: 20px;
    }

    /* Inhalts-Bilder (imgtext-table) */
    .text .imgtext-table,
    .imgtext-table {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }

    .text .imgtext-table td,
    .imgtext-table td {
        display: block !important;
        width: 100% !important;
    }

    .text .imgtext-table tr,
    .imgtext-table tr {
        display: block !important;
    }

    .text .imgtext-table img:not([src*="clear.gif"]),
    .imgtext-table img:not([src*="clear.gif"]) {
        width: 100% !important;
        height: auto !important;
    }

    .imgtext-table img[src*="clear.gif"] {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* Box-Sections (Startseite) */
    .box-sections {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
        margin-top: 25px;
    }

    /* Portfolio */
    #portfolio li {
        width: 100%;
        margin-right: 0;
    }

    /* Slider */
    #slider,
    #slider .inner {
        height: auto !important;
    }

    #slider .panel {
        position: relative;
        height: auto !important;
    }

    #slider .panel .text {
        width: 100%;
        float: none;
        margin: 20px 0;
    }

    #slider .panel img {
        position: relative;
        float: none;
        width: 100%;
        height: auto;
        right: auto;
        bottom: auto;
    }

    /* Call-to-Action */
    .call-to-action {
        height: auto;
        padding: 20px;
    }

    .call-to-action .tagline {
        width: 100%;
        float: none;
    }

    .call-to-action .button-call {
        float: none;
        margin-top: 15px;
    }

    /* Tabellen scrollbar */
    table:not(.imgtext-table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Blog */
    h3.title-blog {
        width: 100%;
    }

    .hentry img {
        max-width: 100%;
    }

    .comment-author {
        float: none;
        width: auto;
        margin: 10px 0;
    }

    .comment-meta {
        margin-left: 0;
    }

    /* Footer */
    #footer .inner {
        text-align: center;
    }

    #footer h3 {
        text-align: center;
    }

    #top-space {
        height: 0 !important;
    }
}


/* ====================== KLEINES MOBILE (<=480px) ====================== */

@media screen and (max-width: 480px) {

    .inner {
        padding: 0 8px;
    }

    #nav a {
        font-size: 1.15em;
        padding: 13px 15px;
        min-height: 44px;
    }

    #slider .panel h1 { font-size: 2.2em; }
    #slider .panel h2 { font-size: 1.7em; }
    #slider .panel p  { font-size: 1.1em; }

    #content h2 {
        font-size: 1.6em;
        margin: 20px 0 12px;
    }

    #content h2.title-page {
        margin-top: 12px;
    }

    #footer {
        padding: 15px 0;
    }

    #copyright {
        padding: 10px;
        font-size: 0.9em;
    }
}


/* ====================== ALLGEMEINE VERBESSERUNGEN ====================== */

#content {
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
}

a {
    transition: color 0.2s ease, background-color 0.2s ease;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    max-width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #397493;
    box-shadow: 0 0 5px rgba(57,116,147,0.3);
    outline: none;
}

@media print {
    .mobile-menu-toggle { display: none !important; }
    #nav ul.level-1     { display: block !important; }
}
