@charset "utf-8";

header {
    position: fixed;
    width: 20%;
    height: 100%;
    max-width: 350px;
    top: 0;
    left: 0;
    padding-left: 30px;
    z-index: 5;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

#banner {
    position: absolute;
    margin: auto 10px 30px 10px;
    width: 80%;
    height: auto;
    bottom: 0;
}

#cgarts {
    margin-right: 35%;
    margin-left: 1.5%;
    width: 65%;
}

.banner-rapper {
    margin: 10px 20% 0 0;
    width: 80%;
    transition: 0.2s;
}

.banner-rapper img {
    width: 100%;
    height: auto;
}

.banner-scale:hover {
    scale: 105%;
    transition: 0.2s;
}

#header-sns {
    display: flex;
    padding-right: 2%;
}

.sns-icons {
    margin: 3.5%;
    transition: 0.2s;
}

.sns-icons:hover {
    scale: 110%;
    transition: 0.2s;
}

#main-image {
    margin: 50px 30px 30px auto;
    max-width: 300px;
}

#main-image img {
    width: 100%;
    height: auto;
}

nav ul {
    margin: 50px 30px 30px auto;
    max-width: 250px;
    padding-left: 10px;
}

nav li {
    list-style: none;
    margin: 20px auto auto 0;
    max-width: 100px;
}

nav li a {
    color: white;
    text-decoration: none;
}

.menu-item-has-children {
    position: relative; 
}

.sub-menu {
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
    width: 150px;
    position: absolute;
    top: 0;
    left: 100%;
    margin: 0;
    padding: 0;
    background-color: #3a3a3a;
    color: white;
}

.menu-item-has-children:hover .sub-menu {
    visibility: visible;
    opacity: 1;
}

.sub-menu li {
    margin: 0;
    padding: 0;
    max-width: 150px;
}

.sub-menu li a {
    display: block;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
}

.sub-menu li a:hover {
    background-color: white;
    color: black;
}

.menu-item-has-children::after {
  content: "＞";
  margin-left: 4px;
  color: rgb(185, 185, 185);
  font-weight: bold;
}

footer {
  margin-top: auto;
}

footer,
footer a {
    text-align: center;
    color: white;
}

#gotop {
    cursor: pointer;
}

#copyright {
    font-size: 0.7em;
}


@media screen and (max-width: 959px) {
	/* 959px以下に適用されるCSS（タブレット用） */

    header {
        position: fixed;
        width: 100%;
        max-width: none;
        height: 90px;
        top: 0;
        left: 0;
        padding: 5px 0;
        z-index: 5;
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
        background-color: rgba(0, 0, 0, 0.5);
    }

    #banner {
        display: none;
    }

    #main-image {
        margin: 15px auto 15px 10px;
        height: 60px;
    }

    #main-image img {
        object-fit: contain;
        object-position: center left;
        width: 100%;
        height: 100%;
    }

    /* メニューのスタイル */
    .menu {
        position: fixed;
        top: 0;
        right: -100%; /* 初期状態では画面の外に隠れている */
        width: 250px;
        height: 100%;
        /*background-color: #fafad2;*/
        color: #333;
        transition: right 0.3s ease; /* スライドインのアニメーション */
        padding: 0;
        box-sizing: border-box;
        z-index: 10;
    }

    /* メニューが開いているとき */
    .menu.open {
        right: 0;
    }

    /* ボタンのスタイル */
    .hamburger {
        position: fixed;
        top: 25px;
        right: 30px;
        width: 40px;
        height: 32px;
        padding-top: 8px;
        cursor: pointer;
        z-index: 20;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: white;
        margin: 5px 0;
        transition: 0.4s;
    }

    /* バツ印に変化するスタイル */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    nav ul {
        margin: 100px 0 auto auto;
        width: 150px;
        padding: 0 25px 25px 0;
        background-color: rgba(0, 0, 0, 0.5);
    }

    nav li {
        width: 100%;
        max-width: 100%;
        text-align: right;
        box-sizing: border-box;
    }

    nav li a {
        color: white;
        text-decoration: none;
    }

    .menu-item-has-children {
        position: relative; 
    }

    .sub-menu {
        display: none;
        position: static;
        visibility: visible;
        opacity: 1;
        background-color: rgba(0, 0, 0, 0);
        margin: 10px 0 10px 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .menu-item-has-children.is-submenu-open > .sub-menu {
        display: block;
    }

    .sub-menu li {
        margin: 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        padding-right: 10px;
    }

    .sub-menu li a {
        display: block;
        padding: 8px 12px;
        white-space: nowrap;
        text-align: right;
    }

    .sub-menu li a:hover {
        background-color: rgba(0, 0, 0, 0);
        color: white;
    }

    .menu-item-has-children::after {
        display: none;
        content: none;
    }
    .menu-item-has-children::before {
        content: "∨";
        margin-left: 4px;
        color: rgb(185, 185, 185);
        font-weight: bold;
    }
}

@media screen and (max-width: 480px) {
	/* 480px以下に適用されるCSS（スマホ用） */

    header {
        position: fixed;
        width: 100%;
        height: 60px;
        max-width: none;
        top: 0;
        left: 0;
        padding: 0;
        z-index: 5;
        filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    }

    #main-image {
        margin: 10px auto 10px 10px;
        height: 40px;
    }

    .hamburger {
        position: fixed;
        top: 15px;
        right: 15px;
        width: 25px;
        height: 19px;
        padding: 3px 0;
        cursor: pointer;
        z-index: 20;
    }

    .hamburger span {
        display: block;
        height: 2px;
        width: 100%;
        background-color: white;
        margin: 5px 0;
        transition: 0.4s;
    }

    nav ul {
        margin-top: 60px;
    }
}