@font-face {
    font-family: CaviarDreamsBold;
    src: url("../fonts/CaviarDreamsBold.ttf");
}

:root {
    --mainColor: rgba(255,245,245,0.9);
    --border: 1px solid rgb(204,204,204);
}

.non-visible {
    display: none;
}

html {
	background: #d6d6d6 url('../img/background.png') repeat;
	margin: 0;
}

body{
    margin: 0;
    padding: 0;
    background-color: white;
    overflow: hidden;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    font-family: Arial !important;
}
a {
    color:  #000000;
    text-decoration: none;
}
section {
    background-color: transparent;
    position: absolute;
    width: 100%;
    height: 100%;
}

.main_header{
    position: relative;
    top: 0;
    width: 100%;
    border: var(--border);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    background-color: var(--mainColor);
    box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
    height: 10%;
    float: left;
}

.main_header h1{
    position: relative;
    text-align: left;
    font-weight: bold;
    float: left;
    width: 91%;
    padding: 0px 2%;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

.main_footer{
    position:absolute;
    background-color: transparent;
    bottom: 0;
    width: 100%;
    border: var(--border);
    background-color: var(--mainColor);
    box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
    z-index: 10;
}

main {
    position: absolute;
    width: 100%;
    vertical-align: middle;
    /* max-height: 500px; */
    z-index: 1;
}

article{
    position:absolute;
    height: 100%;
}

article header{
    position:absolute;
    top: 1%;
    width: 100%;
    display: inline;
    text-align: center;
    padding:  2px 1px;
    background-color: transparent;
}

article footer{
    position: absolute;
    background-color: transparent;
    bottom: 0;
    width: 100%;
    padding: 0% 2% 1% 2%;
    overflow: hidden;
    word-wrap: break-word;
    max-height: 60px;
    line-height: 15px;
}

aside button{
    background-color: var(--mainColor);
}

article video{
    position:absolute;
    background-color: rgba(250,250,250,0.8);
    z-index: 1;
    width: 100%;
    max-height: 88%;
}

/*------------------ NAVIGATION TABS ------------------*/
.nav-tabs>li>a{
    margin: 0px;
    height: 100%;
}
.nav-tabs>li a b{
    display: none;
}
.nav-tabs>li.active a b{
    display: inline;
    font-size: 0.9em;
    padding-left: 4px;
    font-weight:bold;
    color:#212121;
}

#li_navigation {
    position:absolute;
    height: 100%;
    bottom: 0;
}

#li_text {
    position:absolute;
    height: 100%;
    bottom: 0;
    margin-left: 115px;
}

#li_text.active {
    margin-left: 50px;
}

div#navigation{
    overflow-x: hidden;
    overflow-y: auto;
    position: absolute;
    background-color: var(--mainColor);
    border-radius: 0px 15px 15px 0px;
    box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
    border: var(--border);
    width: 100%;
    height: 82%;
}

div#links{
    overflow-x: hidden;
    overflow-y: auto; 
    position: absolute;
}

ul > li > ul{
    margin-left: 10%; 
}

ul > li > ul.no-indent{
    margin-left: 0px; 
}

.nav-pills>li>a{
    border-radius: 1px; 
    border-bottom: 1px solid #ddd;
    padding:7px 2px 1px 10px;
}

.nav-stacked>li>a{
    border-radius: 1px; 
    border-bottom: 1px solid #ddd;
    padding:6px 2px 2px 10px;
}

.nav-pills>li.active>a, .nav-pills>li.active>a:hover, .nav-pills>li.active>a:focus {
    color: #fff;
    background-color: #555;
}
header #logo{
    position: relative;
    float: left;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 8%;
    background-image: url(../img/logo.png);
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    margin-left: 1%;
    min-width: 45px;
    display: none;
}

header h2{
    text-align: center;
    font-size:1.3em;
    margin: 5px 0px 3px 10px;
}
header li.dropdown{
    position: inherit;
    right:2px;
    bottom:0px;
    list-style: none;
}
header li.dropdown a, a:hover{
    text-decoration: none;
    cursor: pointer;
}
footer a{
    position: relative;
    display: inline-block;
    padding: 4px 15px;
    text-decoration: none;
    float: right;
}
footer a:hover{
    text-decoration: none;
}

article header h1{
    text-align: left;
    float: left;
    display: inline;
    font-size:1.2em;
    margin: 0% 0% 0% 2%;
    font-weight: bold;

}
article header h1 span{
    font-size: 0.9em;
    font-weight: normal;
}

.checkbox{
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.bootstrap-switch.bootstrap-switch-small {
    min-width: 60px;
    margin-right:3px;
    margin-left:5px;
    margin-top:3px;
}
#nav_aleft{
    height:30px;
    margin-right:2px;
    border: var(--border);
    background-color: var(--mainColor);
}
#nav_aright {
    height:30px;
    margin-right:3px;
    border: var(--border);
    background-color: var(--mainColor);
}
#nav_aleft_fw{
    height:30px;
    margin-right:3px;
    border: var(--border);
    background-color: var(--mainColor);
}
#nav_aright_fw {
    height:30px;
    margin-right:3px;
    border: var(--border);
    background-color: var(--mainColor);
}
#nav_options{
    height:30px;
    margin-right:1px;
    border: 1px solid #555;
}
#navSet{
    bottom:0;
}
.modal-body{
    word-wrap: break-word;   
}

#loading{
    position:relative;
    width:50px;
    height:50px;
    top: 50%;
    transform: translateY(-50%);
    left: 50%;
    transform: translateX(-50%);
    background: url("loading.gif");
    background-position: center center;
    background-size: 50px;
    background-repeat: no-repeat;
}
.nav>li.disabled>a {
    color: #ccc;
}

.navbar-center {
    display: none;
}

#options{
    position: relative;
    left:0px;
    top:200px;
    width:99px;
    height:93px;
    background: white; 
    background-color: var(--mainColor);
}
.nav-tabs {
    border: none;
    position: relative;
    height: 8%;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {
    color: #555;
    background-color: var(--mainColor);
    border: var(--border);
    border-bottom-color: transparent;
    cursor: default;
    height: 100%;
}
.nav-tabs>li {
    float: left;
    margin-bottom: -1px;
    margin-left: 4px;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary, .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
    color: #fff;
    background: #555;
}
a:hover{
    font-weight: bold !important;
    color:black !important;
}

.modal-content {
    background-color: #f2f2f2;
}

.modal{
    -webkit-touch-callout: none;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;      
}

#navigation_m {
    overflow: scroll;
}

.btn {
    box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
}

/* MOBILE */
@media screen and (max-height: 500px), screen and (max-width: 769px){
    
    main {
        overflow-y: scroll;
    }
    
    main::-webkit-scrollbar { 
        display: none; 
    }
    
    .main_header{
        height: 8%;
    }
    
    .main_header h1 {
        width: 72%;
        font-size: 23px;
        line-height: 23px;
        text-align: center;
    }
    
    @media screen and (max-height: 700px){
        .main_header h1 {
            font-size: 20px;
            line-height: 20px;
        }
    }
    
    @media screen and (max-height: 900px){
        .main_header h1 {
            font-size: 17px;
            line-height: 15px;
        }
    }
    
    .main_header .menù_m {
        position: absolute;
        transform: translateY(-58%);
        right: 0;
    }
    
    .main_footer{
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
    }

    article{
        width: 100%;
        height: fit-content;
        position: relative;
    }

    article header {
        top: 10px;
        border: var(--border);
        border-radius: 0px 10px 10px 0px;
        background-color: var(--mainColor);
        box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
        width: fit-content;
        overflow: scroll;
        max-width: 100%;
    }
    
    article header::-webkit-scrollbar { 
        display: none; 
    }

    article header h1 {
        position: relative;
        line-height: 1.6em;
        white-space: nowrap;
        padding: 0% 2% 0% 2%;
        margin: auto;
    }
    
    article video {
        position: relative;
    }
    
    article footer {
        position: relative;
        border: var(--border);
        background-color: var(--mainColor);
        box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
        padding: 0% 2% 0% 2%;
        min-height: 10px;
    }
    
    #loading {
        top: 120px;
    }
    
    aside{
        width: 100%;
        height: fit-content;
        padding: 0px 10px;
    }
    
    div#navSet {
        width: 100%;
        height: fit-content;
        height: 30px;
        margin-top: 8px;
    }
    
    #nav_aright_fw {
        margin-right:0px;
    }
    
    #navSet .navbar-left {
        float: left;
    }
    
    #navSet .navbar-right {
        float: right;
    }
    
    aside #aside_nav {
        display: none;
    }
    
    aside .tab-content #navigation, aside .tab-content #links {
        display: none;
    }
    
    div#text{
        display: block;
        position:absolute;
        margin: 40px 10px 10px 10px;
        overflow-x: hidden;
        overflow-y: auto; 
        padding: 7px;
        word-wrap: break-word;
        background-color: var(--mainColor);
        border-radius: 15px 15px 15px 15px;
        box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
        border: var(--border);
        left: 0px;
    }
    
    /*Horizontal*/
    @media (min-aspect-ratio: 1/1) and (max-height: 550px){
        
        /*header h1 {
            font-size: 19px;
            padding-right: 40px;
        }*/
        .main_header .menù_m {
            top: 22px;
            font-size: 15px;
            margin-right: 5%;
        }
        video {
            max-height: 250px;
        }
         
        @media (min-height: 450px){
            .main_header {
                height: 9%;
            }
            main {
                top: 9%;
                height: 86%;
            }
            .main_footer {
                height: 5%;
            }
        }
        @media (max-height: 450px) and (min-height: 350px){
            .main_header {
                height: 12%;
            }
            main {
                top: 12%;
                height: 81%;
            }
            .main_footer {
                height: 7%;
            }
        }
        @media (max-height: 350px){
            .main_header {
                height: 45px;
            }
            main {
                top: 45px;
                height: 78%;
            }
            .main_footer {
                height: 30px;
            }
        }
    }
    
    /*Vertical*/
    @media (max-aspect-ratio: 1/1), (min-height: 550px){
        .main_header .menù_m {
            top: 50%;
            margin-top: 1px;
            font-size: 3vh;
            margin-right: 8%;
        } 
        main {
            position:relative;
            height: 87%;
        }
        .main_footer {
            height: 5%;
            text-align: center;
        }
        .main_footer a {
            float: none;
        }
        footer a {
            font-size: 2.1vh;
            padding: 4px 10px;
        }
        video {
            max-height: 350px;
        }
    }
    
}

/* DESKTOP */
@media screen and (min-height: 500px) and (min-width: 769px){

    section {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
        left: 0;
        right: 0;
        max-height: 700px;
    }
    
    @media screen and (max-height: 600px){
      section {
        max-width: 800px;
      }
    }
    
    @media screen and (max-height: 535px){
      section {
        max-width: 650px;
      }
    }
    
    .main_header {
        max-height: 80px;
    }
    
    .main_header h1 {
        font-size: 25px;
    }
    
    @media screen and (max-height: 600px){
        .main_header h1 {
            font-size: 23px;
        }
    }
    
    @media screen and (max-height: 535px){
        .main_header h1 {
            font-size: 20px;
        }
    }
    
    .main_header .menù_m {
        display: none;
    }
    
    main {
        top: 50%;
        transform: translateY(-47%);
        height: 82%;
    }
    
    .main_footer{
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }
    
    article{
        background-color: var(--mainColor);
        border: var(--border);
        border-radius: 15px 15px 15px 15px;
        box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
        width: 75%;
    }
    
    aside{
        position:absolute;
        width: 25%;
        margin-left: 75%;
        height: 100%;
        overflow: hidden;
    }
    
    article video {
        top: 50%;
        transform: translateY(-50%);
    }
    
    div#navSet{
        position: absolute;
        height: 10%;
        width: 100%;
        padding-top: 4%;
        padding-left: 2%;
    }
    
    div#text{
        overflow-x: hidden;
        overflow-y: auto; 
        padding: 7px;
        word-wrap: break-word;
        position: absolute;
        background-color: var(--mainColor);
        border-radius: 0px 15px 15px 0px;
        box-shadow: 3px 3px 3px rgba(0,0,0,0.2);
        border: var(--border);
        height: 82%;
        width: 100%;
    }
}