@font-face {
    font-family: 'scriptfont';
    src: url('fonts/caflischscriptpro-light.eot');
    src: url('fonts/caflischscriptpro-light.eot?#iefix') format('embedded-opentype'),
        url('fonts/caflischscriptpro-light.woff2') format('woff2'),
        url('fonts/caflischscriptpro-light.woff') format('woff'),
        url('fonts/caflischscriptpro-light.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-style: italic;
}

@media screen and (max-width: 892px) {
    * {
        max-width: 100%;
        box-sizing: border-box;
        /* border: 1px solid red !important; */
    }

    #headerA,
    #pagewidth,
    .promobox .promoitem {

        width: 100%;
        overflow-x: hidden;
    }

    #main-main-content .reklama {
        width: calc(100% - 2rem);
    }

    #main-main {
        width: calc(100% - 158px - 1rem);
    }

    .informujeme,
    .headery h2 {
        width: calc(100% - 1rem);
    }

    #sidebar-right {
        margin-left: calc(100% - 158px - 1rem);
    }

    /*nadpisy sekcí na HP*/
    .informujeme h2,
    #dalsi h2 {
        background-color: #f09231;
    }

    #aktualne h2 {
        background-color: #2cb250;
    }

    .headery h2 {
        color: #FFF;
        border-radius: 1rem;
        max-width: 100%;
        font-family: 'scriptfont', cursive;
        height: unset;
        overflow-x: hidden;
    }

    .headery h2 span {
        visibility: hidden;
    }

    .box h2 {
        font-size: 2.5rem;
        line-height: 1;
        padding-left: 1rem;
        font-family: 'scriptfont', cursive;
    }

    /*box anketa*/
    #box_anketa {
        background: none;
        border: 1.5px solid #47b566;
        border-radius: 1.5rem;
        box-shadow: 0px 1px 5px #5a5a5a;
        margin: 0.5rem;
    }

    #box_anketa h2 span {
        visibility: hidden;
    }

    #box_anketa h2 {
        color: #2cb250;
        padding-left: 0.8rem;
        font-size: 3rem;
        line-height: 1.75;
        font-family: 'scriptfont', cursive;
    }

    #box_anketa_bottom {
        display: none;
    }


    /*box inzerce*/
    #box_inzerce h2 span {
        visibility: hidden;
    }

    #box_inzerce {
        background-image: none;
        background-color: #2cb250;
        border-radius: 1.5rem;
        box-shadow: 0px 1px 5px #5a5a5a;
        margin: 1.5rem 0.5rem 0.5rem 0.5rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    #box_inzerce_bottom {
        display: none;
    }

    #box_inzerce h2 {
        padding-left: 0.8rem;
        font-size: 3rem;
        line-height: 1.75;
        font-family: 'scriptfont', cursive;
    }

    /*box soutěže*/
    #box_soutezte h2 span {
        visibility: hidden;
    }

    #box_soutezte {
        background-image: none;
        background-color: #5dc6f3;
        border-radius: 1.5rem;
        box-shadow: 0px 1px 5px #5a5a5a;
        margin: 0.5rem;
        padding-bottom: 1rem;
    }

    #box_soutezte_bottom {
        display: none;
    }

    #box_soutezte h2 {
        padding-left: 0.8rem;
        font-size: 3rem;
        line-height: 1.75;
        font-family: 'scriptfont', cursive;
    }

    .minimenu {
        margin-left: 1rem;
        margin-right: 13px;
        padding-inline-start: 1rem;
    }

    /*box více o*/
    #box_viceo h2 span {
        visibility: hidden;
    }

    #box_viceo {
        background-image: none;
        background-color: #2cb250;
        border-radius: 1.5rem;
        box-shadow: 0px 1px 5px #5a5a5a;
        margin: 1.5rem 0.5rem 0.5rem 0.5rem;
        padding-bottom: 1rem;
        width: calc(100% - 1rem);
        margin-bottom: 1rem;
    }

    #box_viceo_bottom {
        display: none;
    }

    #box_viceo h2 {
        font-size: 3rem;
        line-height: 1.75;
        font-family: 'scriptfont', cursive;
        color: #000;
        margin-bottom: 1rem;
    }

    /*o nas*/
    #top-right {
        width: unset;
    }

    #o-nas {
        margin-right: 0;
        margin-top: 0;
    }

    #o-nas a {
        font-size: 25px;
        background: #fff;
        width: 151px;
        display: inline-block;
        height: 45px;
        border-bottom-left-radius: 1rem;
        margin-top: -1px;
        padding-right: 40px;
    }

    /*menu*/
    #menubar {
        display: flex;
        flex-direction: column;
        margin-top: 0;
        margin-bottom: 1rem;
    }

    #menu {
        width: 100%;
        height: unset;
        overflow-x: hidden;
    }

    #leaves {
        background: none;
        margin: unset;
        float: none;
        width: unset;
        height: unset;
    }

    #hledaci {
        margin-top: 1rem;
        padding-top: 0px;
        padding-right: 1rem;
    }

    /*promobox*/
    #promobox {
        display: flex;
        flex-direction: column;
    }

    .promobox a {
        height: unset;
    }

    .promobox .imgwrap {
        height: unset;
    }

    /*patička*/
    #bottom {
        width: calc(100% - 1rem);
        height: unset;
        background-color: #f09231;
        background-image: none;
        border-top-left-radius: 1.5rem;
        border-top-right-radius: 1.5rem;
        padding-bottom: 1rem;
        margin-bottom: 0;
        margin-top: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    #bottom .left,
    #bottom .right {
        float: none;
    }

    /*inzeraty*/
    .box_right_blank,
    .box_blank.box {
        padding-left: 7px;
        padding-right: 0x;
    }

    /*sablona clanek*/
    #clanek #paticka {
        background-image: none;
        background-color: #3ea81f;
        border-radius: 1rem;
        width: 100%;
    }

    /*poradna*/
    #poradna h2 {
        background-color: #149223;
    }
}

@media screen and (max-width: 768px) {
    #headerA {
        overflow-x: hidden;
    }

    #main {
        margin: 0 180px 0px 0;
    }

    #sidebar {
        float: right;
    }

    #main-main {
        width: 100%;
        padding-left: 1rem;
    }

    .informujeme,
    .headery h2 {
        width: 100%;
        overflow: hidden;
    }

    .informujeme {
        margin-right: 0;
    }

    #sidebar-right {
        margin-left: 0;
    }

    #box_soutezte {
        width: calc(100% - 1rem);
    }

    #box_soutezte h3 {
        padding-left: 0.5rem;
    }

    #o-nas a {
        width: 100px;
        padding-right: 1rem;
    }
}

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

    #pagewidth,
    #main-content {
        display: flex;
        flex-direction: column;
    }

    #pagewidth {
        margin-top: 0.5rem;
    }

    #main {
        margin-right: 0;
        order: 3
    }

    #main-main {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    #sidebar {
        float: none;
        width: 100%;
        order: 4;
        overflow-x: hidden;
    }

    #bottom {
        order: 5
    }

    #headerA {
        position: relative;
        z-index: 1;
        padding: 0 0.5rem;
    }

    #o-nas {
        position: absolute;
        top: 0;
        right: 0;
        z-index: 2;

    }

    #o-nas a {
        width: 87px;
        font-size: 20px;
        width: 91px;
        height: 37px;
    }
}