[hidden] {
    display: none !important;
}
.hidden {
    display: none !important;
}
body {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
/* Fonts */
@font-face {
    font-family: "Commit";
    src: url("/assets/fonts/commit.woff2") format('woff2');
    font-weight: normal;
}
* {
    font-family: "Commit", monospace;
}
h1,h2,h3,h4,h5,h6 {
    font-weight: normal;
    font-style: normal;
    line-height: 1.7;
}
h2,h3,h4,h5,h6 {
    margin: 48px 0 0 0;
}
h1 {
    font-size: max(32px, 2rem);
}
h2 {
    font-size: max(24px, 1.8rem);
}

h3 {
    font-size: max(20px, 1.6rem);
}
p {
    font-size: 1.2rem;
    line-height: 1.7;
    margin: 16px 0 0 0;
}
main li {
    font-size: 1.2rem;
    line-height: 1.7;
}
/* Accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
}
header {
    padding-top: 32px;
}
.skip-to-content:focus {
    top: 0;
}
/* Top Bar */
.top-bar {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Langswitch Top Bar */
.top-bar .langswitch {
    width: fit-content;
}

.langswitch a {
    text-align: center;
    width: auto;
    font-size: 16px;
    color: black;
    text-decoration: none;
}

/* Main Navigation */
.mainnavi-cont {
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.mainnavi, .menu-item {
    list-style: none;
}

.mainnavi {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 0;
    max-width: max-content;
    margin: 20px;
}
.menu-item {
    width: fit-content;
    margin: 5px;
}
.menu-item a, .menu-item button {
    width: max-content;
    display: block;
    color: black;
    text-decoration: none;
    padding: 6px 10px 5px 10px;
    border: none;
    cursor: pointer;
    background-color: white;
    font-size: 18px;
    border-radius: 15px;
}
.menu-item a:hover, .menu-item button:hover {
    background-color: #15679333;
}
.menu-item a:focus, .menu-item button:focus {
    background-color: #15679333;
    outline: dotted 2px black;
    outline-offset: 4px;
}
.menu-item a.active, .menu-item button.active {
    background-color: #15679333;
}
.menu-item button:active {
    background-color: #15679333;
}
.menu-item button {
    position: relative;
}
/*
.mainnavi li:last-child a:not(.submenu a) {
    background-color: #156793;
    color: white;
}
.mainnavi li:last-child a:not(.submenu a):hover {
    background-color: rgb(18, 81, 116);
    color: white;
}
    */
.has-submenu {
    position: relative;
}
.submenu {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease-in, height 0.2s ease-out;
    position: absolute;
    z-index: 9999;
    display: none;
    gap: 5px;
    flex-direction: column;
    list-style: none;
    padding: 16px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 15px;
    width: max-content;
    margin: 16px 0 0 0;
}
.submenu.visible {
    display: flex;
    opacity: 1;
    max-height: max-content;
    border: dotted 2px black;
}
.submenu-overview {
    font-weight: bold;
}
.submenu a {
    background-color: white !important;
    width: 100%;
    border: none;
    padding: 3px 0;
    margin: 0;
}
.submenu a:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration: underline dotted 2px;
    text-underline-offset: 4px;
}
.submenu a:focus {
    text-decoration: underline dotted 2px;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
    outline: none !important;
}
.divider {
    border-bottom: dotted 2px #333333;
    width: 400px;
    margin: 32px auto;
}

/* Body, Main */
body {
    position: relative;
    padding: 0;
    margin: 0;
}
main {
    min-height: calc(90svh - 128px);
    max-width: 60rem;
    margin: auto;
    padding: 0 16px 32px;
}

/* Footer */
footer {
    margin-top: 128px;
    width: auto;
    color: white;
    padding: 35px 20px 2px 20px;
    background-color: #333333;
    border-top: 1px dashed rgb(199, 199, 199);
}
.footer-flex {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10%;
}
.copyright {
    font-size: 0.8rem;
    padding: 16px 8px 16px ;
    display: block;
    margin-top: 50px;
    text-align: center;
    color: rgb(199, 199, 199);
    border-top: 1px dashed rgb(199, 199, 199);
}

/* Footer Navigation */
.footer-navigation ul, .menu-item {
    list-style: none;
}

.footer-navigation ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10%;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.footer-navigation li {
    padding: 0;
    margin: 0;
    width: fit-content;
}
.footer-navigation li a {
    width: max-content;
    display: block;
    color: white;
    text-decoration: none;
}

/* Legal Navigation */
.legal {
    margin-top: 50px;
    padding-top: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-top: 1px dashed rgb(199, 199, 199);
}
.legal ul, .menu-item {
    list-style: none;
}
.legal ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10%;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.legal li {
    padding: 0;
    margin: 0;
    width: fit-content;
}
.legal li a {
    width: max-content;
    display: block;
    color: rgb(199, 199, 199);
    text-decoration: none;
}

@media screen and (max-width:768px) {
    .divider {
        width: 33%;
    }
    .legal ul {
        flex-direction: column;
        gap: 1rem;
    }
    .footer-navigation ul {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .footer-flex {
        flex-direction: column;
        width: 100%;
        justify-content: center;
        gap: 10%;
    }
    .footer-navigation {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Language Specific CSS */
html[lang=ja] .menu-item a, html[lang=ja] .menu-item button {
    padding: 5px 10px !important;
}
