/*
Theme Name: Tanizawa-cc-Theme
Theme URI: https://tanizawa-childclinic.com/
Description: たにざわこどもクリニック様公式サイト用カスタムテーマ「Twenty Twenty-Five」が親テーマのため両方のテーマをサーバーに残してください
Author: popodesign
Author URI: https://popo-design.net
Template: twentytwentyfive
Version: 1.0.0
*/

/* ここにカスタムCSSを記述できます */

html {
    scroll-behavior: smooth;
}

/* インライン画像の上下位置を調整 */
.has-inline-color img, 
img[style*="width"] {
    vertical-align: middle; /* 中央揃えにする */
    position: relative;
    top: -0.1em; /* 1px や 0.1em 単位で微調整 */
}

/* ボタンの横に矢印をつける */
.wp-block-button__link {
    display: inline-flex !important; /* 強制適用 */
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-right: 1.2em !important;
    color: #fff;
    
    /* 【重要】Firefoxでの意図しない改行を防ぐ */
    white-space: nowrap; 
    /* 念のため最小幅を確保 */
    min-width: max-content; 
}

.wp-block-button__link::after {
    content: "»";
    font-size: 1.3em;
    /* line-height: 1 で安定させる */
    line-height: 1;
    margin-top: -0.1em;
    transition: transform 0.3s ease;
    /* 矢印自体が縮まないように固定 */
    flex-shrink: 0;
}

.wp-block-button__link:hover::after {
    transform: translateX(5px);
}

/* ボタンの「輪郭」スタイル */
.wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid #6cbb5a;
    color: #6cbb5a;
    background-color: #fff;
    transition: all 0.3s;
}

/* 「角丸」スタイルが選択された時の上書き */
.wp-block-image.is-style-rounded img,
.wp-block-image.is-style-rounded .wp-block-image__crop-area img {
    border-radius: 20px !important; /* ここで好きな角丸具合を指定 */
}

/* メディアとテキスト内round-imgの画像そのものを丸くする */
.round-img .wp-block-media-text__media img {
    border-radius: 20px !important;
}

/* サブメニューのテキスト折り返しを防止 */

/* リンクが1行に収まるように指定 */
.wp-block-navigation-item .wp-block-navigation-item__content {
    white-space: nowrap !important;
}


/* スマホでは縦に並べて、少し隙間を空ける */
@media (max-width: 599px) {
    .wp-block-navigation.gnav .wp-block-navigation-item {
        margin: 8px 0 !important;
    }
}

/* 枠に黒シャドウ */
.is-style-kuro-shadow {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2) !important; /* 左右のズレ, 上下のズレ, ぼかし具合, 色 */
    border-radius: 20px !important;
    overflow: hidden; /* 中身がはみ出さないように */
    border: none !important; /* 余計な枠線を消す */
}

/* class 枠に黒シャドウ */
.kuro-shadow {
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); /* 左右のズレ, 上下のズレ, ぼかし具合, 色 */
}

/* ナビゲーション全体のレイアウト調整 */
.gnav a {
    display: flex !important;
    flex-direction: row !important; /* PC・モバイル共に横並び */
    align-items: center !important; /* 記号と文字の上下中央を揃える */
    text-decoration: none;
}

/* 各メニューの前に記号を表示 */
.gnav a::before {
    content: "●"; /* 好きな記号に変更 */
    order: -1;    /* 必ず文字より前に配置 */
    margin-right: 8px; /* 記号と文字の間の余白 */
    font-size: 0.8em;  /* 記号のサイズ（文字より少し小さめが綺麗です） */
    color: #fabb3c;
    display: inline-block;
    transition: transform 0.3s ease; /* 動きを滑らかにする */
}

/* マウスを乗せた時（ホバー） */
.gnav a:hover::before {
    transform: translateX(5px);
}

/* PC表示（横に並ぶメニュー）で、少し余白を調整したい場合 */
@media (min-width: 782px) {
    .gnav {
        margin-left: 15px; /* メニュー項目同士の間隔 */
    }
}

.mainimg {
    /* 上の角を丸くする（下側は0にするのがポイント） */
    border-radius: 0;
    overflow: hidden;

    /* 下側だけを波波にする設定 */
    --mask: 
        /* 波の凸部分 */
        radial-gradient(30.37px at 50% calc(100% - 42px), #000 99%, #0000 101%) calc(50% - 40px) 0 / 80px 100% repeat-x,
        /* 波の凹部分 */
        radial-gradient(30.37px at 50% calc(100% + 22px), #0000 99%, #000 101%) 50% calc(100% - 20px) / 80px 100% repeat-x;
    
    -webkit-mask: var(--mask);
    mask: var(--mask);

    /* 下側に波の余白を作る */
    padding-bottom: 40px;
}

/* 画像の表示設定 */
.mainimg img, 
.mainimg .wp-block-cover__image-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* メインビジュアルの画像をゆっくりズームアウト */
.mainimg img.wp-block-cover__image-background {
    animation: slowZoomOut 10s ease-out forwards;
    overflow: hidden; /* ズームした画像が枠からはみ出すのを防ぐ */
}

@keyframes slowZoomOut {
    0% {
        transform: scale(1.2); /* 最初は少し拡大した状態 */
    }
    100% {
        transform: scale(1);   /* 10秒かけて本来のサイズに戻る */
    }
}

/* テキストに白枠 */
.fuchi {
  text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.9);
}


.wave-section {
    position: relative;
    background-color: #f0f9ff; /* セクションの淡い背景色（例：パステルブルー） */
    padding-top: 50px;    /* 波の高さ分、中の余白を確保 */
    padding-bottom: 50px;
    margin-top: 50px;    /* 上下のセクションとの間隔 */
    margin-bottom: 50px;
    z-index: 1;
}

/* 上側のなななみ */
.wave-section::before {
    content: "";
    position: absolute;
    top: -48px; /* 波の高さ分、上に浮かせる */
    left: 0;
    width: 100%;
    height: 50px;
    background-color: inherit; /* セクションと同じ色を適用 */
    /* 綺麗な波の形に切り抜き */
    clip-path: polygon(0% 100%, 0% 50%, 5% 42%, 10% 36%, 15% 34%, 20% 36%, 25% 42%, 30% 52%, 35% 61%, 40% 66%, 45% 68%, 50% 66%, 55% 61%, 60% 52%, 65% 42%, 70% 36%, 75% 34%, 80% 36%, 85% 42%, 90% 52%, 95% 61%, 100% 66%, 100% 100%);
}

/* 下側のなみなみ */
.wave-section::after {
    content: "";
    position: absolute;
    bottom: -48px; /* 波の高さ分、下に浮かせる */
    left: 0;
    width: 100%;
    height: 50px;
    background-color: inherit; /* セクションと同じ色を適用 */
    /* 下側の波の切り抜き */
    clip-path: polygon(0% 0%, 0% 34%, 5% 39%, 10% 48%, 15% 58%, 20% 64%, 25% 66%, 30% 64%, 35% 58%, 40% 48%, 45% 39%, 50% 34%, 55% 39%, 60% 48%, 65% 58%, 70% 64%, 75% 66%, 80% 64%, 85% 58%, 90% 48%, 95% 39%, 100% 34%, 100% 0%);
}

/* サイト内のすべてのボタンのホバー色を一括設定 */
.wp-block-button__link:hover {
    background-color: #6CBB5A !important; /* ホバー時の背景色 */
    color: #ffffff !important;            /* ホバー時の文字色 */
    opacity: 0.8;                           /* 透明度（1で透けない） */
}

/* テーブル全体の枠線をリセット */
.yoko-table {
    border-collapse: collapse;
    border: none !important;
}

/* 縦線を消し、下の横線だけを表示 */
.yoko-table th,
.yoko-table td {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid #ddd !important; /* 横線の太さと色 */
    padding: 0.5em; /* 上下の余白を広げると見やすくなります */
}

/* 一番最後の行の線（最下部の線）が必要ない場合は、以下も追記してください */
.yoko-table tr:last-child td,
.yoko-table tr:last-child th {
    border-bottom: none !important;
}

/* カルーセル 1. 外枠：はみ出た画像を隠す */
.inf-scroll-wrapper {
  overflow: hidden;
  width: 100%;
  background: #fff;
  padding: 3rem 0 2rem 0;
}

/* 2. 内枠：ここで「横並び」と「アニメーション」を指示 */
.inf-scroll-inner {
  display: flex; /* これが横並びの肝です */
  width: fit-content;
  animation: loop-scroll 80s linear infinite;
}

/* 3. 各アイテムの設定 */
.inf-scroll-item {
  display: block;
  width: 400px;
  margin-right: 15px;
  flex-shrink: 0; /* 親がflexの時に縮むのを防ぐ */
  text-decoration: none;
}

.inf-scroll-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s;
}

.inf-scroll-item:hover img {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* マウスホバーで停止 */
.inf-scroll-inner:hover {
  animation-play-state: paused;
}

/* アニメーション：1セット分（全体の50%）左に移動したら、
   見た目が同じ2セット目のスタート位置に瞬時に戻る */
@keyframes loop-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* 全体の半分（1セット分）移動したところでループ */
  }
}

/* 600pxから768pxの間でもモバイル用ナビゲーションを表示させる */
@media (max-width: 768px) {
/* ロゴヘッダーを中央揃え */
.logo-tel {
    justify-content: center;
}

    /* ナビゲーションをモバイル用のハンバーガーボタンに強制切り替え */
    .wp-block-navigation__responsive-container-open {
        display: flex !important;
    }

    .wp-block-navigation__responsive-container {
        display: none !important;
    }

    /* モーダル（開いた後のメニュー）の設定を有効化 */
    .wp-block-navigation__responsive-container.is-menu-open {
        display: block !important;
    }
}

/* 画像を右下に固定 */
.fix-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 80px;
    height: auto;
    cursor: pointer;
    /* 最初は隠しておく */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

/* スクロールした時にこのクラスをJSで追加する */
.fix-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.fix-back-to-top:hover {
    transform: translateY(-5px);
}


/* カバーブロックに設定した独自クラス */
.subimg {
    border-radius: 0;
    overflow: hidden;

    /* 下側だけを波波にする設定 */
    --mask: 
        radial-gradient(30.37px at 50% calc(100% - 42px), #000 99%, #0000 101%) calc(50% - 40px) 0 / 80px 100% repeat-x,
        radial-gradient(30.37px at 50% calc(100% + 22px), #0000 99%, #000 101%) 50% calc(100% - 20px) / 80px 100% repeat-x;
    
    -webkit-mask: var(--mask);
    mask: var(--mask);

    /* 下側に波の余白を作る（波が切れないようにするため） */
    padding-bottom: 40px !important; 
}

/* 画像の表示設定（カバーブロック内部の要素に適用） */
.subimg img, 
.subimg .wp-block-cover__image-background,
.subimg .wp-block-cover__video-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.page h2 {
    display: flex;             /* アイコンとテキストを横並びに */
    align-items: flex-start;    /* 折り返した際、アイコンを1行目の高さに固定 */
    gap: 10px;                 /* アイコンとテキストの間隔 */
    padding-bottom: 8px;       /* 下線との間の余白 */
    border-bottom: 2px solid #6CBB5A; /* 下線の設定 */
    line-height: 1.4;          /* 行間の調整 */
}

.page h2::before {
    content: "";
    display: block;
    flex-shrink: 0;            /* アイコンが潰れないように固定 */
    width: 1.5em;              /* アイコンの横幅（文字サイズに連動） */
    height: 1.5em;             /* アイコンの縦幅 */
    background-image: url('https://tanizawa-childclinic.com/wp2026/wp-content/uploads/2026/02/h2-icon.png'); /* アイコン画像のURL */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 0.1em;         /* テキストの高さに合わせて微調整 */
}

/* 固定ページのh3カスタマイズ */
.page h3 {
    display: flex;
    align-items: flex-start; /* 複数行になってもアイコンを上端に固定 */
    gap: 8px;               /* 画像とテキストの間隔 */
    line-height: 1.4;
}

.page h3::before {
    content: "";
    display: block;
    flex-shrink: 0;          /* 画像が潰れないように固定 */
    width: 0.8em;            /* 文字の大きさに合わせたサイズ */
    height: 0.8em;           /* 幅と同じにして正円を作る */
    background-image: url('https://tanizawa-childclinic.com/wp2026/wp-content/uploads/2026/02/h3-icon.png'); 
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;      /* 元が四角い画像でも強制的に丸くする */
    margin-top: 0.35em;       /* テキストとの高さ微調整 */
}

/* 診療案内 */
/* ファイルブロック全体の整列 */
.dl-section .wp-block-file {
    display: flex;
    justify-content: space-between; /* テキストとボタンを両端に */
    align-items: center;
    border-bottom: 1px solid #eee; /* 区切り線 */
    padding: 15px 0;
    margin-bottom: 0;
}

.dl-section .wp-block-file__button {
    color: #fff;
}

/* テキスト（ファイル名）の部分 */
.dl-section .wp-block-file a:not(.wp-block-file__button) {
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

/* ボタンのスタイル固定 */
.dl-section .wp-block-file__button {
    background-color: #5cb85c; /* 今の色味を維持 */
    border-radius: 50px;
    width: 140px; /* 横幅を固定して揃える */
    text-align: center;
    padding: 10px 0;
}

/* ボタンをキラッと光らせる */
.is-style-highlight-btn .wp-block-button__link {
    position: relative; /* 光の動く基準を決める */
    overflow: hidden;    /* はみ出た光を隠す */
    background-color: #5cb85c !important;
    z-index: 1;          /* 重なり順の整理 */
}

.is-style-highlight-btn .wp-block-button__link::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    animation: shiny-btn 3s ease-in-out infinite;
    z-index: -1; 
}

@keyframes shiny-btn {
    0% { left: -60%; }
    20% { left: 120%; }
    100% { left: 120%; }
}

/* フローの装飾：リストの間に▼を表示 */
/* フロー全体の設定 */
.flow-list {
    list-style: none;
    padding: 0;
    counter-reset: flow-counter;
}

.flow-list li {
    background: #f3f4f6;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    text-align: left; /* テキストは左揃え */
    position: relative;
    margin-bottom: 2.2rem;
    counter-increment: flow-counter;
    display: flex;
    align-items: flex-start;
}

/* 番号部分：文頭に配置 */
.flow-list li::before {
    content: counter(flow-counter) ".";
    font-weight: bold;
    margin-right: 0.8rem;
    color: #333;
    flex-shrink: 0;
}

/* 矢印（▼）：中央配置 */
.flow-list li:not(:last-child)::after {
    content: "▼";
    position: absolute;
    bottom: -2rem;
    left: 50%; /* 中央へ */
    transform: translateX(-50%); /* 中央寄せの補正 */
    color: #999;
    font-size: 1rem;
}

/* PC表示時： サブメニューの各項目の上下にゆとりを持たせる */
@media (min-width: 600px) {
    .wp-block-navigation-item .wp-block-navigation__submenu-container {
        /* 1. marginを消して「隙間」を埋める（マウスが外れないように） */
        margin-top: 0 !important;

        /* 2. 透明な「太い枠線」を上に付けて、見た目だけ押し下げる */
        border-top: 15px solid transparent !important;
}

/* カラムブロックなども 768px で縦並びにする場合 */
@media (max-width: 768px) {
    .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
        flex-basis: 100% !important;
    }
}
