header{
    z-index: 99;
    position: relative;
}

/* Desktop Styles */
.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
}

/* Ensure the mobile header is hidden on desktop */
.mobile-header {
    display: none; /* Hide mobile header by default */
}

.desktop-header .logo img {
    width: 224px;
    vertical-align: middle;
}

.menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 15px;
    font-family: "M PLUS Rounded 1c", sans-serif;
}

.menu-content {
    display: flex;
    gap: 30px; 
    justify-content: flex-end; 
    align-items: center;
}

.top-menu {
    font-size: 14px;
}

.top-menu a:last-child {
    background-color: #0092E2;
    color: white;
    padding: 3px 20px;
    border-radius: 20px;
}

#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 999; /* Ensure it's above other content */
}

ul, li {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.question-button-wrapper {
    position: fixed;
    bottom: 20px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end; 
    pointer-events: none;
}

.question-button img {
    display: none;
}

.question-button button {
    font-family: "M PLUS Rounded 1c", sans-serif;
    writing-mode: vertical-rl;
    padding: 24px 16px;
    border-radius: 20px 0 0 20px;
    border: none;
    background-color: #0092E2;
    color: white;
    font-size: 24px; 
    cursor: pointer;
    text-align: center;
    width: 100%;
    pointer-events: auto;
}

.question-button button:hover {
    background-color: #005bb5;
}

.child-menu {
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
}

.child-menu ul {
    padding: calc(32 / var(--pc));
    border-radius: calc(12 / var(--pc));
    background: #FFF;
    text-align: left;
    box-shadow: 2px 2px 12px 0px rgba(0, 0, 0, .05);
    margin-top: calc(20 / var(--pc));
}

.child-menu li {
    margin-bottom: calc(15 / var(--pc));
}

.child-menu li:last-child {
    margin-bottom: 0;
}

.child-menu li a {
    color: inherit;
    text-decoration: none;
}

.child-menu li:hover {
    color: rgba(140, 140, 140, 1);
}

.menu-content .menu-item {
    position: relative;
    display: inline-block;
    font-size: calc(14 / var(--pc));
    line-height: calc(22.4 / var(--pc));
}

.menu-item > a:hover::before,
.menu-item > a.active::before {
    display: block;
    content: "";
    height: calc(2 / var(--pc));
    width: 100%;
    background: rgba(255, 203, 0, 1);
    position: absolute;
    bottom: calc(-12 / var(--pc));
    animation: fade 0.3s ease-in-out forwards;
}


.menu-item:hover .child-menu {
    opacity: 1;
    visibility: visible;
}

.contact-btn a {
    background: rgba(27, 136, 203, 1);
    color: #FFF;
    padding: calc(13 / var(--pc)) calc(21 / var(--pc)) calc(13 / var(--pc)) calc(23 / var(--pc));
    border-radius: 50px;
    display: block;
    transition: .3s;
    font-weight: 500;
    font-size: calc(14 / var(--pc));
    line-height: calc(22.4 / var(--pc));
}

.contact-btn a:hover {
    background: rgba(42, 151, 218, 1);
}

.asterism-wrapper {
    display: flex!important;
    align-items: flex-start!important;
    flex-direction: row!important;
}

/* Mobile menu styles */
@media (max-width: 1080px) {
    .question-button button {
        display: none;
    }
    .question-button img {
        display: block;
        width: 10vw;
        cursor: pointer;
        pointer-events: auto;
    }
    .footer-nav{
        display: none;
    }
    .mobile-header {
        display: flex; 
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        width: 100%;
        z-index: 1001; 
        position: fixed;
        top: 0;
        left: 0;
        background-color: #FFFDF7; 
    }
    .mobile-header .logo img {
        width: 40vw;
        margin-left: 2vw;
        margin-top: 1vw;
    }

    .hamburger-menu {
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .hamburger-menu img {
        width: 10vw;
    }

    .footer-nav-sp{
        display: block;
    }
    #mobile-menu {
        letter-spacing: .06em;
        background-color: #FFFDF7;
        position: fixed;
        left: 0;
        width: 100%;
        z-index: 1000; /* Ensure it's above other content but below the header */
        display: none;
        overflow-y: auto; /* Allows scrolling if content exceeds the viewport */
        height: 100vh;
        padding-bottom: calc(140 / var(--sp));
    }
      
    .mobile-menu-items {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0vw 8.5vw 0vw 8.5vw;
        width: 100%;
    }
    .mobile-menu-item-wrapper {
        width: 100%;
        border-bottom: 1px solid rgba(226, 222, 208, 1);
    }

    /* Update menu links */
    .mobile-menu-item-wrapper > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;

        font-size: calc(16 / var(--sp));
        line-height: calc(25.6 / var(--sp));
        padding-bottom: calc(12 / var(--pc));
        padding: calc(18 / var(--sp)) 0;
        text-align: left;
        letter-spacing: .06em;
        font-weight: 500;
        margin-top: 0;
        font-family: "M PLUS Rounded 1c", sans-serif;
    }

    .mobile-menu-item-wrapper > a img {
        width: 4.2vw;
    }

    .child-menu-mobile {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.6s ease;
    }
    
    .child-menu-mobile.open {
        max-height: 500px; /* Adjust this value if needed */
    }
      
    .child-menu-mobile ul {
        padding: calc(10 / var(--sp)) 0 calc(24 / var(--sp)) 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        margin-top: 0;
    }

    .child-menu-mobile li {
        margin: 0 0 calc(20 / var(--sp)) 0;
        border-bottom: none;
        padding: 0;
    }
    .child-menu-mobile li:last-child {
        margin-bottom: 0;
    }

    .child-menu-mobile li > a {
        line-height: calc(22.08 / var(--sp));
        display: block;
        width: 100%;
        font-size: calc(14 / var(--sp));
        padding-top: 0;
        font-weight: 400;
    }

    /* Hide desktop header on mobile */
    .desktop-header {
        display: none;
    }
    #mobile-menu-footer{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 5vw;
    }
    #mobile-menu-footer a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 3vw 0; /* Reduce padding for a more compact menu */
        font-size: clamp(14px, 16px, 9999px);
        text-align: left;
        color: #333; /* Adjust text color */
    }

    #mobile-menu-footer a:nth-last-child(2),
	#mobile-menu-footer a:nth-last-child(1) {
		margin-top: 2vw;
		padding: 2vw 0;
		justify-content: center; /* Center the content horizontally */
		text-align: center;
	}

    #mobile-menu-footer a img {
        width: 6vw; /* Adjust icon size */
    }
    .logo-footer-sp{
        text-align: center;
        padding: 10vw 8.5vw 5vw 8.5vw;
    }
    .logo-footer-sp img{
        width: 52vw;
    }
    .site-footer{
        font-size: clamp(14px, 14px, 9999px);
    }
    .mobile-header.active {
        background: rgba(248, 241, 227, 1);
    }
    #mobile-menu.active {
        background: rgba(248, 241, 227, 1);
    }
    .mobile-header.active .logo {
        visibility: hidden;
        opacity: 0;
    }

    .question-button button {
        font-size: clamp(14px, 14px, 9999px);
        padding: 20px 8px;
        font-size: 16px;
        min-width: 10vw;
        width: 10vw;
		line-height: 30px;
    }

    .contact-sp {
        width: 100%;
        padding: 0 calc(16 / var(--sp));
        display: block;
        text-align: left;
        letter-spacing: .06em;
    }dl, dd {
        margin: 0;
        margin-block-end: 0;
    }dl dt {
        background: rgba(27, 136, 203, 1);
        border-radius: calc(16 / var(--sp)) calc(32 / var(--sp)) 0px 0px;
        color: #FFF;
        font-size: calc(13 / var(--sp));
        font-weight: 500;
        line-height: calc(26 / var(--sp));
        position: relative;
    }.contact-sp dl dt a {
        display: block;
        padding: calc(32 / var(--sp));
    }.contact-sp dl dt::after {
        content: "";
        width: calc(28 / var(--sp));
        height: calc(28 / var(--sp));
        background: url(../icons/btn-arrow4.png) no-repeat;
        background-size: cover;
        position: absolute;
        right: calc(32 / var(--sp));
        top: 50%;
        transform: translateY(-50%);
        -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
    }.contact-sp dl dd {
        background: #FFF;
        padding: calc(16 / var(--sp)) calc(32 / var(--sp)) calc(32 / var(--sp)) calc(32 / var(--sp));
        border-radius: calc(16 / var(--sp));
    }.contact-sp dl dd p {
        font-size: calc(13 / var(--sp));
        font-weight: 500;
        line-height: calc(26 / var(--sp));
        margin: 0;
    }.contact-sp dl dd ul li span {
        font-family: "M PLUS Rounded 1c", sans-serif;
        font-size: calc(11 / var(--sp));
        font-weight: 500;
        line-height: calc(13.2 / var(--sp));
        text-align: center;
        background: rgba(248, 241, 227, 1);
        border-radius: calc(30 / var(--sp));
        padding: calc(6 / var(--sp)) 0;
        width: calc(80 / var(--sp));
        display: inline-block;
        margin-right: calc(12 / var(--sp));
        color: rgba(23, 23, 23, 1);
    }.contact-sp dl dd ul {
        margin: calc(8 / var(--sp)) 0 calc(16 / var(--sp));
    }.contact-sp dl dd ul li {
        font-family: "Lexend", sans-serif;
        font-size: calc(22 / var(--sp));
        font-weight: 500;
        line-height: calc(28.8 / var(--sp));
        color: rgba(27, 136, 203, 1);
        margin-bottom: calc(8 / var(--sp));
    }.contact-sp dl dd p:last-of-type {
        font-size: calc(12 / var(--sp));
        line-height: calc(14.4 / var(--sp));
    }
}

.question-button-wrapper {
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.question-button-wrapper.fade-out {
  opacity: 0;
  pointer-events: none;
}
