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

    /* Elemente ausblenden */
    #logo,
    #nav_meta_top,
    #content-2cols-left {
        display: none;
    }

    /* Elemente auf volle Breite skalieren */
    #wrapper,
    #header,
    #content-wrapper,
    #content-2cols-right,
    #footer,
    .checkbox,
    .checkbox > label {
        width: 100%;
        box-sizing: border-box;
    }
    img {
        max-width: 100%;
        height: auto;
    }
    #header {
        background-size: cover;
        background-position: 50% 50%;
        height: 80px;
    }



    /* Layout */
    #content-wrapper {
        padding: 30px 20px 40px 20px;
    }
    #content-2cols-right {
        padding: 0;
    }
    #footer {
        padding-bottom: 10px;
    }
    #wrapper:after,
    #footer:after {
        display: none;
    }

    #content-wide {
        padding: 0;
    }

    .content h1, .content h2, .content h3 {
        font-weight: 600;
    }















    /* Hauptnavigation */
    #nav-overlay {
        display: none;
        width: 100%;
        height: 120%;
        position: fixed;
        left: 0;
        top: 0;
        background-color: #000;
        opacity: 0.8;
        z-index: 1100;
    }

    #nav-trigger {
        width: 40px;
        height: 35px;
        background: #fff;
        border-radius: 3px;
        position: absolute;
        z-index: 2;
        top: 20px;
        right: 25px;
        cursor: pointer;
        display: block;
        transition: width 0.2s,height 0.2s,top 0.2s,right 0.2s,margin 0.2s;
    }

    #nav-trigger.opened {
        width: 50px;
        height: 40px;
        right: 15px;
        margin-top: -5px;
        z-index: 1102;
    }

    #nav-trigger i {
        position: relative;
        width: 27px;
        height: 3px;
        background: #2a4c01;
        float: left;
        margin: 8px 0 0 6px;
        transition: width 0.2s, margin 0.2s;
    }

    #nav-trigger i:before,
    #nav-trigger i:after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        background: #2a4c01;
        left: 0;
        top: 8px;
    }

    #nav-trigger i:after {
        top: 16px;
    }

    #nav-trigger.opened i {
        width: 38px;
        margin-top: 8px;
    }

    #nav-trigger.opened i:before {
        top: 10px;
    }

    #nav-trigger.opened i:after {
        top: 20px;
    }
    #nav_top {
        right: 15px;
        top: 15px;
        width: auto;
        display: none;
    }

    #nav_top {
        display: none;
        width: 100%;
        background: none;
        visibility: visible;
        border: 0;
        z-index: 1101;
        position: absolute;
        top: 59px;
        left: 0;
        box-sizing: border-box;
        padding: 0 15px;
    }

    #nav_top ul {
        display: none;
        top: 0;
        position: static;
        background: none;
        margin: 0;
        box-shadow: none;
        padding: 0;
    }

    #nav_top li {
        padding: 0;
        width: 100%;
        background: none;
        float: none;
        border: 0;
        height: auto !important;
        position: relative;
        margin-bottom: 4px;
    }

    #header #nav_top li a {
        color: #000;
        margin-bottom: 4px;
        background: #fff;
        border-radius: 2px;
        display: block;
        width: 100%;
        float: none;
        box-sizing: border-box;
        padding: 16px 20px;
        line-height: 120%;
        font-size: 16px;
        height: auto;
        font-weight: 400;
        font-family: arial, sans-serif;
        margin-top: 0;
    }

    #header #nav_top .opened > a {
        background-color: #dadada;
    }

    #header #nav_top .level2 .opened > a {
        background-color: #eee;
    }

    #header #nav_top li.has-sub > a {
        padding-right: 52px;
    }

    #header #nav_top ul.level2 a {
        text-transform: none;
        padding-left: 40px;
    }

    #header #nav_top ul.level3 a {
        padding-left: 60px;
    }

    #header #nav_top li.cur > a {
        font-weight: 800;
        letter-spacing: 0;
    }

    #nav_top .sub-trigger {
        border-left: 1px dotted #bbb;
        cursor: pointer;
        display: block;
        height: 40px;
        position: absolute;
        right: 0;
        top: 4px;
        width: 50px;
    }

    #nav_top .sub-trigger::after,
    #nav_top .sub-trigger::before {
        border: medium solid transparent;
        content: " ";
        height: 0;
        left: 100%;
        margin-left: -33px;
        position: absolute;
        top: 60%;
        width: 0;
        transition-duration: 0.2s;
        transition-property: transform;
        transform-origin: 50% 33%;
    }

    #nav_top .sub-trigger::before {
        border-color: #bbb rgba(208, 0, 1, 0) rgba(208, 0, 1, 0) rgba(208, 0, 1, 0);
        border-width: 8px;
        margin-top: -6px;
    }

    #nav_top .sub-trigger::after {
        border-color: #fff rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) rgba(255, 255, 255, 0);
        border-width: 8px;
        margin-top: -8px;
    }

    #nav_top .opened > .sub-trigger::before,
    #nav_top .opened > .sub-trigger::after {
        transform: rotate(180deg);
    }

    #nav_top .opened > .sub-trigger::before {
        border-color: #000 rgba(0, 0, 1, 0) rgba(0, 0, 1, 0) rgba(0, 0, 1, 0);
        margin-top: -10px;
    }

    #nav_top.level1 > .opened > .sub-trigger::after {
        border-color: #dadada rgba(218, 218, 218, 0) rgba(218, 218, 218, 0) rgba(218, 218, 218, 0);
    }

    #nav_top .level2 .opened > .sub-trigger::after {
        border-color: #f1f2f4 rgba(241, 242, 244, 0) rgba(241, 242, 244, 0) rgba(241, 242, 244, 0);
    }
    
    
    
    
    

    /* Metanavi #nav_meta_top wird mobile im Footer verwendet */
    #footer #nav_meta_mobile #nav_meta_top {
        display: block;
        position: static;
        padding: 20px;
    }

    #nav_meta_top li {
        float: none;
        padding-bottom: 6px;
    }

    #nav_meta_top a {
        display: block;
        padding: 10px 0 !important;
        text-align: center;
        margin-bottom: 3px;
        border-radius: 3px;
        text-decoration: none;
        width: 100%;
        text-indent: 0;
        height: auto;
        background: #fff linear-gradient(to bottom,#fff 0%,#fff 58%,#ececec 100%) repeat scroll 0 0;
        box-shadow: 0 1px 1px #222;
        font-size: 1rem;
    }

    #nav_meta_top a,
    #nav_meta_top a:hover {
        color: #555;
        text-decoration: none;
    }






}


@media only screen and (max-width: 768px) {
    /* Positionierung Spalten und Inhalte */

    .fce-2cols-70-30 .fce-2cols-left,
    .fce-2cols-70-30 .fce-2cols-right,
    .fce-2cols-50-50 .fce-2cols-left,
    .fce-2cols-50-50 .fce-2cols-right {
        width: 100%;
        margin-bottom: 40px;
    }

    .ce-intext img {
        max-width: 30vw;
    }

    #fancybox-wrap {
        padding: 0;
        width: calc(100vw - 40px) !important;
    }
    #fancybox-content {
        width: calc(100vw - 60px) !important;
    }
    #fancybox-content img {
        height: auto !important;
    }



    .powermail_label ~ .powermail_field {
        clear: both;
    }
    .content .powermail-errors-list {
        position: static;
    }
    .powermail_fieldwrap input[type="text"],
    .powermail_fieldwrap input[type="email"],
    .powermail_fieldwrap input[type="date"],
    textarea {
        width: 90%;
    }
}


@media only screen and (max-width: 480px) {
    .ce-below .ce-gallery[data-ce-columns="2"] img,
    .ce-above .ce-gallery[data-ce-columns="2"] img,
    .ce-below .ce-gallery[data-ce-columns="4"] img,
    .ce-above .ce-gallery[data-ce-columns="4"] img {
        width: calc(50vw - 40px);
    }
}