/*
Theme Name: yStandard Child
Template: ystandard
Version: 1.0.1
Description: yStandard の子テーマ（ギャラリーカスタム投稿タイプ対応）
Author: homely
Text Domain: ystandard-child
*/

/* ギャラリー詳細ページ */
.gallery-single {
    padding: 1em 0;
}
.gallery-single__date {
    font-size: 0.85em;
    color: #888;
    margin: 0 0 0.3em;
}
.gallery-single__title {
    font-size: 1.4em;
    margin: 0 0 1.2em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.4em;
}
.gallery-single__images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.gallery-single__images a {
    display: block;
}
.gallery-single__images img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ギャラリー詳細：コンテンツ幅いっぱいに */
body.single-gallery .content__main {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
}

/* ギャラリー詳細：白背景の内側パディングも解除して幅いっぱいに */
body.single-gallery .content__main {
    --ystd-content-padding: 0;
    padding: 0;
}
body.single-gallery .singular-article {
    width: 100%;
    max-width: 100%;
}
body.single-gallery .gallery-single {
    width: 100%;
    padding: 1.5em;
    box-sizing: border-box;
}

/* ギャラリー詳細：ナビゲーション */
.gallery-single__nav {
    border-top: 1px solid #ddd;
    padding: 1.2em 1.5em;
    background: #f9f9f9;
}
.gallery-single__nav-archive {
    display: inline-block;
    margin-bottom: 1em;
    font-size: 0.9em;
    color: #555;
    text-decoration: none;
}
.gallery-single__nav-archive:hover {
    color: #222;
    text-decoration: underline;
}
.gallery-single__nav-posts {
    display: flex;
    justify-content: space-between;
    gap: 1em;
}
.gallery-single__nav-prev,
.gallery-single__nav-next {
    font-size: 0.85em;
    color: #555;
    text-decoration: none;
    max-width: 48%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-single__nav-prev:hover,
.gallery-single__nav-next:hover {
    color: #222;
    text-decoration: underline;
}
.gallery-single__nav-next {
    margin-left: auto;
    text-align: right;
}

/* ギャラリー詳細：ナビゲーション横並び（上書き） */
.gallery-single__nav {
    display: flex;
    align-items: center;
    gap: 1em;
    border-top: 1px solid #ddd;
    padding: 1em 1.5em;
    background: #f9f9f9;
}
.gallery-single__nav-archive {
    display: inline-block;
    margin-bottom: 0;
    flex-shrink: 0;
    font-size: 0.9em;
    color: #555;
    text-decoration: none;
}
.gallery-single__nav-posts {
    display: flex;
    justify-content: space-between;
    flex: 1;
    gap: 1em;
    min-width: 0;
}
.gallery-single__nav-prev,
.gallery-single__nav-next {
    max-width: none;
}

/* ギャラリーナビ：左=前の投稿 / 中央=一覧 / 右=次の投稿 */
.gallery-single__nav {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5em;
    border-top: 1px solid #ddd;
    padding: 1em 1.5em;
    background: #f9f9f9;
}
.gallery-single__nav-prev {
    text-align: left;
}
.gallery-single__nav-archive {
    text-align: center;
    flex-shrink: unset;
    margin-bottom: 0;
}
.gallery-single__nav-next {
    text-align: right;
    margin-left: 0;
}
.gallery-single__nav-prev a,
.gallery-single__nav-archive a,
.gallery-single__nav-next a {
    font-size: 0.85em;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}
.gallery-single__nav-prev a:hover,
.gallery-single__nav-archive a:hover,
.gallery-single__nav-next a:hover {
    color: #222;
    text-decoration: underline;
}

/* ギャラリー詳細：白背景・角丸・ボーダーなし */
body.single-gallery .singular-article {
    border-radius: 16px;
    overflow: hidden;
}
.gallery-single__nav {
    background: none !important;
    border-top: none !important;
}

/* ギャラリー詳細：白背景エリアに角丸 */
body.single-gallery .content__main {
    border-radius: 16px;
    overflow: hidden;
}

/* ギャラリー一覧：4列グリッド */
.gallery-archive {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 1em 0;
}
.gallery-archive__item a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.gallery-archive__item a:hover .gallery-archive__thumb {
    opacity: 0.8;
}
.gallery-archive__thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.gallery-archive__no-thumb {
    width: 100%;
    height: 160px;
    background: #eee;
}
.gallery-archive__title {
    margin: 0.4em 0 0;
    font-size: 0.8em;
    line-height: 1.4;
}

/* ギャラリー一覧・お知らせ一覧：白背景・ボーダー削除 */
.post-type-archive-gallery .archive__item,
.category-information .archive__item,
.category .archive__item {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* お知らせ一覧：archive__mainの白背景削除 */
.category-information .archive__main,
.category .archive__main {
    background: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .gallery-archive {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .gallery-archive {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* お知らせ一覧：gapを詰める */
.category-information .archive__item.is-simple {
    padding: 0.4em 0;
}

/* お知らせ・ギャラリー一覧：コンテンツ幅 1000px */
.category-information .archive__main,
.post-type-archive-gallery .archive__main {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
}

/* ギャラリー一覧：日付 */
.gallery-archive__date {
    margin: 0.4em 0 0.1em;
    font-size: 0.75em;
    color: #888;
}

/* ギャラリー一覧：日付・タイトルのフォント調整 */
.gallery-archive__date {
    font-size: 13px !important;
}
.gallery-archive__title {
    font-size: 16px !important;
    font-weight: 700;
}

/* ギャラリー一覧：アイキャッチ角丸 */
.gallery-archive__thumb {
    border-radius: 10px;
}

/* TOPページ：ギャラリー最新4件 */
.gallery-recent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 1.5em 0 0;
}
.gallery-recent__item a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.gallery-recent__item a:hover .gallery-recent__thumb {
    opacity: 0.8;
}
.gallery-recent__thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    transition: opacity 0.2s;
}
.gallery-recent__no-thumb {
    width: 100%;
    height: 160px;
    background: #eee;
    border-radius: 10px;
}
.gallery-recent__date {
    margin: 0.4em 0 0.1em;
    font-size: 13px;
    color: #888;
}
.gallery-recent__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .gallery-recent {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ページタイトルブロック表示ページ：site-content上部余白削除 */
body.post-type-archive-gallery .site-content,
body.single-gallery .site-content,
body.category-information .site-content,
body.single-post.category-information .site-content {
    --ystd-container-margin-vertical: 0;
}

/* お知らせ詳細：ヘッダーブロック上部余白削除 */
body.single-post.is-overlay .site-content {
    --ystd-container-margin-vertical: 0;
}

/* お知らせ詳細：白背景の幅をギャラリー詳細と同じに */
body.single-post.is-overlay .content__main {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    --ystd-content-padding: 0;
    padding: 0;
}
body.single-post.is-overlay .singular-article {
    width: 100%;
    max-width: 100%;
}

/* お知らせ詳細：paddingをギャラリー詳細と同じに */
body.single-post.is-overlay .singular-article {
    padding: 1.5em;
    box-sizing: border-box;
}

/* お知らせ詳細：角丸をギャラリー詳細と同じに */
body.single-post.is-overlay .content__main,
body.single-post.is-overlay .singular-article {
    border-radius: 16px;
    overflow: hidden;
}


/* ドロワーメニュー改善 */
@media screen and (max-width: 768px) {
  /* メニュー全体：上部余白を確保してハンバーガーと重ならないように */
  .global-nav .global-nav__container {
    padding-top: 5em;
  }
  /* メニュー項目：縦並び・中央寄せ・大きめのフォント */
  .global-nav__menu {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .global-nav__menu > .menu-item {
    width: 100%;
    margin-left: 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }
  .global-nav__menu > .menu-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  .global-nav__menu > .menu-item > a {
    padding: 1.1em 1.5em;
    font-size: 1.05em;
    letter-spacing: 0.1em;
    justify-content: center;
    height: auto;
  }
  /* ホバー・現在地アンダーラインは非表示 */
  .global-nav__menu > .menu-item > a:after {
    display: none;
  }
}

/* ========================================================
   サイト全体フォント一回り拡大 (2026-07-02)
   ヒーロー見出し(.hero-catch / .ystdb-heading__text)は
   プリセット非依存のため対象外＝従来サイズ維持
   ======================================================== */

/* 本文既定(プリセット未指定テキスト・ロゴ・表・フッター等が継承) 16→17.6px */
body.ystd { font-size: 1.1rem; }

/* ブロックエディター フォントサイズプリセット 約1.1倍
   (生成ファイル 54.css の「.ystd .has-*-font-size」を詳細度0,2,1で上書き) */
body.ystd .has-min-font-size        { font-size: clamp(0.825rem, 0.796rem + 0.132vw, 0.894rem) !important; }
body.ystd .has-x-small-font-size    { font-size: clamp(0.894rem, 0.866rem + 0.132vw, 0.963rem) !important; }
body.ystd .has-small-font-size      { font-size: clamp(0.963rem, 0.934rem + 0.132vw, 1.032rem) !important; }
body.ystd .has-normal-font-size     { font-size: clamp(1.032rem, 1.003rem + 0.132vw, 1.1rem) !important; }
body.ystd .has-medium-font-size     { font-size: clamp(1.1rem, 1.044rem + 0.264vw, 1.238rem) !important; }
body.ystd .has-larger-font-size     { font-size: clamp(1.238rem, 1.181rem + 0.264vw, 1.375rem) !important; }
body.ystd .has-huge-font-size       { font-size: clamp(1.375rem, 1.319rem + 0.264vw, 1.513rem) !important; }
body.ystd .has-x-huge-font-size     { font-size: clamp(1.375rem, 1.262rem + 0.517vw, 1.65rem) !important; }
body.ystd .has-2-x-huge-font-size   { font-size: clamp(1.65rem, 1.594rem + 0.264vw, 1.788rem) !important; }
body.ystd .has-3-x-larger-font-size { font-size: clamp(1.788rem, 1.731rem + 0.264vw, 1.925rem) !important; }
body.ystd .has-4-x-huge-font-size   { font-size: clamp(1.788rem, 1.618rem + 0.781vw, 2.2rem) !important; }
body.ystd .has-max-font-size        { font-size: clamp(2.063rem, 1.893rem + 0.781vw, 2.475rem) !important; }
body.ystd .has-maximum-font-size    { font-size: clamp(2.2rem, 1.973rem + 1.034vw, 2.75rem) !important; }

/* グローバルナビ(PCのみ) 18→20px ※モバイルドロワーは既存指定を維持 */
@media screen and (min-width: 769px) {
  body.ystd #global-nav__menu,
  body.ystd #global-nav__menu .menu-item > a { font-size: 1.25rem !important; }
}

/* 診療時間カレンダー(biz-cal) 14→15px */
#biz_calendar table.bizcal { font-size: 15px !important; }
