/* 用途: 共通レイアウト（ヘッダー・フッター・メニュー・ローダー） - 全下層ページで共通 */
#header .header_menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 12.8rem;
}

#header .header_logo {
    width: 25%;
    padding: 0 3rem 0 6rem;
    border-right: 1px solid #4d6588;
}

#header .header_nav {
    display: flex;
    justify-content: flex-start;
    width: 70%;
    height: 100%;
    margin-top: 1.8rem;
    transition: transform .4s ease-in-out;
}

#header .gnav_a {
    width: 15%;
    height: 40%;
    margin: auto 0;
}

#header .header_nav_item {
    display: block;
    font-size: 2.2rem;
    letter-spacing: .05em;
    text-align: center;
    transition: opacity .3s ease-in-out;
}

#header .header_nav_item span {
    display: block;
    margin-top: .2rem;
    font-weight: 200;
    font-size: 1.6rem;
    letter-spacing: .1em;
}

#header .gnav li a {
    display: block;
    height: 2rem;
    line-height: 2rem;
    text-decoration: none;
}

#header .gnav li li {
    opacity: 0;
    position: relative;
    width: 200px;
    height: 0;
    overflow: hidden;
    box-shadow: 0 5px 5px rgba(0, 0, 0, .2);
    background: #ffffff;
    transition: opacity .5s;
}

#header .gnav li li a {
    border-top: 1px solid #eeeeee;
    font-size: 1.6rem;
}

#header .gnav li:hover > ul > li {
    opacity: 1;
    z-index: 110; /* ドロップダウン（ヘッダーより上） */
    height: 4rem;
    line-height: 4rem;
}

#header .gnav ul li a:hover, .gnav > li:hover > a {
    color: #0130a8;
}

#header .gnav > li li > a {
    height: 4rem;
    color: black;
    line-height: 4rem;
    text-align: center;
}

#header .header-btn:hover {
    opacity: .7;
}

/*
 * z-index スケール（下→上）
 * -1: 背面レイヤー  1–10: コンテンツ内  100: 固定ヘッダー
 * 200: circle-bg  210: menu_button_bg  220: #Menu-nav  300: MenuBtn
 * 500: #loader  1000: 全画面モーダル（Modaal / security-modal）
 */
/* ハンバーガーメニュー */
#header .MenuBtn {
    position: fixed;
    top: 10px; /* SVG と一致するように調整 */
    right: 10px; /* SVG と一致するように調整 */
    z-index: 300; /* ヘッダー内で最前面（ハンバーガーボタン） */
    width: 50px;
    height: 50px;
    cursor: pointer;
}

#header .MenuBtn span {
    display: inline-block;
    position: absolute;
    left: 3px;
    width: 80%;
    height: 3px;
    border-radius: 2px;
    background-color: #ffffff;
    transition: all .4s;
}

#header .MenuBtn span:nth-of-type(1) {
    top: 15px;
}

#header .MenuBtn span:nth-of-type(2) {
    top: 23px;
}

#header .MenuBtn span:nth-of-type(3) {
    top: 31px;
}

#header .MenuBtn.isOpen span:nth-of-type(1) {
    top: 18px;
    left: 10px;
    transform: translateY(6px) rotate(-45deg);
    width: 70%;
}

#header .MenuBtn.isOpen span:nth-of-type(2) {
    opacity: 0;
}

#header .MenuBtn.isOpen span:nth-of-type(3) {
    top: 30px;
    left: 10px;
    transform: translateY(-6px) rotate(45deg);
    width: 70%;
}

#header .menu_button_bg {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 210; /* MenuBtn より下・circle-bg より上（ハンバーガー背景SVG） */
    width: 26rem;

    pointer-events: none;
}

#header .menu_button_bg._pc {
    width: 26rem; /* デスクトップ用のサイズ */
}

#header .menu_button_bg._sp {
    width: 20rem; /* スマホ用のサイズ（調整が必要な場合） */
}

#header .menu_button_bg svg {
    fill: #30b5f2;
}


#header .circle-bg {
    position: fixed;
    bottom: -50px;
    left: -50px;
    z-index: 200; /* 開いたメニューの背面（展開する円） */
    transform: scale(0);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #245572;
    transition: all .9s;
}

#header .circle-bg.circleactive {
    transform: scale(50);
}

/* ハンバーガーメニューの中身 */
#Menu-nav #Menu-list {
    display: none;
    position: fixed;
    top: 15%;
    z-index: 220; /* 開いたメニューパネル（MenuBtn より下） */
    width: 100%;
    height: 100vh;
    overflow: auto;

    -webkit-overflow-scrolling: touch;
}

#Menu-nav.panelactive #Menu-list {
    display: block;
}

#Menu-nav ul {
    opacity: 0;
    z-index: 220;
}

#Menu-nav.panelactive ul {
    opacity: 1;
}

#Menu-nav.panelactive ul li {
    opacity: 0;
    color: #ffffff;
    font-weight: bold;
    font-size: 2.7rem;
    display: grid;
    text-align: center;
    animation-name: gnaviAnime;
    animation-duration: 1s;
    animation-delay: .3s;
    animation-fill-mode: forwards;
}

@keyframes gnaviAnime {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#Menu-nav .Menu-block {
    display: flex;
    justify-content: space-around;
    width: 70%;
    margin: 0 auto;
    padding-bottom: 20px;
    border-bottom: 1px solid #cccccc;
}

#Menu-nav .Menu-block-service {
    width: 50%;
    margin: 0 auto;
    padding-top: 20px;
}

#Menu-nav .Menu-block ul {
    padding: 0;
}

#Menu-nav .Menu-block1, #Menu-nav .Menu-block2, #Menu-nav .Menu-block3 {
    padding-left: 20px;
}

#Menu-nav .Menu-main {
    padding-bottom: 20px;
}

#Menu-nav .Menu-wrap {
    padding-left: 20px;
}

#Menu-nav .Menu-wrap li {
    margin: 5px 0;
}

#Menu-nav .Menu-wrap a {
    color: #ffffff;
    text-decoration: none;
    transition: color .3s;
}

#Menu-nav .Menu-wrap a:hover {
    color: #007bff;
}

#Menu-nav .Service-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#Menu-nav .Service-wrap ul {
    width: 33%;
    padding-left: 0;
}

#Menu-nav ._sp {
    display: none;
}

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

    ._sp {
        display: block !important;
    }

    #header {
        position: fixed;
        top: 0;
        z-index: 100; /* 固定ヘッダー */
        width: 100%;
        background: white;
    }

    #header .header_log {
        width: 70%;
        max-width: 350px;
        padding-left: 2rem;
    }

    #header .header_logo {
        width: 70%;
        max-width: 425px;
        padding: 0 0rem 0 2rem;
        border-right: 0 solid ;
    }


    #header .MenuBtn {
        top: 8px; /* SVG と一致するように調整 */
        right: 8px; /* SVG と一致するように調整 */
        width: 40px;
        height: 40px;
    }

    #header .MenuBtn span {
        height: 2px;
    }

    #header .MenuBtn span:nth-of-type(1) {
        top: 12px;
    }

    #header .MenuBtn span:nth-of-type(2) {
        top: 19px;
    }

    #header .MenuBtn span:nth-of-type(3) {
        top: 26px;
    }

    #Menu-nav .Menu-main {
        padding-bottom: 5px;
        color: #ffffff;
        font-size: 2rem;
    }

    #Menu-nav .Menu-block {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    #Menu-nav.panelactive ul li {
        text-align: left;
    }

    #header .Service-wrap {
        display: block;
    }
}

/* アコーディオンメニュー */
#header .Menu-block nav {
    display: none;
}

#header .nav-open {
    opacity: 0;
    position: relative;
    padding: 0;
    color: #ffff;
    text-align: start;
    text-indent: 1.5rem;
    animation-name: gnaviAnime;
    animation-duration: 1s;
    animation-delay: .3s;
    animation-fill-mode: forwards;
}

#header .nav-open::before {
    display: block;
    position: absolute;
    top: 0;
    bottom: 15%;
    left: 0;
            transform: rotate(135deg);
    width: 8px;
    height: 8px;
    margin: auto;
    border-top: #ffffff 2px solid;
    border-right: #ffffff 2px solid;
    content: "";

    -webkit-transform: rotate(135deg);
        -ms-transform: rotate(135deg);
}

#header .nav-open.active::before {
    display: block;
    position: absolute;
    top: 7%;
    bottom: 0;
    left: 0;
            transform: rotate(-45deg);
    width: 8px;
    height: 8px;
    margin: auto;
    border-top: #ffffff 2px solid;
    border-right: #ffffff 2px solid;
    content: "";

    -webkit-transform: rotate(-45deg);
        -ms-transform: rotate(-45deg);
}

#header .Service-wrap {
    gap: 0rem;
}

#header .Menu-wrap nav {
    display: none;
}

#header .for-ip {
    display: none;
}

#header .Service-wrap .Menu-wrap {
    width: 30%;
}

#header .Menu-block ul {
    width: 100%;
}

@media (min-width: 769px) and (max-width: 820px) {
    ._pc {
        display: none !important;
    }

    ._sp {
        display: block !important;
    }

    ._tablet_on {
        display: block !important;
    }

    ._tablet_off {
        display: none !important;
    }

    #header .header_log {
        padding-left: 2rem;
    }
}


/* フッター */
footer {
    position: relative;
    left: 25%;
    width: 75%;
    height: 100%;
    padding-top: 40px;
    background: #245572;
    color: #ffffff;
}

#footer .footer-top {
    background-image: url("../img/footer/bg.png");
    background-position: center;
    background-size: 60%;
    background-repeat: no-repeat;
}

#footer .footer-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 60px 0;
}

#footer .footer-top h1 {
    font-size: 4.8rem;
    line-height: 1.35;
    letter-spacing: .04em;
    text-align: right;
}

#footer .footer-top ul {
    list-style: none;
    padding: 0;
}

#footer .footer-top li {
    margin-bottom: 18px;
}

#footer .footer-top li:last-child {
    margin-bottom: 0;
}

#footer .footer-top a {
    position: relative;
    padding: 17px 30px;
    border-left: 5px solid #ffffff;
    color: #ffffff;
    font-size: 3rem;
    text-decoration: none;
    transition: color .3s;
}

#footer .footer-top a:after {
    position: absolute;
    top: 43%;
    left: 95%;
    transform: rotate(-45deg);
    width: 13px;
    height: 13px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    content: "";
    transition: border-color .4s ease-in-out;
}

#footer .footer-top a:hover {
    color: #007bff;
}

#footer .footer-top a:hover:after {
    border-color: #007bff;
}

#footer .footer-bottom {
    text-align: center;
}

#footer small {
    display: block;
    padding: 20px;
    color: #ffffff;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 820px) {
    #footer {
        left: 0;
        width: 100%;
        height: auto;
        padding-top: 0;
    }

    #footer .footer-inner {
        flex-direction: column;
        max-width: auto;
        margin: 0;
        padding: 60px 0;
    }

    #footer .footer-top {
        background-position: center 40%;
        background-size: 90%;
    }

    #footer .footer-top h1 {
        margin-bottom: 20px;
        font-size: 3.0rem;
        text-align: center;
    }

    #footer .footer-top ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }



    #footer .footer-top a {
        padding: 10px 20px;
        border-left: 0 solid #ffffff;
        font-size: 1.8rem;
    }

    #footer .footer-top a::before {
        position: absolute;
        top: 95%;
        width: 140px;
        border-bottom: 1px solid #ffffff;
        content: "";
    }

    #footer .footer-top a::after {
        position: absolute;
        top: 85%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 10px solid transparent;
        border-right: 0 solid #ffffff;
        border-bottom: 0 solid transparent;
        border-left: 8px solid #ffffff;
        content: "";
    }

    #footer .footer-top a:hover:after {
        position: absolute;
        top: 85%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-top: 10px solid transparent;
        border-right: 0 solid #ffffff;
        border-bottom: 0 solid transparent;
        border-left: 8px solid #ffffff;
        content: "";
    }

    #footer .footer-top span {
        width: 25px;
        height: 25px;
    }
}


/* トップへ戻る */
#pagetop {
    opacity: 0;
    position: fixed;
    right: 40px;
    bottom: 35px;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background-color: #30b5f2;
    transition: .3s;
}

#pagetop .page-top::before {
    position: absolute;
    top: 17px;
    right: 49%;
    transform: rotate(-45deg);
    width: 18px;
    height: 18px;
    border: .15em solid currentColor;
    border-bottom: 0;
    border-left: 0;
    box-sizing: border-box;
    color: #ffffff;
    content: "";

    transform-origin: top right;
}

.pagetop:hover {
    transform: scale(1.05);
}

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



/* 下層ページ 共有（utilities の .pl-0 等より優先） */
main.sub-main,
.sub-main {
    position: relative;
    width: 85%;
    height: 100%;
    padding-top: 12rem; /* 固定ヘッダー（10rem）より下に表示 */
    padding-left: 25% !important;
}

.main-inner {
    border-left: 1px solid #4d6588;
}

.relative {
    position: relative;
}

.sv-inner h2 {
    padding: 30px;
    font-weight: bold;
    font-size: 3.6rem;
    letter-spacing: .06em;
    line-height: 1.4;
}

.sv-inner .sub-title {
    font-weight: bold;
    font-size: 3.6rem;
    letter-spacing: .06em;
    line-height: 1.4;
}

.sv-inner .sub {
    position: absolute;
    left: -40px;
    height: max-content;
    padding-top: 0;
    font-size: 1.6rem;

    -ms-writing-mode: tb-rl;
        writing-mode: vertical-rl;
}

.border-l {
    border-left: 3px solid #0130a8;
}

.border-r {
    border-right: 3px solid #0130a8;
}

/* スマホサイズ用スタイル */
@media (max-width: 820px) {
    main.sub-main,
    .sub-main {
        width: 90%;
        margin: 0 auto;
        padding-top: 130px;
        padding-top: 70px;
        padding-left: 0 !important;
    }

    .sv-inner h2 {
        padding: 15px 30px;
        font-size: 2.6rem;
        line-height: 1.45;
    }

    .sv-inner .sub {
        left: -4%;
        padding-left: 0;
    }
}

@media (max-width: 767px) {
    .sv-inner .sub {
        left: -6%;
        padding-left: 0;
    }
}

/* 文字のアニメーション設定 */
/* 全共通 */
.slide-in {
    display: inline-block;
    overflow: hidden;
}
.slide-in_inner {
    display: inline-block;
}

/* アニメーション用の初期設定 */
.leftAnime, .bgappearTrigger, .bgLRextendTrigger {
    opacity: 0; /* スクロールで表示させる要素を事前に透過0にして非表示 */
}

/* 左から右にスライドインするアニメーション */
.slideAnimeLeftRight {
    animation: slideTextX100 1s forwards;
}

@keyframes slideTextX100 {
    from {
        opacity: 0;
        transform: translateX(-100%); /* 要素を左の枠外に移動 */
    }
    to {
        opacity: 1;
        transform: translateX(0); /* 元の位置に移動 */
        overflow: visible;
    }
}

/* 右から左にスライドインするアニメーション */
.slideAnimeRightLeft {
    animation: slideTextXNeg100 1s forwards;
}

@keyframes slideTextXNeg100 {
    from {
        opacity: 0;
        transform: translateX(100%); /* 要素を右の枠外に移動 */
    }
    to {
        opacity: 1;
        transform: translateX(0); /* 元の位置に移動 */
        overflow: visible;
    }
}

/* 背景色が拡張するアニメーション */
.bgextend {
    opacity: 0;
    position: relative;
    overflow: hidden; /* はみ出た色要素を隠す */
    animation: bgExtendBase 1s forwards;
}

@keyframes bgExtendBase {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 内部の要素がフェードインするアニメーション */
.bgappear {
    opacity: 0;
    animation: bgExtendSecond 1s .6s forwards;
}

@keyframes bgExtendSecond {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 背景色が左から右に拡張して消えるアニメーション */
.bgLRextend::before {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #666666; /* 背景色の設定 */
    content: "";
    animation: bgLRextendAnimation 1s forwards;
}

@keyframes bgLRextendAnimation {
    0% {
        transform: scaleX(0);

        transform-origin: left;
    }
    50% {
        transform: scaleX(1);

        transform-origin: left;
    }
    50.001% {
        transform-origin: right;
    }
    100% {
        transform: scaleX(0);

        transform-origin: right;
    }
}



#header .header_menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    z-index: 100; /* 固定ヘッダー */
    width: 100%;
    height: 10rem;
    background-color: #ffffff;
}

@media (max-width: 820px) {
    #header .header_menu {
        height: 7rem;
    }
}


/* ロード画面のスタイル */
#loader {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 500; /* ローダー（モーダルより下） */
    width: 100%;
    height: 100%;
    background-color: #ffffff;
}
