footer {
    opacity: .85;
    /* background-color: #868b92; */
    /* color: #ffffff; */
    font-size: 1.6rem;
    line-height: 1.6;
    /* font-family: biz-udgothic, sans-serif; */
    font-family: "dnp-shuei-gothic-kin-std", sans-serif;
}

#footer .footer-wrapper{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    padding: 60px 5%;
    background: linear-gradient(90deg, rgb(203, 227, 238) 0%, rgb(204, 234, 247) 26.92%, rgb(242, 243, 190) 72.41%, rgb(230, 230, 178) 94.83%);
    /* gap: 25%; */
    align-items: flex-start;
}

#footer .left,
#footer .right {
    width: 45%;
}

#footer .left h2 {
    display: block;
    width: fit-content;
    /* margin-bottom: 10px; */
    padding: 10px 0px;
    border-radius: 5px;
    /* background-color: #21a4dc; */
    font-weight: bold;
    font-size: 3rem;
    line-height: 1;
    /* font-family: toppan-bunkyu-midashi-go-std, sans-serif; */
    font-family: "dnp-shuei-gothic-kin-std", sans-serif;}

#footer .contact-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: fit-content;
    height: fit-content;
    margin-top: 50px;
    padding: 30px 55px;
    overflow: hidden;
    border-radius: 120px;
    background-color: #ffffff;
    color: #222222;
    font-size: 2.18rem;
    transition: background-color .3s ease, transform .3s ease;
}

#footer .contact-link .arrow {
    display: inline-block;
    position: relative;
    z-index: 2;
    width: 80px;
    height: 8px;
    margin-left: 15px;
}

/* フッター背景に馴染む青の下敷き（sec05 と transition 統一） */
#footer .contact-link .arrow::before {
    position: absolute;
    top: -4px;
    left: -10px;
    z-index: 1;
    width: 80px;
    height: 15px;
    background: #ffffff;
    content: "";
    transition: width .45s cubic-bezier(.4, 0, .2, 1),
    opacity .45s cubic-bezier(.4, 0, .2, 1);
}

#footer .contact-link .arrow::after {
    position: absolute;
    top: 50%;
    left: 3px;
    z-index: 3;
    transform: translateY(-50%);
    width: 75px;
    height: 1px;
    background-color: #222222;
    content: "";
    transition: width .45s cubic-bezier(.4, 0, .2, 1),
    background-color .45s cubic-bezier(.4, 0, .2, 1);
}

#footer .contact-link .triangle {
    position: absolute;
    top: 50%;
    right: 9%;
    z-index: 4;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #222222;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1),
    border-left-color .45s cubic-bezier(.4, 0, .2, 1);
}

#footer .contact-circle {
    position: absolute;
    top: 53%;
    right: 3%;
    transform: translateY(-50%);
    width: 15%;
    aspect-ratio: 1 / 1;
    pointer-events: none;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

#footer .contact-circle svg {
    width: 100%;
    height: 100%;
    animation: contact-spin 15s linear infinite;
}

#footer .contact-circle text {
    font-weight: 700;
    font-size: 8.5px;
    letter-spacing: 1.1px;
    fill: #222222;
}

@keyframes contact-spin {
    to {
        transform: rotate(360deg);
    }
}

#footer ul.location {
    max-width: 700px;
    padding: 0;
    border-radius: 10px;
}

#footer ul.location li.item {
    margin-bottom: 10px;
    overflow: hidden;
    border-bottom: 1px solid #868b92;
    transition: background-color .3s ease;
}

#footer ul.location li.item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

#footer ul.location .space {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    cursor: pointer;
    transition: background-color .3s ease;
}

#footer ul.location .space-title {
    font-weight: bold;
    font-size: 1.5rem;
}

#footer .toggle-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
    transition: transform .3s ease;
}

#footer .item:not(.active) .toggle-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" data-name=\"レイヤー 2\" viewBox=\"0 0 40.35 40.35\"><g data-name=\"Layer 1\"><circle cx=\"20.17\" cy=\"20.17\" r=\"20.17\" style=\"fill:%2321a4dc\"/><path d=\"m9.83 27.48 15.42-10.89\" style=\"fill:none;stroke:%23fff;stroke-miterlimit:10\"/><path d=\"m26.76 21.02 3.76-8.15-8.94.81z\" style=\"fill:%23fff\"/></g></svg>");
}

#footer .item.active .toggle-icon {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" data-name=\"レイヤー 2\" viewBox=\"0 0 40.35 40.35\"><g data-name=\"Layer 1\"><circle cx=\"20.17\" cy=\"20.17\" r=\"20.17\" style=\"fill:%23edea39\"/><path d=\"m9.83 27.48 15.42-10.89\" style=\"fill:none;stroke:%234d6d90;stroke-miterlimit:10\"/><path d=\"m26.76 21.02 3.76-8.15-8.94.81z\" style=\"fill:%234d6d90\"/></g></svg>");
}

#footer ul.location .address {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-5px);
    max-height: 0;
    padding: 0 20px 15px 50px;
    overflow: hidden;
    font-size: 1.5rem ;
    line-height: 1.5;
    transition: opacity .5s ease, transform .5s ease, max-height .5s ease;

    gap: 5px;
    pointer-events: none;
}

#footer ul.location li.item.active .address {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;

    pointer-events: auto;
}

#footer ul.location .address span {
    font-size: 1.5rem ;
}

/* パソコンサイズではJavaScriptで制御するため、:hoverは無効化 */
@media (min-width: 1026px) {
    #footer ul.location li.item:hover:not(.active) .address {
        opacity: 0;
        transform: translateY(-5px);
        max-height: 0;
        pointer-events: none;
    }
}

#footer .under.footer-menu {
    position: relative;
    z-index: 1;
    padding: 30px 5%;
    border-top: 1px solid #868b92;
    background-color: #868b92;
}

#footer .footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin-left: 0;
    padding: 0;

    gap: 25px;
}

#footer .footer-nav-item {
    font-size: 1.5rem;
            color: #ffffff;
    transition: color .3s ease, opacity .3s ease;
}

#footer .copyright {
    padding: 25px 5%;
            color: #ffffff;
    background-color: #21a3dc;
}

#footer .copyright small {
    font-size: 1.3rem;
}

@media (min-width: 1026px) {
    #footer .footer-wrapper::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 1px;
        background-color: #868b92;
        content: "";
    }

    #footer .contact-link:hover {
        transform: translateY(-6px);
    }

    #footer .contact-link:hover .arrow::before {
        opacity: .8;
    }

    #footer .contact-link:hover .contact-circle {
                transform: translateY(-50%);
    }
}

/* Tablet (768〜1025px) - PCサイズに合わせたバランス */
@media (max-width: 1025px) and (min-width: 768px) {
    #footer .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 50px 8%;
        gap: 35px;
    }

    #footer .footer-wrapper::before {
        display: none;
    }

    #footer .left h2 {
        padding: 8px 12px;
        font-size: 2.2rem;
    }

    #footer .contact-link {
        padding: 25px 45px;
        font-size: 2rem;
        margin-top: 26px;
    }

    #footer .left,
    #footer .right {
        width: 100%;
    }

    #footer .contact-circle {
        right: 7%;
        width: 45px;
        height: 45px;
    }

    /* タブレットではお問い合わせボタンの青い下敷きを非表示 */
    #footer .contact-link .arrow::before {
        display: none;
    }

    #footer ul.location {
        max-width: 100%;
    }

    #footer ul.location .space-title {
        font-size: 1.6rem;
    }

    #footer ul.location .address {
        font-size: 1.5rem;
    }

    #footer .footer-nav {
        flex-wrap: wrap;
        gap: 18px;
    }

    #footer .footer-nav-item {
        font-size: 1.5rem;
    }

    #footer ul.location li.item:hover:not(.active) .address {
        opacity: 0;
        transform: translateY(-5px);
        max-height: 0;
        pointer-events: none;
    }
}

/* Mobile (〜767px) - PCサイズに合わせたバランス */
@media (max-width: 767px) {
    #footer .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 5%;
        gap: 28px;
    }

    #footer .left,
#footer .right {
    width: 100%;
}


    #footer .left h2 {
        padding: 8px 10px;
        font-size: 1.8rem;
        width: 100%;
    }

    #footer .contact-link {
        margin-top: 22px;
        padding: 22px 35px;
        font-size: 1.7rem;
    }

    #footer .contact-link .arrow {
        width: 40px;
        height: 4px;
        margin-left: 70px;
    }

    /* スマホではお問い合わせボタンの青い下敷きを非表示 */
    #footer .contact-link .arrow::before {
        display: none;
    }

    #footer .contact-link .arrow::after {
        width: 50px;
        left: -20px;
    }

    #footer .contact-link .triangle {
        right: 12%;
    }

    #footer .contact-circle {
        right: 3%;
        width: 70px;
        height: auto;
    }

    #footer ul.location .space {
        padding: 14px 16px;
    }

    #footer ul.location .space-title {
        font-size: 1.5rem;
    }

    #footer ul.location .address {
        padding: 0 16px 12px 40px;
        font-size: 1.4rem;
    }

    #footer .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    #footer .footer-nav-item {
        font-size: 1.4rem;
    }

    #footer .under.footer-menu {
        padding: 24px 5%;
    }

    #footer .copyright {
        padding: 20px 5%;
    }

    #footer .copyright small {
        font-size: 1.3rem;
    }
}

/* トップへ戻る */
#pagetop {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    position: fixed;
    right: 40px;
    bottom: 35px;
    z-index: 999;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: .3s;
}

#pagetop .page-top {
    position: relative;
    width: 100%;
    height: 100%;
}

#pagetop .page-top::before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    transform: translate(-50%, -50%);
    width: 100%;
    border-radius: 50%;
    background-color: #21a3dc;
    content: "";
    transition: all .45s cubic-bezier(.4, 0, .2, 1);

    aspect-ratio: 1 / 1;
    pointer-events: none;
}

/* 矢印（既存） */
#pagetop .circle-arrow {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
}

#pagetop .circle-arrow .arrow-triangle {
    width: 0;
    height: 0;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #ffffff;
    border-left: 6px solid transparent;
    transition: border-bottom-color .45s cubic-bezier(.4, 0, .2, 1);
}

#pagetop .circle-arrow .arrow-line {
    width: 2px;
    height: 22px;
    background-color: #ffffff;
    transition: background-color .45s cubic-bezier(.4, 0, .2, 1);
}

/* 円周SVG */
#pagetop .pagetop-text {
    position: relative;
    z-index: 1;
    width: 115%;
    height: 115%;
    margin-top: -8%;
    margin-left: -8%;
    animation: rotate-circle 15s linear infinite;
    pointer-events: none;
}

/* 円周文字 */
#pagetop .pagetop-circle-text {
    font-weight: 700;
    font-size: 8px;
    letter-spacing: .28em;

    fill: #222222;
}

/* hover */
#pagetop:hover .page-top::before {
    background-color: #edea39;
}

#pagetop:hover .circle-arrow .arrow-line {
    background-color: #222222;
}

#pagetop:hover .circle-arrow .arrow-triangle {
    border-bottom-color: #222222;
}

#pagetop:hover .pagetop-circle-text {
    fill: #222222;
}

/* 回転 */
@keyframes rotate-circle {
    from {
        transform: scale(1.4) rotate(0deg);
    }
    to {
        transform: scale(1.4) rotate(360deg);
    }
}

@media (max-width: 820px) {
    #pagetop {
        display: none !important;
    }
}
