body {
    font-family: "Open Sans", sans-serif;
    color: white;
    background-color: white;
    border: 0;
    margin: 0;
    overflow-x: hidden;
}

h1 {
    font-size: 2rem;
    line-height: 2;
}

/* Home ************************************************************************/

body#body_home:after {
    content: "";
    position: fixed; /* stretch a fixed position to the whole screen */
    top: 0;
    height: 100vh; /* fix for mobile browser address bar appearing disappearing */
    left: 0;
    right: 0;
    z-index: -1; /* needed to keep in the background */
    background: url('images/homepage/home.jpg') center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

#home_header {
    position: fixed;
    top: 0;
    color: white;
    background-color: rgb(228, 21, 28, 1);
    height: 10vh;
}

/*#selected_instrument {*/
/*	color: white;*/
/*	font-size: 1rem;*/
/*	visibility: visible;*/
/*	text-align: right;*/
/*}*/

#home_footer {
    height: 8vh;
    color: white;
    /*background-color: rgb(228, 21, 28, 1);*/
    background-color:  #cfcecd;
}

#home_footer div {
    display: flex;
    font-size: 1rem;
    flex-direction: column;
    background-color: rgb(228, 21, 28, 1);
}

div.piece_container {
    width: 100vw;
    display: flex;
    flex-direction: row;
    margin-bottom: 2rem;
    margin-left: 2rem;
}

div.piece_cover {
    width: 2.5rem;
    height: 2.5rem;
    background-color: white;
    margin-right: 2vh;
}

div.piece_container:nth-child(odd) div.piece_cover {
    margin-left: 3.5rem;
}

div.piece_metadata {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

a.copyright:link, a.copyright:visited {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

a.copyright:hover {
    color: #cfcecd;
}

a.link_to_piece:link, a.link_to_piece:visited {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
}

a.link_to_piece:hover {
    color: #cfcecd;
}

div.logo_container {
    height: 5vh;
    margin-right: 2vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position-x: left;
    background-position-y: center;
    cursor: pointer;
}

#home_footer div div.two_logos {
    display: flex;
    flex-direction: row;
}

div#logo_unimi {
    background-image: url('images/logos/logo_unimi.png');
}

div#logo_lim {
    background-image: url('images/logos/logo_lim.svg');
    width: 7vh;
}

section#piece_menu {
    background-color: rgb(228, 21, 28, 1);
    padding: 10vh;
    padding-bottom: 15vh;
    position: relative;
    top: 100vh;
}

#button_goto_player {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30vh; /* Set the width of your div */
    min-width: 150px;
    height: 6vh; /* Set the height of your div */
    min-height: 40px;
    color: white;
    background-color: rgb(228, 21, 28, 1);
    text-align: center;
    line-height: max(6vh, 40px); /* Set the same value as the height for vertical centering */
    cursor: pointer;
    border: 1px solid white;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
}

/*#button_goto_player:hover {*/
/*	background-color: orange;*/
/*}*/

img.open_close_icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

input#home_search {
    font-size: 1.2rem;
    padding: 0.5rem;
    font-family: "Open Sans", sans-serif;
    color: black
}

/* Header **********************************************************************/

header {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    height: 10vh;
    box-sizing: border-box;
    color: white;
    background-color: rgb(228, 21, 28, 1);
}

div#header_left, div#header_left_home {
    width: 10vh;
    height: 8vh;
    padding-top: 1vh;
    box-sizing: border-box;
    background-image: url('images/logos/eti.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position-y: center;
    /*background-color: orange;*/
    margin-left: 1vh;
    cursor: pointer;
}

div#header_right, div#header_right_home {
    width: 21.5vh;
    height: 10vh;
    /*padding-top: 1vh;*/
    box-sizing: border-box;
    background-image: url('images/logos/cornerlogo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position-y: center;
    /*background-color: orange;*/
    /*margin-right: 1vh;*/
    cursor: pointer;
    /* background-color: white; */

}

div#footer_left, div#footer_left_home {
    width: 10vh;
    height: 7vh;
    padding-top: 1vh;
    box-sizing: border-box;
    background-image: url('images/homepage/ieee1599.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position-y: center;
    /*background-color: orange;*/
    /*margin-left: 1vh;*/
    cursor: pointer;
}

div#header_center{
    width: 80vh;
    padding: 2.5vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    justify-items: center;
    height: 10vh;
    box-sizing: border-box;
    background-size: cover;
    background-position: bottom;
    /*background-color: orange;*/
}

/*div#header_left_home {*/
/*	background-image: url('/images/homepage/ieee1599.png');*/
/*}*/

/*div#header_right {*/
/*    width: 10vh;*/
/*    height: 8vh;*/
/*    padding-top: 1vh;*/
/*    display: flex;*/
/*    flex-direction: row;*/
/*    justify-content: flex-end;*/
/*    align-items: center;*/
/*    justify-items: center;*/
/*    box-sizing: border-box;*/
/*    background-size: cover;*/
/*    background-position: bottom;*/
/*    !*background-color: orange;*!*/
/*}*/

/* Section: main ****************************************************************/

section#section_main {
    width: 100vw;
    height: 25vh;
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

section#horizontal_instr_container {
    width: 100vw;
    height: 57vh;
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Metadata and score */

div#score_container {
    /*margin-top: 20vh;*/
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

div.metadata {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    color: white;
    box-sizing: border-box;
}

span#title {
    font-size: min(3.5vw, 3.5vh);
    font-weight: bold;
    text-align: center;
}

span#title img {
    width: min(2.5vw, 2.5vh);
    height: min(2.5vw, 2.5vh);
    margin-left: min(1vw, 1vh);
}

span#subtitle, span#author, span#accessible {
    font-size: min(1.5vw, 1.5vh);
    font-weight: normal;
    text-align: center;
}

span#simplified {
    cursor: pointer;
}

canvas#score {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    box-sizing: border-box;
}


/* Section: main ****************************************************************/

/* Pages ***********************************************************************/

.pages {
    position: relative;
    width: 33.33vw;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: start;
    justify-content: center;
    font-size: min(0.7rem, 1vh);
    color: black;
}

.upperBlock {
    position: relative;
    width: 100%;
    height: 10%;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: start;
    justify-content: center;
    font-size: min(0.7rem, 1vh);
    color: black;
}

.lowerBlock {
    position: relative;
    width: 100%;
    height: 90%;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    justify-content: center;
    font-size: min(0.7rem, 1vh);
    color: black;
}


.boxVideo, .boxKnob {
    position: absolute;
    width: 100%; /* Set size of the divs */
    height: 100%;
}

.boxVideo {
    /*background-color: red;  !* Example styles *!*/
    z-index: 1; /* Keep it behind box2 */
    /*transform: translate(-50%, -50%);*/
}

.boxKnob {
    /*background-color: blue;*/
    z-index: 2; /* Keep it in front */
    /*transform: translate(0%, 0%) scale(1.0,1.0);*/
    /*transform: translate(7%, -2%);  !* Slight scaling for partial overlap *!*/
}

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
    justify-content: center;
    margin-top: min(50px, 0.3vh);
}

/*#pages_l {*/
/*	visibility: visible;*/
/*	width: 20vw;*/
/*	height: 40vh;*/
/*	align-content: center;*/
/*	justify-content: center;*/
/*}*/

/*#pages_r {*/
/*	visibility: collapse;*/
/*}*/

#page_label_l, #page_label_r {
    color: black;
    font-size: min(0.7rem, 1vh);
}

/* Footer **********************************************************************/

footer {
    position: fixed;
    bottom: 0;
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    height: 8vh;
    padding: 2.5vh;
    box-sizing: border-box;
    /*background-color: rgb(228, 21, 28, 1);*/
    background-color:  #cfcecd;
}

div.button {
    width: 5vh;
    height: 5vh;
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid white;
    cursor: pointer;
    transition: 0.3s;
    background-color: #CFCECD;
}

div.button:hover {
    background-color: rgb(228, 21, 28, 1);
}

div.instrument_buttons, div.play_buttons {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: space-between;
}

div.left_buttons {
    width: 22.5vh;
}

div.instrument_buttons div.button {
    margin-left: 0.3vw;
    transition: 0.3s;
}

div.play_buttons div.button {
    margin-left: 1vh;
    margin-right: 1vh;
    background-size: 50%;
    transition: 0.3s;
}

div.button_small {
    width: 3vh;
    height: 3vh;
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    color: white;
    border: 1px solid black;
    cursor: pointer;
    transition: 0.3s;
}

div#button_home {
    background-image: url("images/icons/icon_home.svg");
}

div#button_help {
    background-image: url("images/icons/icon_help.png");
}

div#button_accessible {
    background-image: url("images/icons/icon_accessible.png");
}

div#button_rewind {
    background-image: url("images/icons/icon_rewind.svg");
}

div#button_metronome {
    background-image: url("images/icons/icon_metronome.svg");
    margin: 0;
    border-left: 0;
    border-right: 0;
    font-size: 0.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: 60%;
    line-height: 1.5;
}

div#button_metronome_down {
    width: 1.25vh;
    margin: 0;
    background-image: url("images/icons/icon_play.svg");
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}

div#button_metronome_up {
    width: 1.25vh;
    margin: 0;
    margin-right: 2vh;
    background-image: url("images/icons/icon_play.svg");
}

div#button_play {
    background-image: url("images/icons/icon_play.svg");
}

div#time_container {
    position: fixed;
    bottom: 9vh;
    color: black;
    display: flex;
    flex-direction: row;
    font-size: 0.8rem;
    font-weight: normal;
    width: 100vw;
    padding: 0;
    padding-left: 1vh;
    padding-right: 1vh;
    justify-content: space-between;
    box-sizing: border-box;
    align-content: center;
    align-items: center;
    height: 2vh;
}

div#time_bar_container {
    position: fixed;
    bottom: 8vh;
    left: 0;
    width: 100vw;
    background-color: white;
    height: 0.5vh;
    box-sizing: border-box;
    border-top: 1px solid #cfcecd;
}

div#time_bar {
    position: fixed;
    bottom: 8vh;
    left: 0;
    width: 0;
    background-color: #cfcecd;
    height: 0.5vh;
    box-sizing: border-box;
}

/* Help *******************************************************************/

div#help_container {
    display: none;
    transition: opacity 0.5s ease;
    font-size: 0.9rem;
}

div.help {
    padding: 15px;
    color: black;
    position: fixed;
    font-size: 0.8vw;
    background-image: url('images/other/cloud.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* Media query ************************************************************/

@media screen and (orientation: portrait) {

    #home_header {
        height: 8vh;
    }

    div.logo_container {
        width: 30vw;
        height: 7vh;
    }

    div#logo_lim {
        background-image: url('images/logos/logo_lim.svg');
        width: 7vh;
    }

    #button_goto_player {
        width: 15vh;
        height: 4vh;
        line-height: 4vh;
        font-size: 1rem;
        font-weight: bold;
    }

    section#piece_menu {
        padding: 4vw;
        padding-bottom: 20vw;
        top: 100vh;
    }

    div.piece_container {
        height: auto;
        margin-bottom: 2rem;
        margin-left: 2rem;
    }

    div.piece_cover {
        margin-right: 2vw;
        width: 1.5rem;
        height: 1.5rem;
    }

    div.piece_container:nth-child(odd) div.piece_cover {
        margin-left: 0;
    }

    a.link_to_piece:link, a.link_to_piece:visited {
        font-size: 1rem;
        line-height: 1;
    }

    input#home_search {
        font-size: 0.8rem;
        padding: 0.2rem;
    }

    div.button {
        width: 7vw;
        height: 7vw;
        border: 1px solid white;
    }

    div.button_small {
        margin-top: 1vw;
        width: 3vw;
        height: 3vw;
    }

    div.instrument_buttons div.button {
        margin: 0;
    }

    div.play_buttons div.button {
        margin-left: 1.25vw;
        margin-right: 1.25vw;
    }

    header {
        height: 8vh;
    }

    .instrument {
        width: 100%;
        height: 40vh;
    }

    #home_footer div.home_small_texts {
        display: none;
    }

    small {
        display: none;
    }


    /*div#header_left, div#header_left_home {*/
    /*    width: 30vw;*/
    /*    height: 8vw;*/
    /*    padding-top: 1vw;*/
    /*    background-position-x: 1vw;*/
    /*}*/

    /*div#header_left_home {*/
    /*    width: 40vw;*/
    /*    height: 8vh;*/
    /*    padding-top: 1vw;*/
    /*    margin-left: 1vw;*/
    /*}*/

    /*div#header_right {*/
    /*    padding: 2.5vw;*/
    /*    width: 30vw;*/
    /*    height: 10vw;*/
    /*}*/

    section#section_main {
        flex-direction: column;
        height: 82vh;
        margin-bottom: 5vh;
    }

    div#score_container {
        width: 99vw;
        height: 44vh;
        flex-direction: column;
        margin-top: 0;
    }

    canvas#score {
        width: 98vw;
        height: 44vh;
    }

    #horizontal_instr_container {
        padding-left: 5vw;
        padding-right: 5vw;
        box-sizing: border-box;
        height: 40vh;
    }

    .pages {
        flex-direction: row;
        font-size: 0;
        width: 100vw;
        height: auto;
    }

    .page {
        margin: 0;
        margin-left: 0.5vw;
        margin-right: 0.5vw;
        width: 0.5vw;
        height: 0.5vw;
    }

    div#pages_l {
        display: flex;
        visibility: visible;
        flex-direction: row;
    }

    /*div#pages_r {*/
    /*	display: none;*/
    /*}*/
    /*div.flute {*/
    /*    width: 100%;*/
    /*	height: 44vh;*/
    /*	justify-content: center;*/
    /*}*/
    /*div#instr_flute_l, #button_switch_right, #button_lock, #button_help {*/
    /*	display: none;*/
    /*}*/
    #button_play, #button_rewind {
        margin: 0;
    }

    /*.svg_horizontal_instrument {*/
    /*	width: 85vw;*/
    /*	height: 30vh;*/
    /*}*/
    div#time_container {
        bottom: 8vh;
        padding-left: 1vw;
        padding-right: 1vw;
        font-size: 0.7rem;
    }

    div#time_bar_container {
        font-size: 1rem;
        bottom: 8vh;
        width: 100vw;
        height: 0.5vw;
    }

    div#time_bar {
        bottom: 8vh;
        height: 0.5vw;
    }

    footer {
        height: 8vh;
        padding: 2.5vw;
    }

    h1 {
        font-size: 1.3rem;
    }

    /*div#header_left {*/
    /*    display: none;*/
    /*}*/

    div.metadata {
        align-items: flex-start;
        margin-left: 2vw;
    }

    span#title {
        font-size: 1.3rem;
        line-height: 0.7;
        text-align: left;
    }

    span#subtitle, span#author, span#accessible {
        font-size: 0.8rem;
        text-align: left;
    }

    #page_label_l, #page_label_r {
        margin-top: 1vw;
    }

}
