html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   アンカー遷移時のオフセット調整（固定ヘッダーに隠れない）
   ========================================================================== */
section[id] {
    scroll-margin-top: 180px;
    /* スマホ：波のヘッダー分の目安 */
}

/* ==========================================================================
   1. 共通設定・レイアウト
   ========================================================================== */
.firstview,
.contents,
.wave-logo {
    padding: 0 5%;
    box-sizing: border-box;
}

body {
    position: relative;
}

.arrow-r {
    position: relative;
    padding-right: 25px;
}

.arrow-r::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 3px solid #9AD37F;
    border-right: 3px solid #9AD37F;
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    right: 5px;
    margin-top: -5px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   2. ヘッダー：波・背景
   ========================================================================== */
.wave-wrapper {
    position: fixed;
    top: 0;
    width: 100%;
    height: 30vw;
    min-height: 200px;
    max-height: 180px;
    z-index: 100;
}

.wave-left,
.wave-right {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;
}

.wave-left {
    background-image: url("../svg/top_left_white.svg"), url("../svg/top_left_green.svg");
}

.wave-right {
    background-image: url("../svg/top_right.svg");
}

.wave-logo {
    position: absolute;
    top: 2.5vw;
    width: 35%;
    z-index: 120;
}

.wave-tel-pc {
    display: none;
}

/* ==========================================================================
   3. ヘッダー：スマホメニュー（ボタン・オーバーレイ）
   ========================================================================== */
.menu-btn {
    position: fixed;
    top: 2%;
    right: 15%;
    width: 10vw;
    height: 10vw;
    min-width: 40px;
    min-height: 65px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 130;
}

.menu-btn::after {
    content: "メニュー";
    position: absolute;
    bottom: 2%;
    left: 60%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 2.8vw;
    font-weight: bold;
    white-space: nowrap;
    transition: 0.3s;
    z-index: 10;
}

.menu-btn.open::after {
    content: "とじる";
    color: #fff;
    bottom: -15px;
}

.menu-btn span {
    display: block;
    position: absolute;
    left: 5px;
    width: 100%;
    height: 8%;
    background-color: #fff;
    border-radius: 10px;
    transition: 0.4s;
    z-index: 20;
}

.menu-btn span:nth-child(1) {
    top: 13%;
}

.menu-btn span:nth-child(2) {
    top: 33%;
}

.menu-btn span:nth-child(3) {
    top: 53%;
}

.menu-btn.open span:nth-child(1) {
    top: 43%;
    transform: rotate(-45deg);
}

.menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.menu-btn.open span:nth-child(3) {
    top: 43%;
    transform: rotate(45deg);
}

header nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    z-index: 90;
}

header nav.open {
    opacity: 1;
    visibility: visible;
}

header nav ul {
    list-style: none;
    padding-top: 350px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

header nav ul li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    font-size: 50px;
    width: 100%;
}

header nav ul li img {
    width: 100px;
    height: auto;
    object-fit: contain;
    margin-right: 60px;
    display: block;
}

header nav ul li.arrow-r {
    position: relative;
    width: 100%;
}

/* リンクタグを擬似要素で「矢印の場所」まで広げる */
header nav ul li.arrow-r a {
    position: relative;
    width: 100%;
    transition: all 0.3s ease;
}

header nav ul li.arrow-r a::before {
    content: "";
    position: absolute;
    inset: -10px -20% -10px -10px;
    z-index: 10;
}

header nav ul li.arrow-r::after {
    width: 30px;
    height: 30px;
    border-width: 6px;
    border-color: #9AD37F;
    right: 0;
    top: 50%;
    margin-top: -15px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 5;
}

/* ひとつの項目として連動させる */
header nav ul li.arrow-r:has(a:hover)::after {
    transform: rotate(45deg) scale(1.2);
}

header nav ul li.arrow-r a:hover {
    color: #79AD70;
}

/* ==========================================================================
   4. ファーストビュー
   ========================================================================== */
.firstview {
    position: relative;
    padding-top: 200px;
    margin-top: clamp(-220px, calc(-220px + 25vw), 20px);
    z-index: 2;
}

/* 背景装飾：擬似要素に持たせることで、セクションの底を突き抜けて下まで表示可能にする */
.firstview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2000px;
    background-image: url("../svg/haikei_blue.svg"), url("../svg/haikei_green.svg");
    background-repeat: no-repeat;
    background-position: left 220px, right 450px;
    background-size: 50%, 40%;
    z-index: -1;
    pointer-events: none;
}

.firstview_text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.firstview_trust {
    font-size: 120px;
    font-weight: bold;
    color: #79AD70;
    text-align: left;
    margin-bottom: 60px;
}

.firstview_message {
    align-self: flex-end;
    text-align: right;
    padding-left: 5%;
    font-size: 5vw;
    color: #79AD70;
    margin-bottom: 60px;
    line-height: 1.5;
}

.firstview_slideshow {
    width: 100%;
    height: clamp(300px, 60vh, 600px);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    z-index: 1;
}

.firstview_slideshow ul {
    position: relative;
    width: 100%;
    height: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.firstview_slideshow ul li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 1.5s ease-in-out, transform 0.0s 1.5s;
    transform: scale(1.0);
}

.firstview_slideshow ul li.now {
    opacity: 1;
    z-index: 3;
    transform: scale(1.08);
    transition: opacity 1.5s ease-in-out, transform 6.0s ease-out;
}

.firstview_slideshow ul li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   5. お問い合わせ共通 (Contact)
   ========================================================================== */
.tel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 80px auto;
    width: 100%;
}

.tel-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    padding: 0 150px;
}

.tel-number {
    font-size: clamp(28px, 7vw, 48px);
    font-weight: bold;
    letter-spacing: 0.05em;
    display: inline-block;
    transition: all 0.3s;
    white-space: nowrap;
    position: relative;
    padding-bottom: 5px;
}

.tel-link img.icon-tel {
    height: clamp(100px, 5vw, 300px);
    width: auto;
    position: absolute;
    left: 100px;
    top: 100%;
    transform: translateY(-40%) rotate(-5deg);
}

.tel-link img.icon-tori {
    height: 150px;
    width: auto;
    position: absolute;
    right: 20px;
    top: -10%;
}

.tel-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 70px;
    height: 120px;
    min-width: 300px;
    background-color: #DDEAEB;
    border-radius: 49% 51% 47% 53% / 47% 49% 51% 53%;
    font-size: clamp(20px, 4vw, 30px);
    margin: 30px auto 0;
}

.tel-link:hover .tel-number {
    opacity: 0.8;
    transform: scale(1.05);
    color: #79AD70;
}

.tel-number::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: #79AD70;
    transition: all 0.3s;
    transform: translateX(-50%);
    border-radius: 3px;
}

.tel-link:hover .tel-number::after {
    width: 100%;
}

/* ==========================================================================
   6. お問い合わせエリア（スマホナビ・フッター用）
   ========================================================================== */
.footer-tel .tel,
.nav-tel .tel {
    background-color: #79AD70;
    border-radius: 40px;
    padding: 30px 60px;
    margin: 40px auto;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-tel .tel {
    margin: 300px auto 40px;
    position: relative;
}

.nav-tel .tel::before {
    content: "";
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    background-image: url("../images/toiawase_tori.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: 1;
}

.footer-tel .tel:hover,
.nav-tel .tel:hover {
    background-color: #88bc7f;
    transform: scale(1.02);
    cursor: pointer;
}

.footer-tel .tel-text,
.nav-tel .tel-text {
    background-color: transparent;
    color: #fff;
    margin: 0 0 10px 0;
    padding: 0;
    height: auto;
    min-width: auto;
    font-size: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    isolation: isolate;
}

.footer-tel .tel-text::before,
.nav-tel .tel-text::before {
    content: "";
    display: block;
    width: 350px;
    height: 110px;
    background-image: url("../svg/ha.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    margin: -30px 0 -50px 0;
    position: relative;
    z-index: 1;
}

.footer-tel .tel-link,
.nav-tel .tel-link {
    text-decoration: none;
}

.footer-tel .tel-number,
.nav-tel .tel-number {
    color: #fff;
    font-size: 50px;
    padding-bottom: 0;
}

.footer-tel .tel-link:hover .tel-number,
.nav-tel .tel-link:hover .tel-number {
    opacity: 1;
    transform: none;
    color: #fff;
}

.footer-tel .tel-number::after,
.nav-tel .tel-number::after {
    display: none;
}

/* ==========================================================================
   7. セクション見出し (h2)
   ========================================================================== */
section {
    margin-bottom: 500px;
}

section h2 {
    display: flex;
    align-items: center;
    width: 100%;
}

section h2 .bg-svg {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 50vw;
    aspect-ratio: 3 / 1;
    margin-left: -5.3%;
    padding-left: 5.3%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
    white-space: nowrap;
}

section h2 .en {
    color: #fff;
    font-size: 5vw;
}

section h2 img {
    width: 5vw;
    padding-left: 10px;
}

section h2 .jp {
    flex-grow: 1;
    margin-left: -10vw;
    font-size: 5vw;
}

.news .bg-svg {
    background-image: url("../svg/Yellow.svg");
}

.clinichours .bg-svg {
    background-image: url("../svg/Yellowlong.svg");
}

.clinichours h2 .jp {
    margin-left: 1vw;
}

.about .bg-svg,
.access .bg-svg {
    background-image: url("../svg/green.svg");
}

.menu .bg-svg {
    background-image: url("../svg/deepgreen.svg");
}

/* ==========================================================================
   8. 各セクション詳細内容
   ========================================================================== */
/* --- News --- */
.news {
    position: relative;
}

.news h2 {
    margin-bottom: 100px;
}

.news::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1500px;
    background-image: url("../svg/haikei_Yellow.svg");
    background-repeat: no-repeat;
    background-position: right 180px;
    background-size: 75%;
    z-index: -1;
    pointer-events: none;
}

.news ul {
    list-style: none;
    padding: 0;
    max-width: 85%;
    margin: 0 auto;
}

.news li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 60px;
    padding-left: 0;
}

.news time {
    font-size: 3vw;
    margin-bottom: 10px;
}

.news li p:nth-of-type(1) {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    font-size: 5vw;
    line-height: 1.4;
    border-bottom: 2px dashed #ccc;
    padding-bottom: 12px;
    margin-bottom: 15px;
    padding-right: 180px;
    white-space: normal;
    cursor: pointer;
}

.news-btn {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 3vw;
    color: #79AD70;
    font-weight: bold;
}

/* プラスマーク：横棒 (ーとして残るベース部分) */
.news-btn::before {
    content: "";
    width: 18px;
    height: 4px;
    background-color: #79AD70;
    border-radius: 10px;
    display: block;
}

/* プラスマーク：縦棒 (＋の時だけ表示) */
.news-btn::after {
    content: "";
    width: 4px;
    height: 18px;
    background-color: #79AD70;
    border-radius: 10px;
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s;
}

/* 開いている時は縦棒を消す（記号の位置を変えずにーにする） */
.news li.open .news-btn::after {
    opacity: 0;
    transform: translateY(-50%) rotate(90deg);
}

/* お知らせ内容（2つ目のp）の初期状態：隠す */
.news li p:nth-of-type(2) {
    width: 90%;
    box-sizing: border-box;
    font-size: 3.5vw;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease-in-out;
    margin-top: 0;
    background-color: #E6F4E0;
    border-radius: 12px;
    padding: 0 20px;
}

/* 開いた状態：内容を表示 */
.news li.open p:nth-of-type(2) {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

/* --- About --- */
.about {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* はじめての方へ背景：左に青、右に緑 (位置を極限まで高く) */
.about::before {
    content: "";
    position: absolute;
    top: -1200px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 3000px;
    background-image: url("../svg/haikei_blue.svg"), url("../svg/haikei_green.svg");
    background-repeat: no-repeat;
    background-position: calc(0% - 100px) 1800px, calc(100% + 100px) center !important;
    background-size: 40% 600px, 55% 600px;
    z-index: -1;
    pointer-events: none;
}

/* 追加：あいさつ鳥のモバイル配置 */
.about_icon-tori {
    position: absolute;
    width: 150px;
    height: auto;
    z-index: 2;
    top: 1000px;
    right: 50%;
}

.about_text,
.about_img,
.about_menu {
    width: 100%;
}

.about_img {
    height: auto;
    border-radius: 12px;
}

.about_menu ul {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    list-style: none;
}

.about_menu li a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 40px;
    line-height: 1.5;
    margin-right: 40px;
    transition: all 0.3s ease;
}

.about_menu li a span {
    position: relative;
    display: inline-block;
    padding: 10px 0;
}

/* 下線：spanの幅に固定 */
.about_menu li a span::before {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #79AD70;
    transition: width 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

/* ホバー時に「spanの幅100%」分だけ伸ばす */
.about_menu li a:hover span::before {
    width: 100%;
}

/* 矢印 (::after) の配置を独立させる */
.about_menu li a::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 20px;
    border-top: 4px solid #9AD37F;
    border-right: 4px solid #9AD37F;
    transform: rotate(45deg);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* ホバー時の動き */
.about_menu li a:hover {
    color: #79AD70;
    transform: translateY(-2px);
}

.about_menu li a:hover::after {
    transform: rotate(45deg) scale(1.15);
}

/* --- Menu List --- */
.menu_list ul {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    margin: 40px 0;
    gap: 20px;
    list-style: none;
}

.menu_list ul li {
    min-width: 0;
}

.menu_list ul li:nth-child(1),
.menu_list ul li:nth-child(2),
.menu_list ul li:nth-child(6),
.menu_list ul li:nth-child(7) {
    grid-column: span 3;
}

.menu_list ul li:nth-child(3),
.menu_list ul li:nth-child(4),
.menu_list ul li:nth-child(5) {
    grid-column: span 2;
}

.menu_list ul li:nth-child(1) a,
.menu_list ul li:nth-child(2) a,
.menu_list ul li:nth-child(6) a,
.menu_list ul li:nth-child(7) a {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 170px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.menu_list ul li:nth-child(1) a img,
.menu_list ul li:nth-child(2) a img,
.menu_list ul li:nth-child(6) a img,
.menu_list ul li:nth-child(7) a img {
    flex-shrink: 0;
    height: 88px;
    max-width: 112px;
}

.menu_list ul li:nth-child(3) a,
.menu_list ul li:nth-child(4) a,
.menu_list ul li:nth-child(5) a {
    min-height: 210px;
    padding-top: 24px;
    padding-bottom: 20px;
}

.menu_list ul li:nth-child(3) a img,
.menu_list ul li:nth-child(4) a img,
.menu_list ul li:nth-child(5) a img {
    height: 92px;
    max-width: 110px;
}

.menu_list ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 20px 12px 16px;
    height: 100%;
    min-height: 180px;
    box-sizing: border-box;
    text-decoration: none;
    color: #333;
    font-size: 34px;
    white-space: normal;
    border: 5px dotted #79AD70;
    border-radius: 12px;
    background-color: #fff;
    transition: 0.3s;
}

.menu-card-label {
    display: block;
    text-align: center;
    line-height: 1.4;
}

.menu_list ul li a:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 10px #79AD70;
    color: #79AD70;
}

.menu_list ul li img {
    width: auto;
    height: 72px;
    max-width: min(100%, 110px);
    object-fit: contain;
}

.menu>p,
.about>p {
    font-size: 40px;
    line-height: 1.8;
    margin: 40px auto 60px;
}

/* --- Clinic Hours & Access --- */
.clinichours {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 診療時間背景：右に黄色 */
.clinichours::before {
    content: "";
    position: absolute;
    top: -700px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 2000px;
    background-image: url("../svg/haikei_Yellow.svg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 50%;
    z-index: -1;
    pointer-events: none;
}

.clinichours table {
    width: 100%;
    max-width: 900px;
    margin: 30px auto;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 30px;
    line-height: 3;
}

/* 診療時間の列 */
.clinichours table th:first-child,
.clinichours table td:first-child {
    width: 30%;
    word-break: break-all;
    padding: 10px 2px;
}

/* 曜日の列 (10% * 7 = 70%) */
.clinichours table th:not(:first-child),
.clinichours table td:not(:first-child) {
    width: 10%;
    padding: 10px 1px;
}

.clinichours th,
.clinichours td {
    border: 1px solid #000;
    text-align: center;
    vertical-align: middle;
    letter-spacing: -0.05em;
}

.clinichours .kittiri-tori {
    position: absolute;
    right: 20px;
    top: 0px;
    width: 100px;
    height: auto;
    z-index: 2;
}

.clinichours p {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 10px;
    text-align: left;
    font-size: 35px;
    line-height: 1.6;
}

.access {
    position: relative;
}

/* アクセス背景：左に青、右に緑 (最後の2枚) */
.access::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1800px;
    background-image: url("../svg/haikei_blue.svg"), url("../svg/haikei_green.svg");
    background-repeat: no-repeat;
    background-position: calc(0% - 100px) 200px, calc(100% + 100px) 0px !important;
    background-size: 35% 1200px, 55% 1000px;
    z-index: -1;
    pointer-events: none;
}

.access .map-wrapper {
    width: 80%;
    margin: 30px auto 20px;
    border-radius: 12px;
    overflow: hidden;
}

.access .map-wrapper iframe {
    width: 100%;
    height: 350px;
    border: none;
}

.access .genkina-tori {
    position: absolute;
    right: 40px;
    top: 20px;
    width: 150px;
    height: auto;
    z-index: 2;
}

.access-info {
    width: 80%;
    margin: 40px auto;
    font-size: 35px;
    line-height: 1.8;
}

.access-info p {
    margin-bottom: 30px;
    line-height: 1.8;
    padding-left: 5em;
    text-indent: -5em;
}

/* ==========================================================================
   9. フッター
   ========================================================================== */
.footer {
    position: relative;
    margin-top: 100px;
    padding: 20px 0 40px;
    z-index: 1;
}

/* ページトップに戻る (フローティング：ベースはモバイル用) */
.pagetop {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 80;
    margin: 0;
    text-align: center;
    font-size: 28px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 表示状態 */
.pagetop.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* コンテンツ下部（アクセスセクション終了、フッター直前）で静止 */
.pagetop.is-stopped {
    position: absolute;
    bottom: auto;
}

.pagetop a {
    text-decoration: none;
    color: #333;
    display: block;
    transition: transform 0.3s ease;
}

.pagetop a:hover {
    transform: translateY(-5px);
    color: #79AD70;
}

.pagetop img {
    width: 150px;
    height: auto;
    margin-bottom: 5px;
}

.footer-logo-area {
    padding: 0 5%;
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 40px 0 60px;
    gap: 10%;
}

.footer-logo {
    width: 35%;
    max-width: 250px;
    height: auto;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 60px;
    list-style: none;
}

.footer-nav a {
    text-decoration: none;
    color: #333;
    font-size: 40px;
    position: relative;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.footer-nav a:hover {
    color: #79AD70;
    transform: translateY(-2px);
}

.footer-nav a::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #79AD70;
    transition: width 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.footer-nav a:hover::before {
    width: 100%;
}

.footer-nav a:hover::after {
    transform: rotate(45deg) translate(3px, -3px);
}

.footer-nav .arrow-r::after {
    width: 30px;
    height: 30px;
    border-width: 6px;
    border-color: #9AD37F;
    right: 0;
    margin-top: -15px;
}

.copyright {
    text-align: center;
}

/* ==========================================================================
   10. メディアクエリ (1200px〜)
   ========================================================================== */
@media (min-width: 1200px) {
    section[id] {
        scroll-margin-top: 260px;
        /* PC：ヘッダーナビの高さ目安 */
    }

    .wave-left,
    .wave-right {
        background-size: 1024px;
    }

    .wave-left {
        background-position: top left;
    }

    .wave-right {
        background-position: top right;
    }

    .pagetop {
        right: 80px;
        bottom: 80px;
        font-size: 18px;
    }

    .pagetop img {
        width: 80px;
    }

    .wave-logo {
        top: 25px;
        width: 30vw;
        max-width: 400px;
        z-index: 20;
    }

    /* ==========================================================================
   3. ヘッダー：PC用電話番号（右上）
   ========================================================================== */
    .wave-tel-pc {
        position: absolute;
        top: -5px;
        right: -50px;
        z-index: 120;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .wave-tel-pc a {
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.3s ease;
    }

    .wave-tel-pc .tel-number-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #fff;
        font-size: clamp(16px, 1.3vw, 20px);
        text-align: center;
        white-space: nowrap;
        position: relative;
        z-index: 2;
        transition: all 0.3s ease;
        margin-top: 10px;
    }

    .wave-tel-pc .tel-number-text::before {
        content: "";
        display: block;
        width: 550px;
        height: 200px;
        background-image: url("../svg/ha.svg"), url("../images/toiawase_tori.png");
        background-repeat: no-repeat;
        background-size: 300px auto, 80px auto;
        background-position: 120px -10px, 10px 50px;
        margin: 0 0 -150px 0;
        position: relative;
        z-index: 1;
    }

    .wave-tel-pc .tel-number {
        color: #fff;
        font-size: clamp(16px, 1.8vw, 24px);
        display: inline-block;
        white-space: nowrap;
        margin-top: 10px;
        position: relative;
        padding-bottom: 0px;
        transition: all 0.3s ease;
    }

    .wave-tel-pc .tel-number::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 1px;
        background: #fff;
        transition: all 0.3s;
        transform: translateX(-50%);
        border-radius: 3px;
    }

    .wave-tel-pc a:hover .tel-number {
        transform: scale(1.05);
    }

    .wave-tel-pc a:hover .tel-number::after {
        width: 100%;
    }

    .menu-btn {
        display: none;
    }

    header nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        display: flex;
        align-items: flex-end;
        width: 100%;
        height: 260px;
        padding-bottom: 20px;
        background: transparent;
        opacity: 1;
        /* 重要：PC版では常に不透明 */
        visibility: visible;
        /* 重要：PC版では常に表示 */
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 5;
    }

    header nav.is-hide {
        transform: translateY(-100%);
    }

    header nav::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(5px);
        z-index: 1;
        border-radius: 0 0 25% 25%;
    }

    header nav ul {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-end;
        width: 100%;
        height: 100%;
        margin-top: 0;
        padding-top: 0;
        gap: 50px;
        list-style: none;
        flex-wrap: nowrap;
        white-space: nowrap;
        z-index: 9;
    }

    header nav ul li a {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: #333;
        font-size: 18px;
        position: relative;
        transition: all 0.3s;
        padding-bottom: 5px;
    }

    header nav ul li a:hover {
        opacity: 0.8;
        transform: scale(1.05);
        color: #79AD70;
    }

    header nav ul li a::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 1px;
        background: #79AD70;
        transition: all 0.3s;
        transform: translateX(-50%);
        border-radius: 3px;
    }

    header nav ul li:first-child {
        display: block;
    }

    body.home header nav ul li:first-child {
        display: none;
    }

    header nav ul li a:hover::after {
        width: 100%;
    }

    header nav ul li a img {
        height: 40px;
        width: auto;
        margin-right: 10px;
    }

    header nav .nav-tel {
        display: none;
    }

    header nav ul li.arrow-r {
        width: auto;
        position: relative;
        padding-right: 5px;
    }

    header nav ul li.arrow-r a {
        position: relative;
        transition: all 0.3s ease;
        padding-right: 20px;
    }

    /* PC版：矢印の場所までクリック判定を広げる */
    header nav ul li.arrow-r a::before {
        content: "";
        position: absolute;
        inset: -5px -25px -5px -10px;
        z-index: 10;
    }

    header nav ul li.arrow-r::after {
        width: 10px;
        height: 10px;
        border-width: 2px;
        border-color: #9AD37F;
        right: 0px;
        margin-top: -6px;
        transition: all 0.3s ease;
        border-top: 2px solid #9AD37F;
        border-right: 2px solid #9AD37F;
        pointer-events: none;
        z-index: 5;
    }

    header nav ul li.arrow-r:has(a:hover)::after {
        border-color: #9AD37F;
        transform: rotate(45deg) scale(1.2);
    }

    .firstview .tel {
        display: none;
    }

    .footer-nav ul {
        flex-direction: row;
        gap: 50px;
    }

    .firstview_main_area {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 50px 0 40px;
        gap: 40px;
    }

    .firstview::before {
        background-size: 18%, 15%;
        background-position: left 220px, right 600px;
        height: 2500px;
    }

    .firstview_text {
        flex: 1;
        align-items: flex-start;
    }

    .firstview_trust {
        font-size: 7vw;
        margin-bottom: 0;
    }

    .firstview_message {
        align-self: auto;
        text-align: left;
        padding-left: 0;
        margin-top: 2vw;
        font-size: 3vw;
        white-space: nowrap;
    }

    .firstview_slideshow {
        flex: 1.2;
    }

    section h2 .bg-svg {
        width: 30vw;
    }

    section h2 .en {
        font-size: 30px;
    }

    section h2 img {
        width: 4vw;
    }

    section h2 .jp {
        font-size: 40px;
    }

    .news time {
        font-size: 20px;
    }

    /* お知らせボタンのPC版サイズ同期 */
    .news-btn {
        font-size: 20px;
        right: 50px;
    }

    .news::before {
        background-size: 35%;
        background-position: right 380px;
        width: 100vw;
        height: 2000px;
    }

    .news ul {
        max-width: 1000px;
    }

    .news li p:nth-of-type(1) {
        font-size: 30px;
    }

    .news li p:nth-of-type(2) {
        font-size: 20px;
    }

    /* --- PC版 Aboutセクションの調整 --- */
    .about {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-end;
        column-gap: 40px;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .about>h2 {
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .about>h2 .bg-svg {
        margin-left: 0;
    }

    .about_text,
    .about>p {
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    .about_text {
        order: 1;
    }

    .about_icon-tori {
        top: auto;
        left: 55%;
        right: auto;
        width: 150px;
        transform: translateX(-50%) rotate(0deg);
    }

    .about_img {
        flex: 2;
        min-width: 0;
        height: auto;
        order: 2;
        display: block;
    }

    .about_menu {
        flex: 1;
        min-width: 0;
        order: 3;
    }

    .about_menu li a span {
        font-size: 20px;
        line-height: 1.5;
        padding-right: 0;
        margin-bottom: 0;
    }

    .about_menu li a {
        padding-right: 30px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
    }

    /* PC版の「＞」を小さくする設定 */
    .about_menu li a::after {
        width: 10px;
        height: 10px;
        border-width: 3px;
        margin-left: 10px;
    }

    .about_menu ul {
        align-items: flex-end;
        gap: 0;
    }

    .about_menu li a:hover::after {
        transform: rotate(45deg) scale(1.2);
    }

    /* 診療案内はPC版のみ 4枚 + 3枚 の2段で安定させる */
    .menu_list ul {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 20px;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .menu_list ul li {
        width: auto !important;
        min-width: 0;
        aspect-ratio: auto;
    }

    .menu_list ul li:nth-child(1),
    .menu_list ul li:nth-child(2),
    .menu_list ul li:nth-child(3) {
        grid-column: span 4;
    }

    .menu_list ul li:nth-child(4),
    .menu_list ul li:nth-child(5),
    .menu_list ul li:nth-child(6),
    .menu_list ul li:nth-child(7) {
        grid-column: span 3;
    }

    .menu_list ul li a {
        width: 100%;
        min-height: 220px;
        padding: 24px 18px 20px;
        flex-direction: column !important;
        justify-content: flex-start;
        gap: 16px;
        font-size: 20px;
        white-space: normal;
    }

    .menu_list ul li:nth-child(1) a,
    .menu_list ul li:nth-child(2) a,
    .menu_list ul li:nth-child(3) a,
    .menu_list ul li:nth-child(4) a,
    .menu_list ul li:nth-child(5) a,
    .menu_list ul li:nth-child(6) a,
    .menu_list ul li:nth-child(7) a {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
        min-height: 220px;
        padding: 24px 18px 20px;
    }

    .menu_list ul li a img {
        width: auto !important;
        height: 88px;
        max-width: min(100%, 120px);
        object-fit: contain;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }

    .menu_list ul li:nth-child(1) a img,
    .menu_list ul li:nth-child(2) a img,
    .menu_list ul li:nth-child(3) a img,
    .menu_list ul li:nth-child(4) a img,
    .menu_list ul li:nth-child(5) a img,
    .menu_list ul li:nth-child(6) a img,
    .menu_list ul li:nth-child(7) a img {
        height: 88px;
        max-width: min(100%, 120px);
    }

    .menu-card-label {
        min-height: 2.8em;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }

    .menu>p,
    .about>p {
        font-size: 20px;
        line-height: 1.8;
        margin: 40px auto 60px;
        max-width: 1000px;
    }

    .pc-none {
        display: none;
    }

    .tel-text {
        font-size: 20px;
    }

    /* PC版における診療時間テーブルの戻し */
    .clinichours table {
        margin: 40px auto 20px;
        line-height: 1.5;
    }

    .clinichours table th:first-child,
    .clinichours table td:first-child {
        width: 25%;
    }

    .clinichours th,
    .clinichours td {
        padding: 15px 5px;
        letter-spacing: normal;
    }

    /* PC版におけるアクセス情報のインデント解除 */
    .about::before {
        top: -600px;
        background-image: url("../svg/haikei_blue.svg"), url("../svg/haikei_green.svg");
        background-size: 22% 1200px, 30% 900px;
        background-position: calc(0% - 80px) 850px, calc(100% + 80px) 750px !important;
        width: 100vw;
        height: 3500px;
    }

    .access-info p {
        padding-left: 0;
        text-indent: 0;
    }

    .menu .tel,
    .access .map-wrapper,
    .access-info {
        max-width: 1000px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .clinichours .kittiri-tori {
        right: 22%;
        top: 20px;
        width: 120px;
    }

    .clinichours::before {
        top: -400px;
        background-size: 50% 1800px;
        background-position: right 50px;
    }

    .access::before {
        background-size: 20% 1500px, 28% 1200px;
        background-position: calc(0% - 80px) 200px, calc(100% + 80px) 0px !important;
    }

    .access .genkina-tori {
        right: 18%;
        top: 950px;
        width: 160px;
    }

    .footer-logo-area,
    .footer-main,
    .footer-tel,
    .copyright {
        width: 100%;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }

    .footer-main {
        margin-top: 40px;
        margin-bottom: 60px;
    }

    .footer-nav {
        flex: 1;
    }

    /* PC版におけるフッターナビのサイズ調整 */
    .footer-nav ul {
        display: grid;
        grid-template-columns: repeat(3, max-content);
        justify-content: start;
        gap: 28px 40px;
    }

    .footer-nav li {
        white-space: nowrap;
    }

    .footer-nav a {
        display: inline-block;
        width: auto;
        font-size: 18px;
    }

    .footer-nav .arrow-r::after {
        width: 10px;
        height: 10px;
        border-width: 2px;
        border-color: #9AD37F;
        right: -15px;
        margin-top: -6px;
    }

}