/* ============================================
   MOBILE RESPONSIVE - Agriturismo Portella
   ============================================ */

/* ---- TABLET e sotto (max 1024px) ---- */
@media screen and (max-width: 1024px) {

    html, body {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    #wrapper {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    #screen {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    #screen #column-left {
        display: none !important;
    }

    #screen #column-right {
        float: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    #screen #column-right #mainpage-wrapper {
        height: auto !important;
        overflow: visible !important;
    }

    #page, #mainpage {
        height: auto !important;
        overflow: visible !important;
    }

    #footer {
        clear: both !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* ---- SMARTPHONE (max 768px) ---- */
@media screen and (max-width: 768px) {

    html { box-sizing: border-box; }
    *, *:before, *:after { box-sizing: inherit; }

    /* Logo */
    #logo {
        width: calc(100% - 60px) !important;
        height: 45px !important;
        margin-left: 30px !important;
        margin-top: 8px !important;
        background-size: contain !important;
        background-position: left center !important;
    }

    /* Menu */
    #menu-container {
        width: 100% !important;
        height: auto !important;
        padding-left: 0 !important;
    }

    #menu_inside {
        width: 100% !important;
    }

    #menu-home,
    #menu {
        display: block !important;
        width: 100% !important;
        float: none !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 5px 0 !important;
    }

    #menu_inside ul#menu li,
    #menu-home li {
        display: inline-block !important;
        width: auto !important;
        margin: 3px 5px !important;
        font-size: 11px !important;
    }

    #menu_inside ul#menu li.item-400 {
        width: auto !important;
    }

    /* Main */
    #main {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 20px !important;
    }

    .space {
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    /* Page */
    #page {
        border-top: 5px solid #69564a !important;
        margin-bottom: 0 !important;
    }

    /* Footer */
    #footer {
        background-size: cover !important;
        height: auto !important;
        position: static !important;
        width: 100% !important;
    }

    #credits {
        margin-top: 0 !important;
    }

    #credits p {
        padding: 10px 15px !important;
        font-size: 10px !important;
    }

    /* Testatina */
    #testatina {
        padding: 10px 15px !important;
    }

    /* Box list */
    .items {
        width: 100% !important;
        height: auto !important;
    }

    .items-detail {
        overflow: visible !important;
        height: auto !important;
    }

    .items-detail .items-img {
        float: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .items-detail .items-img img {
        width: 100% !important;
        height: auto !important;
    }

    .items-detail .items-desc {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding: 15px !important;
    }

    .items-scheda {
        width: 100% !important;
        float: none !important;
        height: auto !important;
        margin-top: 10px !important;
    }

    /* Widget home */
    #widget-home {
        height: auto !important;
        padding: 15px 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .widget-box,
    .widget-box.last {
        display: block !important;
        width: calc(50% - 5px) !important;
        padding: 0 !important;
    }

    .widget-box img,
    .widget-box.last img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Popup home */
    .popup_home {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
    }

    .popup_home img {
        width: 100% !important;
        height: auto !important;
    }

    /* Addthis */
    .b-fb-page {
        width: 100% !important;
    }

    /* Form */
    #form,
    #contactform {
        width: 100% !important;
        float: none !important;
    }

    #contactform p {
        width: 100% !important;
        float: none !important;
    }

    .watermark,
    .watermark.message {
        width: 100% !important;
        float: none !important;
        display: block !important;
    }

    textarea.watermark.message {
        height: 120px !important;
    }

    input[type="text"],
    input[type="email"],
    textarea {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        display: block !important;
    }

    input[type="submit"] {
        width: auto !important;
        float: none !important;
    }

    /* reCAPTCHA ha float:right inline */
    .g-recaptcha {
        float: none !important;
        clear: both !important;
        margin: 10px 0 !important;
    }

    textarea#g-recaptcha-response {
        border: none !important;
        margin: 0 !important;
    }

    #privacy,
    #invia {
        float: none !important;
        clear: both !important;
        display: block !important;
    }

    /* Google Maps */
    #iframe-map {
        width: 100% !important;
        height: 300px !important;
    }

    /* Slider */
    .box-slider-image {
        width: 100% !important;
        height: auto !important;
    }

    /* Immagini */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Tabelle */
    table {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 11px !important;
    }

    table td, table th {
        padding: 4px 6px !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Testo */
    #main p, #main ul, #main ol {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    #main * {
        max-width: 100% !important;
    }

    /* Scroll orizzontale dove serve */
    .items-desc,
    .items-detail,
    #main .space {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Banner libera terra */
    #banner-libera-terra {
        height: auto !important;
    }

    /* Hamburger menu */
    #menu-toggle {
        display: block !important;
        cursor: pointer;
        padding: 10px 15px;
        font-size: 22px;
        color: #69564a;
        text-align: right;
    }

    #menu_inside.menu-closed #menu,
    #menu_inside.menu-closed #menu-home {
        display: none !important;
    }

    #menu_inside.menu-open #menu,
    #menu_inside.menu-open #menu-home {
        display: block !important;
        width: 100% !important;
        background: #f6f6f6;
        padding: 10px 0 !important;
    }

    #menu_inside.menu-open ul#menu li,
    #menu_inside.menu-open #menu-home li {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 8px 20px !important;
        margin: 0 !important;
        border-bottom: 1px solid #ddd !important;
    }
}