/* 全体レイアウト */

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', 'Segoe UI', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}

main.page-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2em 1em;
}

.page-container p {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    max-width: 1100px;
    margin: 1.5em auto;
    padding: 0 1em;
    text-align: left;
    font-weight: bold;
}

.page-container {
    list-style: none;
    padding-left: 0;
    margin: 2em 0;
    height: 100%;
    min-height: calc(100vh - 100px);
}

.page-container li {
    margin-bottom: 0.8em;
    padding-left: 1.5em;
    position: relative;
    line-height: 1.6;
    background-color: #ffffff;
    padding: 0.8em 1em;
    border-radius: 8px;
    margin-bottom: 1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

ul {
    list-style: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/*ヘッダー*/

.submenu.row-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1em;
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.submenu.row-5 li {
    padding: 0.5em 0;
    text-align: center;
}

.submenu-group {
    margin-bottom: 2em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #ffffff;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1em;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-right: auto;
}

.logo-block a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1em;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-texts {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #f28c28;
    font-family: 'Anton', sans-serif;
    letter-spacing: 0.07em;
    text-decoration: none;
}

.logo-sub {
    font-size: 0.8em;
    color: #666;
}

.main-nav {
    display: flex;
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.2em;
    margin: 0;
    padding: 0;
    position: relative;
    justify-content: flex-end;
}

.main-nav .has-submenu {
    position: relative;
}

.has-submenu:hover .submenu-wrapper {
    display: block;
    opacity: 1;
    visibility: visible;
}

.submenu {
    display: block;
    gap: 2em;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.smartphone-menu-toggle {
    display: none;
}

.smartphone-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.smartphone-menu-overlay.active {
    display: block;
}

body.no-scroll {
    overflow: hidden;
    position: relative;
}

.mega-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    z-index: 1000;
    min-width: 800px;
    max-width: 95vw;
    width: auto;
    box-sizing: border-box;
}

.submenu-column {
    flex: 1;
    min-width: 200px;
    padding: 0 1em;
}

.submenu a {
    display: block;
    padding: 0.3em 0;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: 0.3s;
}

.submenu li {
    flex: 0 0 200px;
    margin-bottom: 1em;
    padding: 0.5em 1em;
    border: none;
}

.submenu a:hover {
    color: #0070c0;
    text-decoration: underline;
}


.submenu-wrapper {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1300px;
    max-width: 95vw;
    z-index: 1000;
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    display: none;
    display: flex;
    gap: 2em;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.has-submenu {
    position: relative;
    margin-right: 0.5em;
}

.submenu li {
    margin-bottom: 0.5em;
}

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

.smartphone-menu-heading {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 0.5em;
    display: block;
    color: #0070c0;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #0070c0;
}

.top-bar {
    color: #fff;
    font-size: 14px;
    padding: 0.5em 0;
}

.top-bar-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1em;
    text-align: right;
}

.top-bar a {
    color: #333;
    text-decoration: none;
    font-weight: normal;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* 見出し、テキストレイアウト */

h1,
h2,
h3,
h4 {
    font-weight: bold;
    color: #333;
    margin: 1em 0 0.5em;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

p {
    margin-bottom: 1em;
}

/* ボタンレイアウト */

.btn {
    display: inline-block;
    padding: 0.6em 1.2em;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    background-color: #0070c0;
    color: #fff;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #005a9c;
}

/* 共通見出しレイアウト */

.heading-wrap {
    width: 100%;
    margin: 0 auto 2em;
    padding: 2em 1em;
    background: linear-gradient(to right, #a7a9ff 0%, #22d3ee 100%);
    color: #000;
    text-align: center;
    border-radius: 0 0 50px 50px;
}

.heading-wrap h1 {
    font-size: 32px;
    margin: 0;
}

.section-heading {
    background: linear-gradient(to right, #004a8f, #2a9d8f);
    padding: 1em 2em;
    color: white;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    border-radius: 40px;
    display: inline-block;
    margin: 0.5em;
}

.section-heading h3 {
    font-size: 28px;
    margin-bottom: 0.5em;
}

/* 汎用レイアウト */

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2em;
}

.mb-2 {
    margin-bottom: 2em;
}

/*フッター*/

.site-footer {
    background-color: #000000;
    color: #fff;
    padding: 3em 0;
    margin: 0;
    width: 100vw;
    text-align: center;
    border-top: 5px solid #ff9f51;
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo img {
    height: 80px;
    margin-bottom: 1em;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1em;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5em;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    color: #ccc;
}

.footer-phone a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}

/*メディアクエリ*/

@media screen and (max-width: 768px) {
    .heading-wrap {
        padding: 0.5em 1em;
    }

    .heading-wrap h2 {
        font-size: 1.4rem;
    }

    .section-heading {
        padding: 0.6em 1em;
        font-size: 1.4rem;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav-wrapper {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    /*body.menu-open {
        overflow: hidden;
        height: 100vh;
    }*/

    .smartphone-menu {
        width: 100vw;
        /* 画面全体に広げる */
        max-width: 480px;
        /* 広がりすぎ防止（タブレット用） */
        margin: 0 auto;
        border-left: 1px solid #ddd;
        box-sizing: border-box;
        flex-direction: column;
        align-items: center;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        background-color: #fff;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .smartphone-menu details ul {
        padding: 0;
        margin: 0.5em 0 1em;
    }

    .smartphone-menu details ul li {
        padding: 0.5em 0;
        text-align: left;
        padding-left: 2em;
        font-size: 16px;
        border: none;
    }

    .smartphone-menu summary {
        justify-content: space-between;
        cursor: pointer;
        list-style: none;
        padding: 0 1em;
    }



    .smartphone-menu .logo-block {
        margin: 1.2em 0 0.5em;
        padding-left: 1em;
    }

    /* メニュー展開時 */
    .smartphone-menu.open {
        transform: translateX(0);
    }


    /* ボタンのスタイル */
    .hamburger {
        display: block;
        position: absolute;
        top: 50%; 
        transform: translateY(-80%);
        right: 0;
        width: 30px;
        height: 30px;
        padding: 5px;
        border-radius: 6px;
        z-index: 10000;
    }

    .header-inner {
        display: flex;
        align-items: center;
        /* ← 子要素を垂直中央揃えに */
        position: relative;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #333;
        margin: 5px 0;
        transition: 0.4s;
    }

    .hamburger-close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.6em;
        z-index: 1001;
    }

    summary.accordion-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1em;
        background: #f8f8f8;
        cursor: pointer;
        font-size: 18px;
        font-weight: bold;
    }

    /* バツ印に変化するスタイル */
    .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);
    }

    /* メニューリストのスタイル */
    .smartphone-menu ul {
        list-style-type: none;
        width: 100%;
        padding: 0;
        margin-top: 80px;
    }

    .smartphone-menu li {
        padding: 1.2em 0;
        text-align: center;
        width: 100%;
    }

    .smartphone-menu li a {
        font-size: 18px;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        transition: background 0.3s;
        display: block;
        width: 100%;
    }

    .smartphone-menu>.mobile-nav-wrapper>ul>li {
        border-bottom: 1px solid #ddd;
    }

    .smartphone-menu details ul li {
        border-bottom: none;
    }

    .smartphone-menu details {
        width: 100%;
        padding: 1em 0;
        font-size: 18px;
        font-weight: 500;
        list-style: none;
    }

    .smartphone-menu summary::-webkit-details-marker {
        display: none;
    }

    .smartphone-menu summary {
        list-style: none;
        appearance: none;
        -webkit-appearance: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .smartphone-menu li a:hover {
        background-color: #f0f8ff;
        font-weight: bold;
        color: #0070c0;
    }

    .pc-nav {
        display: none;
    }

    .smartphone-menu details summary::after {
        content: "▶";
        float: right;
        font-size: 14px;
        transition: transform 0.3s;
    }

    .smartphone-menu>.mobile-nav-wrapper>ul>li:first-child {
        border-bottom: none;
    }

    .smartphone-menu details[open] summary::after {
        content: "▼";
        transform: rotate(90deg);
    }

    .smartphone-menu details ul li {
        padding: 0.7em 1.5em;
        border-bottom: 1px solid #eeeeee;
        font-size: 16px;
        color: #333;
    }

    .smartphone-menu {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    /* アニメーション（開閉） */
    .smartphone-menu details[open] ul {
        animation: slideDown 0.3s ease;
    }

    .smartphone-menu summary.details-summary {
        background-color: #5ea6ff;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 1em;
        margin: 0.5em 1em;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        cursor: pointer;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: background-color 0.2s, box-shadow 0.2s;
    }
}

@media (min-width: 769px) {
    nav.smartphone-menu {
        display: none;
    }
}

/* さらに小さいスマホ（幅480px以下） */
@media screen and (max-width: 480px) {
    .heading-wrap {
        padding: 0.4em 0.8em;
    }

    .heading-wrap h2 {
        font-size: 1.2rem;
    }

    .section-heading {
        padding: 0.5em 0.8em;
        font-size: 1.2rem;
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}