/* ========================================================================== */
/* LAYOUT RESPONSIVE - LEFT-TOP FRAMES */
/* Versione Mobile-First per Montreal Reborn GDR */
/* FIX: override display:table di main.css + scroll barre */
/* ========================================================================== */

@charset "utf-8";

/* ========================================================================== */
/* FIX BASE: sblocca display:table di main.css su tutte le risoluzioni */
/* ========================================================================== */

/* FIX CRITICO: main.css forza display:table, qui ripristiniamo block */
#framecontentLeft,
#framecontentRight {
    display: block !important;
}

/* FIX CRITICO: innertube non deve più essere table-cell */
#framecontentLeft .innertube,
#framecontentTop .innertube {
    display: block !important;
}

/* ========================================================================== */
/* STILI BASE - DESKTOP */
/* ========================================================================== */

body {
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
}

/* Colonna sinistra - Desktop */
#framecontentLeft {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 210px !important;
    height: 100% !important;
    overflow-y: auto !important;  /* SCROLL VERTICALE per barra presenti lunga */
    overflow-x: hidden;
    z-index: 100;
}

/* Menu top - Desktop */
#framecontentTop {
    position: absolute !important;
    left: 210px !important;
    right: 0;
    top: 0;
    width: auto;
    height: 100px !important;
    overflow-x: auto !important;  /* SCROLL ORIZZONTALE per top bar con tanti nomi */
    overflow-y: hidden;
    z-index: 90;
}

/* Contenuto principale - Desktop */
/* ========================================================================== */
/* NASCONDI SCROLLBAR su barre laterali e top (tutti i browser) */
/* Manteniamo lo scroll funzionante ma invisibile */
/* ========================================================================== */

/* Safari, Chrome, Edge, Opera */
#framecontentLeft::-webkit-scrollbar,
#framecontentTop::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* Firefox */
#framecontentLeft,
#framecontentTop {
    scrollbar-width: none !important;
}

/* IE/Edge vecchio */
#framecontentLeft,
#framecontentTop {
    -ms-overflow-style: none !important;
}
#maincontent {
    position: fixed !important;
    left: 210px !important;
    top: 100px !important;
    right: 0;
    bottom: 0;
    overflow: auto;
    background: url("imgs/provasx.jpg") top left repeat;
}

.innertube {
    margin: 15px;
}

/* ========================================================================== */
/* RESPONSIVE - TABLET (max 1024px) */
/* ========================================================================== */

@media screen and (max-width: 1024px) {
    #framecontentLeft {
        width: 180px !important;
    }
    
    #framecontentTop {
        left: 180px !important;
        height: 80px !important;
    }
    
    #maincontent {
        left: 180px !important;
        top: 80px !important;
    }
}

/* ========================================================================== */
/* RESPONSIVE - MOBILE (max 768px) */
/* ========================================================================== */

@media screen and (max-width: 768px) {
    html, body {
        overflow: auto !important;
        height: auto !important;
        min-height: 100vh;
        position: relative;
    }
    
    /* Colonna sinistra nascosta fuori dallo schermo */
    #framecontentLeft {
        position: fixed !important;
        left: -220px !important;
        width: 210px !important;
        height: 100% !important;
        top: 0;
        z-index: 1000;
        transition: left 0.3s ease, transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        will-change: transform;
        overflow-y: auto !important;
    }
    
    /* Quando aperta via hamburger */
    #framecontentLeft.menu-open {
        left: 0 !important;
    }
    
    /* Top bar a piena larghezza su mobile */
    #framecontentTop {
        position: absolute !important;
        left: 0 !important;
        right: 0;
        top: 0;
        width: 100% !important;
        height: auto !important;
        min-height: 60px;
        overflow-x: auto !important;
        overflow-y: hidden;
        z-index: 900;
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* Contenuto principale a piena larghezza */
    #maincontent {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        right: 0;
        bottom: auto;
        width: 100%;
        min-height: calc(100vh - 60px);
        overflow: visible;
        margin-top: 60px;
        padding-top: 10px;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    .innertube {
        margin: 10px;
    }
    
    /* Pulsante hamburger */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: linear-gradient(90deg, rgba(138, 43, 226, 0.9) 0%, rgba(0, 217, 255, 0.9) 100%);
        border: none;
        padding: 10px 15px;
        border-radius: 5px;
        cursor: pointer;
        box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
        -webkit-tap-highlight-color: rgba(0, 217, 255, 0.3);
        touch-action: manipulation;
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #00d9ff;
        margin: 5px 0;
        transition: 0.3s;
        box-shadow: 0 0 5px #00d9ff;
    }
    
    /* Overlay sfondo quando menu aperto */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        -webkit-tap-highlight-color: transparent;
        touch-action: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100vh !important;
    }
    
    /* Fix zoom su input focus */
    input, select, textarea, button {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
   
}

/* ========================================================================== */
/* RESPONSIVE - MOBILE PICCOLI (max 480px) */
/* ========================================================================== */

@media screen and (max-width: 480px) {
    #framecontentTop {
        min-height: 50px !important;
    }
    
    #maincontent {
        margin-top: 50px;
        min-height: calc(100vh - 50px);
        padding-top: 5px;
    }
    
    .innertube {
        margin: 5px;
    }
    
    #framecontentLeft {
        width: 180px !important;
        left: -190px !important;
    }
    
    #framecontentLeft.menu-open {
        left: 0 !important;
    }
}