* {
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    /* color:cornflowerblue; */
}

.header, .footer {
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    height: 2.0rem;
    min-height: 2.0rem;
    min-width: 100%;
    background-color: var(--background);
    color: var(--menu-title);
    position: fixed;
}

.header {
    top: 3px;
}

.header a:hover {
    color: var(--menu-title);
}

.footer {
    /* background-color: purple; */
    bottom: 3px;
    justify-content: right;
}

.footer:last-child {
    margin-left: auto;
}

.header a:visited {
    color: var(--background-hover);
}


.main-contents {
    z-index: 0;
    font-size: 1.75rem;
    position: relative;
    top: 1rem;
    bottom: 1rem;
    padding-bottom: 1rem;
}

.dynamic-content {
    padding-left: 1rem;
}

/* ham menu */
.ham-menu {
    height: 50px;
    width: 40px;
    margin-right: auto;
    position: relative;
    cursor: pointer;
    padding-top: 5 px;
    /* padding-bottom: 5px; */
}

.ham-menu span {
    height: 2px;
    width: 80%;
    background-color: var(--menu-title);
    border-radius: 10px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: .3s ease;
}

.ham-menu span:nth-child(1) {
    top: 36%;
}

.ham-menu span:nth-child(3) {
    top: 64%;
}

.ham-menu.active span {
    /* background-color: var(--menu-title); */
    background-color: var(--menu-title);
}

.ham-menu.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(2) {
    opacity: 0;
}

.ham-menu.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.rightmost {
    padding-right: 1rem;
    margin-left: auto;
}

/* flexible-menu */
.flexible-menu {
    z-index: 1;
    height: 100vh;
    width: 100%;
    max-width: 50vh;
    position: fixed;
    top: 2rem;
    left: -50vh;
    display: flex;
    flex-direction: column;
    align-items: left;    
    justify-content: start;
    padding-top: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
    gap: 0.5rem;
    font-size: 1.5rem;
    transition: .3s ease;
    background-color: var(--background);
}

/* .flexible-menu a, div.menu-title { */
.flexible-menu div {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 5px;
    padding-bottom: 5px;
    width: 15rem;
    min-width: 15rem;
    max-width: 15rem;
    text-align: left;
}

.flexible-menu div.has-submenu {
    padding-left: 0;
}

.flexible-menu.active {
    /* right: 0; */
    left: 3px;
    top: 2rem;
}

.flexible-menu a {
    color: var(--menu-title);
}

.flexible-menu a:visited {
    color: var(--menu-title);
}

.flexible-menu a.selected {
    color: var(--selected);
}

div.menu-title:hover {
    border: solid 1px black;
    background-color: var(--background-hover);
    color: var(--background);
}

div.menu-title:hover>a {
    background-color: var(--background-hover);
    color: var(--background);
}

 .has-submenu {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.menu-title {
    font-weight: bold;
    cursor: pointer;
}

.submenu {
    display: none;
    flex-direction: column;
    justify-content: stretch;
    color: var(--menu-title);
    background-color: var(--background);
}

.submenu a:hover {
    background-color: var(--background-hover);
    color: var(--background);
}

.submenu.active {
    display: flex;
}


.menu-father {
  position: relative;
}

.menu-father .label {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
}

.menu-father .label::after {
  content: "\25BC";
  font-size: 0.8rem;
  transition: transform 0.4s ease;
}

.menu-father.open .label::after {
  transform: rotate(180deg);
}

nav > div:has(> a:first-child > img) {
    display: none;
}

/****************************************************************************/

@media screen and (width>800px) {
    body {
    /* font-family: Arial, Helvetica, sans-serif; */
    /* font-family: 'Courier New', Courier, monospace; */
    /* font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; */
    /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
    /* font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; */
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    /* font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; */
    font-size: 1.25rem;    
    }

    .ham-menu {
        display: none;
    }

    .flexible-menu {
        top: 3px;
        height: 2.0rem;
        max-width: 80vh;
        /* width: 100%; */
        /* max-width: 100%; */
        /* right: -450px; */
        left: 0;
        padding-left: 2rem;
        flex-direction: row;
        align-items: center;    
        justify-content:space-between;
        padding-top: 3px;
        font-size: 1.25rem;
        
    }

    .flexible-menu div {
        width: 12rem;
        min-width: 12rem;
        max-width: 12rem;
    }


    .flexible-menu.active {
        top: 3px;
    }

    .flexible-menu div.submenu {
        padding-left: 0;
    }

    .header {
        left: 80vh;
        right: 0;
        /* inset: 0 0 0 450px; */
        min-width: calc(100vw - 80vh);
        /* background-color: green; */
    }

    .rightmost {
        min-width: 0;
    }

/*
     .has-submenu {
        flex-direction: column;
        gap: 3px;
    }
 */

 .submenu {
        position: fixed;
        top: 2.2rem;
    }

    nav > div:has(> a:first-child > img) {
        display: flex;
    }


}
