@charset "utf-8";

*,
::before,
::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

body {
    font-family: "Helvetica Neue", "Helvetica", "Hiragino Sans", "Arial", "Yu Gothic", "Meiryo", sans-serif;
    font-size: 16px;
    color: hsl(256 100% 30%);
    line-height: 1;
    background-color: hsl(256 100% 98%);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    max-height: 100%;
}

.header {
    color: #ffffff;
    background-color: hsl(256 100% 22%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    box-shadow: 0 3px 6px hsl(0 0% 0% /10%);
}

.header-inner {
    max-width: 1200px;
    height: 100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Elements used only for the narrow screen layout. */
.header-inner input {
    display: none;
}
.h-menu_toggle {
    display: none;
}
.h-menu_header {
    display: none;
}
.asrc-logo {
    display: none;
}
.language-menu-responsive {
    display: none;
}
.sub-menu_header {
    display: none;
}

/* Group name. */
.header-title h1 {
    width: 280px;
    height: 30px;
    margin-right: 10px;
    font-size: 24px;
    text-align: center;
    flex: 0 0 auto; /* The size is fixed. */
}
/* ASRC, JAEA. */
.header-title h2 {
    width: 280px;
    height: 20px;
    margin-right: 10px;
    font-size: 16px;
    text-align: center;
    color: hsl(256 100% 90%);
    flex: 0 0 auto; /* The size is fixed. */
}

/* ASRC logo size is fixed. */
.header-logo {
    width: 110px;
    height: 70px;
    flex-shrink: 0;
}

/* The main menu wrapper for the wide screen layout. */
.header-site-menu {
    display: flex;
    flex: 5 5 max-content; /* The wrapper should grow and fill the "header-inner" box. */
    flex-direction: column; /* From top to bottom, language menu, horizontal line, and main menu. */
    align-items: stretch;
}

/* Horizontal line separating the language and main menus. */
.header-site-menu hr {
    clear: both;
    width: 100%; height: 2px;
    margin: 4px auto;
    background-color: goldenrod;
    border: none;
}

/* Justify to the right. */
.language-menu {
    display: flex;
    justify-content: flex-end;
}

.language-menu li {
    height: 22px;
    width: auto;
    padding-top: 4px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 14px;
    text-align: center;
    color: hsl(256 100% 90%);
}

/* Highlight under cursor. */
.language-menu li:hover {
    color: #ffffff;
    background-color: hsl(256, 34%, 40%);
}

/* The main menu list properties. */
.site-menu ul{
    /* clear: both; */
    width: 100%; /* The main menu fills the header. */
    flex-grow: 5; /* Ensure it fills the box. */
    display: flex;
    position: relative;
    justify-content: space-around; /* Each menu button is afforded the same amount of space. */
}

/* Each menu element should grow to fill the parent box. */
.site-menu li{
    flex: 5 5 100%;
}

.home-button {
    display: none;
}

.site-menu li:nth-child(3), .site-menu li:nth-child(5) {
    min-width: 100px;
}

/* The element contains either a link or checkbox label for a submenu. */
.site-menu ul a, .site-menu ul label {
    flex: 5 5 auto;
    height: 24px;
    display: block;
    padding-top: 4px;
    padding-bottom: 4px;
    text-align: center;
    position: relative; /* The label will be the reference position for the submenu. */
    background-color: hsl(256 100% 22%);
}

/* Highlight under cursor/ */
.site-menu ul a:hover, .site-menu ul label:hover {
    color: goldenrod;
    background-color: hsl(256 80% 35%);
    cursor: pointer;
}

/* Submenu wrapper. */
.site-menu .dropdown-menu {
    display: none;
    padding-top: 6px;
}

.dropdown-menu ul a {
    height: 30px;
    font-size: 14px;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Submenu layout. */
.site-menu li:hover .dropdown-menu {
    display: block;
    position: absolute; /* It appears right after the parent li. */
    width: 16.7%; /* The width is fixed to be 1/6 of "header-site-menu". */
    min-width: 100px;
}

/* The same appearance as the main menu. */
.site-menu li:hover .dropdown-menu ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.site-menu li:hover .dropdown-menu li {
    width: 100%;
}

.main {
    padding-top: 100px;
}

.footer {
    /* min-width: 1170px; */
    color:#ffffff;
    background-color: hsl(256 100% 22%);
    padding-top: 15px;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-site-menu {
    width: 600px;
}

.footer-logo {
    display: block;
    width: 200px;
    margin-top: 70px;
}

.footer-tel {
    font-size: 20px;
    margin-top: 28px;
}

.copyright {
    font-size: 14px;
    font-weight: bold;
    margin-top: 50px;
}

/* Break point set at 1000px. */

@media (max-width: 1000px) {
    /* Change the header size. */
    .header {
        height: 50px;
        width: 100vw; /* The header spans the full screen width. */
    }

    .main {
        padding-top: 50px;
    }

    .footer-site-menu {
        display: none;
    }
    .header-inner {
        padding-left: 10px;
        padding-right: 10px;
        height: 100%;
        width: 100%;
        position: relative;
    }

    .header-logo {
        width: 90px;
        height: 50px;
        padding: 0;
    }

    .asrc-logo {
        display: block;
        height: 100%;
        flex-grow: 4; /* It grows to create space between the logos and buttons. */
        flex-shrink: 0;
    }

    /* No group name in the header. */
    .header-title {
        display: none;
    }

    /* Separate language menu for narrow screens. */
    .language-menu-responsive {
        display: block;
    }

    /* Vertical line between the language choices. */
    .language-menu li + li {
        border-left: 1px solid goldenrod;
    }

    /* The original language menu and horizontal line inside main menu are hidden. */
    .header-site-menu .language-menu {
        display: none;
    }
    .header-site-menu hr {
        display: none;
    }
    
    /* Humberger menu button visible. */
    .h-menu_toggle {
        display: block;
    }
    label.h-menu_toggle {
        cursor: pointer;
    }

    /* Mask the background when the humberger menu is shown. */
    .h-menu_overlay {
        background-color: rgba(234, 232, 232, 0.5);
        position: absolute; /* With respect to "header-inner". */
        top: 0;
        width: 100%;
        left: 0px;
        height: 100vh;
        z-index: 1;
        display: none; /* Hidden unless the menu button is checked. */
    }

    /* The main menu wrapper itself is shrunk to zero. */
    .header-site-menu {
        width: 0;
        flex-grow: 0;
    }

    /* Main code for the humberger menu transition. */

    /* "site-menu" is now the main manu. */
    .site-menu {
        position: absolute; /* With respect to "header-inner". */
        top: 0;
        right: 0; /* The menu sticks to the right. */
        max-width: 450px;
        width: calc(100vw - 30px); /* Leave a space on the left. */
        height: 400px;
        transform: translate3d(450px, 0, 0); /* Outside the screen unless the humberger button is checekd.*/ 
        transition: 0.35s;
        display: block;
        z-index: 1;
        /* overflow: hidden; */ /* This line existed in the original sample from cohamu.com, but doesn't work. */
    }

    .home-button {
        display: block;
    }

    /* Header for the narrow screen main menu. */
    .h-menu_header {
        padding: 0 16px;
        height: 50px; /* Overlays the main header "header-inner". */
        display: flex;
        justify-content: space-around;
        align-items: center;
        background-color: hsl(256 100% 98%);
    }

    .h-menu_header span {
        font-family: sans-serif;
        font-weight: bold;
        font-size: 16px;
        color: hsl(256 100% 30%);
        line-height: 1;
        text-align: center;
        width: 100%;
    }

    /* The main menu list. */
    .site-menu ul {
        display: block; /* The flex has to be cancelled. */
        overflow-y: visible;
    }
    .site-menu ul li {
        position: relative;
        width: 100%;
    }
    .site-menu ul a, .site-menu ul label {
        display: block;
        width: 100%;
        height: 100%;
        padding: 0 15px;
        line-height: 47px;
        background-color: hsl(256 50% 35%);
        text-align: left; /* Alighned to left to accommodate submenus. */
        position: relative; /* Reference position for chevrons and submenus. */
        border-bottom: 1px dotted hsl(256 100% 98%);
    }

    /* Chevron icon realised as a part of the border of psuedo-element. */
    .site-menu ul label.label_chevron::after {
        content: "";
        position: absolute;
        display: inline-block;
        height: 10px;
        width: 10px;
        border-color: goldenrod;
        border-style: solid;
        border-width: 2px 2px 0 0;
        transform: rotate(-135deg);
        top: 50%;
        margin-top: -5px;
        right: 16px;
    }

    /* Cancels the width specification of the wide screen layout. */
    .site-menu li:hover .dropdown-menu {
        width: calc(100% - 100px);
    }

    /* The submenus are pushed further to the right from the main menu. */
    .site-menu .dropdown-menu {
        display: block;
        position: absolute; /* Relative to the main menu. */
        padding: 0;
        top: 0;
        right: 0; /* Sticks to the right. */
        width: calc(100% - 100px); /* It should leave the main menu visible when it pops in. */
        transform: translate3d(450px, 0, 0);
        transition: 0.35s;
        z-index: 2;
    }

    /* Cancels the wide screen layout. */
    .dropdown-menu ul a {
        display: block;
        width: 100%;
        line-height: 47px;
        border-bottom: 1px dotted goldenrod;
    }

    .sub-menu_header {
        display: block;
        height: 48px;
        border-bottom: 1px dotted goldenrod;
    }

    .site-menu .sub-menu_header label {
        width: 100%;
        height: 47px;
        position: relative;
        border-bottom: none;
        background-color: hsl(256 80% 35%);
    }

    .sub-menu_header label::before {
        content: "";
        position: absolute;
        display: inline-block;
        height: 10px;
        width: 10px;
        border-color: goldenrod;
        border-style: solid;
        border-width: 2px 2px 0 0;
        transform: rotate(45deg);
        top: 50%;
        margin-top: -5px;
        left: 16px;
    }

    /* The actions when the humberger menu is checked. */
    .h-menu_checkbox:checked ~ .h-menu_overlay {
        display: block;
    }
    .h-menu_checkbox:checked ~ .header-site-menu .site-menu {
        transform: translate3d(0, 0, 0);
        transition: transform 0.35s;
    }

    /* The submenu action. */
    .sub-menu_checkbox:checked ~ .dropdown-menu {
        transform: translate3d(0, 0, 0);
        transition: 0.35s;
    }
    .sub-menu_checkbox:checked ~ label {
        color: goldenrod;
        background-color: hsl(256 80% 35%);
    }

    .footer {
        width: 100%;
    }

    .footer-logo {
        width: 180px;
        margin-top: 50px;
    }

    .footer-tel {
        font-size: 20px;
    }

    .copyright {
        margin-top: 30px;
    }

}