/*各ページの共通部分のスタイルを定義*/

@charset "utf-8";

* {
    box-sizing: border-box;
    word-break: auto-phrase;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--main_bg_color);
    font-family: var(--font_family);
}

/*ヘッダーのスタイル*/
.opacity_header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--color_one);
    height: var(--header_height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--header_z_index);
}

.time_wrapper {
    position: absolute;
    top: var(--hambarger_top_position);
    left: 1.5rem;
    color: #fff;
    text-align: center;
}

.title {
    color: #fff;
}

/*ハンバーガーメニュー*/
.hambarger {
    position: absolute;
    cursor: pointer;
    width: var(--hambarger_width);
    height: var(--hambarger_height);
    top: var(--hambarger_top_position);
    right: var(--hambarger_right_position);
    transition: all .5s ease-in-out;
}

/*ハンバーガーメニューのラインのスタイル*/
.line {
    background-color: #fff;
    border-radius: 2px;
    height: 4px;
    width: 100%;
    position: absolute;
    transition: all .5s ease;
}

.line:nth-of-type(1) {
    top: 0;
}
.line:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
}
.line:nth-of-type(3) {
    bottom: 0;
}

.hambarger.active > .line:nth-of-type(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hambarger.active > .line:nth-of-type(2) {
    display: none;
}
.hambarger.active > .line:nth-of-type(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/*メニューテキスト部分のスタイル*/
.menu_text {
    display: block;
    text-align: center;
    color: #fff;
    margin-top: var(--hambarger_height);
    font-size: 1.5rem;
    transition: all .7s ease-in-out;
}
.hambarger.active .menu_text {
    transform: rotateY(360deg);
}

/*メインメニューのスタイル*/
.navmenu {
    display: none;
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color_one);
    text-align: center;
    color: #fff;
    z-index: calc(var(--header_z_index) - 1);
}
.navmenu.active {
    position: fixed;
    animation: fadein .5s forwards;
}
.navmenu.inactive {
    position: fixed;
    animation: fadeout .5s forwards;
}

.navmenu.active, .navmenu.inactive {
    top: var(--header_height);
    right: 0;
}

/*メインメニューのフェードイン、フェードアウト時のアニメーション*/
@keyframes fadein {
    0% {
        right: -10%;
        opacity: 0;
    }100% {
        right: 0%;
        opacity: 1;
    }
}
@keyframes fadeout {
    0% {
        right: 0;
        opacity: 1;
    }
    100% {
        right: -10%;
        opacity: 0;
    }
}

.menu_list {
    width: 70%;
    margin: auto;
    padding-right: 40px;
}

.menu_title {
    text-decoration: underline;
    font-size: 1.5rem;
    letter-spacing: 0.3rem;
}

.menu_item {
    display: flex;
    height: 3.2rem;
    margin-top: 0.4rem;
    border-bottom: 1px solid #fff;
}

.menu_item a {
    width: 100%;
    height: 100%;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: all .3s ease-in-out;
}
.menu_item a:hover {
    opacity: .7;
    background-color: #00796b;
}

#thispage {
    opacity: .7;
    text-decoration: line-through;
}

.menu_item a, #thispage {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    letter-spacing: 0.2rem;
}

/*フッターのスタイル*/
footer {
    background-color: var(--color_two);
    color: var(--color_one);
    border-radius: 10px;
    margin: 0.625rem;
    padding: 0.625rem;
}

footer p {
    text-align: center;
}

.footer_nav {
    margin-top: 1.8rem;
}

.footer_nav_list {
    display: flex;
    justify-content: center;
    list-style: none;
}

.footer_nav_item {
    margin-right: 1.25rem;
}

.footer_nav a {
    text-decoration: none;
    color: var(--color_one);
}
.footer_nav a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

footer #thispage {
    letter-spacing: 0;
    font-size: 1.0rem;
}

/*ページトップボタンのスタイル*/
.pagetop {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    text-decoration: none;
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--color_one);
    border-radius: 100%;
    cursor: pointer;
    opacity: 0;
    transition: all .3s ease-in-out;
    z-index: calc(var(--header_z_index) - 2);
}

.pagetop p {
    transform: rotateZ(-90deg);
}