/*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
城ケ崎荘「やまもも通信」 y_style.css
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/

/* コンテナ：中央寄せ、幅100% */
.yamamomo-article{
  width: 100%;
  margin: 0 auto;
  padding: 0 2vw;
  align-self: center;
}

.yamamomo-article p {
  line-height: 1.7;  /* ← 行間 */
}

/* テーブルcaptionはセンター */
.yamamomo-article .ta1 caption{
  text-align: center;
  margin: .5rem 0 1rem 0;
}

/* ── メディア（画像/動画）共通 ─────────── */
.yamamomo-article figure{
  display: block;
  width: 100%;
  margin: 1.5rem 0;
}

.yamamomo-article figure img,
.yamamomo-article figure video{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px 0 10px 0;   /* ★ 左上＆右下の角丸 */
  overflow: hidden;                /* ★ はみ出し対策（動画含む） */
}

/* 動画の比率安定 */
.yamamomo-article figure.video-caption video{
  aspect-ratio: 16/9;
  object-fit: cover;
}


/* キャプション：左下配置 */
.yamamomo-article figure figcaption{
  text-align: left;
  font-size: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  line-height: 1.7;
  color: #004b36;
  margin-top: .5rem;
}
.yamamomo-article figure figcaption:empty{
  display: none;
}

/* ── 横並び（2枚以上）用ラッパー：下合わせ ─────────── */
.yamamomo-article .media-2up{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  justify-content: start;
  align-items: end;         /* 写真+caption下合わせ */
  padding-left: .5rem;
}

/* 各 figure を縦flexにして下詰め */
.yamamomo-article .media-2up > figure{
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* 画像とcaptionセットを下寄せ */
  margin: 0;
  height: 100%;
}

/* 画像・動画 */
.yamamomo-article .media-2up > figure img,
.yamamomo-article .media-2up > figure video{
  width: 100%;
  height: auto;
  align-self: flex-start;
  border-radius: 10px 0 10px 0;   /* ★ 同じ角丸を保持 */
  overflow: hidden;
}

/* キャプションは写真の下に */
.yamamomo-article .media-2up > figure figcaption{
  margin-top: .5rem;
}

/* ── 1024px以上のPC幅 ─────────── */
@media (min-width: 1024px){
  .yamamomo-article figure img,
  .yamamomo-article figure video{
    max-width: 400px;
    width: 100%;
  }

  .yamamomo-article .media-2up{
    justify-content: start;
    align-items: end;
  }
}


/*──────────────────────────────
 汎用ライン（写真・文の区切り用） PCのみ表示
──────────────────────────────*/
/* 全デバイス共通で “マージン” は確保 */
.photo-line {
  margin: 1.5rem 0;  /* ← 常に同じ空き */
}

/* PCのみラインを出す */
@media (min-width:1024px){
  .photo-line {
    border-bottom: 2px solid #CCCCCC;
  }
}

/* やまもも通信ナビゲーション
-----------------------------------------------*/
.yamamomo-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;               /* ボタン間の余白 */
  margin: 3rem auto 4rem;
  text-align: center;
  flex-wrap: wrap;
}

.yamamomo-nav a {
  display: inline-block;
  background: #fff;            /* 白地 */
  color: #004b36;              /* 緑文字 */
  border: 1px solid #004b36;   /* 緑枠を1pxに */
  padding: 0.6rem 1.6rem;
  border-radius: 10px 0 10px 0; /* 左上・右下だけ角丸 */
  font-size: 0.95em;
  text-decoration: none;
  transition: 0.3s;
  font-family: "Hiragino Sans","Yu Gothic","Meiryo",sans-serif;
}

.yamamomo-nav a i {
  margin: 0 0.3em;
}

.yamamomo-nav a:hover {
  background: #004b36;
  color: #fff;
  border-color: #004b36;
}

/* スマホ調整 */
@media screen and (max-width: 600px) {
  .yamamomo-nav {
    gap: 1rem;
    flex-direction: column;
  }
  .yamamomo-nav a {
    width: 80%;
  }
}

/* PC幅：写真2枚の“実距離”を gap でコントロール */
@media (min-width: 1024px){
  .yamamomo-article .media-2up{
    /* 幅をカラムに配分しない（=1frをやめる） */
    grid-template-columns: repeat(2, minmax(320px, 400px));  /* 例: 最小320px～最大400pxの2列 */
    justify-content: center;   /* センター寄せ */
    gap: 2em;                  /* ← ここで写真間の距離を調整（2～3emなど） */
    padding-left: 0;           /* 左の余白を消して純粋に gap だけで見せる */
  }

  /* 各 figure を“箱”として固定幅に */
  .yamamomo-article .media-2up > figure{
    width: auto;              /* grid のカラム幅に従う */
    margin: 0;                /* 念のため余白ゼロを維持 */
  }

  /* 画像は figure の幅にフィット */
  .yamamomo-article .media-2up > figure img,
  .yamamomo-article .media-2up > figure video{
    width: 100%;
    height: auto;
    max-width: none;          /* ← 既存の max-width:400px の影響を受けないように */
  }
}

@media (min-width: 1024px){
  .yamamomo-article .media-2up{
    grid-template-columns: repeat(2, minmax(320px, 400px));  /* カラム幅：必要に応じ調整OK */
    justify-content: start;   /* ← ★ 左寄せ（中央寄せ→左寄せに変更） */
    gap: 2em;                 /* ← 写真間隔を保持（2～3emなど） */
    padding-left: .5rem;      /* ← 1枚表示の写真と位置をそろえる */
  }

  .yamamomo-article .media-2up > figure{
    width: auto;
    margin: 0;
  }

  .yamamomo-article .media-2up > figure img,
  .yamamomo-article .media-2up > figure video{
    width: 100%;
    height: auto;
    max-width: none;
  }
}

/* SPでは縦動画は全幅 */
.yamamomo-article figure.video-caption2 video{
  aspect-ratio: 9/16;
  object-fit: cover;
  width: 100%;
  height: auto;
}

/* PCだけ縦動画(.video-caption2)を半幅・左寄せに */
@media (min-width: 768px){
  /* figure側で“中央寄せ・引き伸ばし”系を無効化 */
  .yamamomo-article figure.video-caption2{
    display: block !important;
    margin: 0 !important;                /* autoセンタリング打ち消し */
    text-align: left !important;         /* 子要素の左寄せ */
    width: auto !important;
    max-width: none !important;

    /* 親がflex/gridの場合のセンタリングを無効化 */
    align-self: flex-start !important;   /* flex用 */
    justify-self: start !important;      /* grid用 */
    place-self: start !important;        /* grid簡易 */
  }

  /* 実際に半幅にする主体はvideo（横長側には影響なし） */
  .yamamomo-article figure.video-caption2 video{
    width: 100% !important;               /* ここで半分を強制 */
    max-width: none !important;
    margin: 0 !important;                /* 中央寄せ打ち消し */
  }
}

/* submenu3 と note-list1 の組み合わせに強い指定 */
.submenu3.note-list1 {
  position: relative;
  padding-left: 1.2em;      /* ※ぶん右に押し出す（改行後の頭も揃う） */
  font-size: 0.8em;
  color: #030f0c !important; /* ← 確実に色を適用 */
  letter-spacing: -0.05em;   /* ← 文字間を少し詰める（調整可） */
  display: inline-block;
  line-height: 1.3em;
}

/* ※マーク */
.submenu3 {
  margin: 0 0 1rem;
  border-top: 0px solid #ccc;
  font-size: 0.8em;
  /* color: #030f0c; ← ここは消してもOK（上で個別に指定するので） */
  display: block;
  text-decoration: none;
  padding: 0;
  background: #fff;
  line-height: 1.3rem;
}


/* やまもも通信の注釈（※付き） */
.yamamomo-article p span.submenu3.note-list1 {
  position: relative;
  display: inline-block;
  padding-left: 1.2em;        /* ※ぶんインデント → 改行後も文字頭が揃う */
  font-size: 0.8em;
  color: #004b36 !important;  /* ← 指定のグリーンを“最優先”で適用 */
  letter-spacing: -0.05em;    /* ← 文字間を少し詰める */
  line-height: 1.3;
}

/* ※ マーク */
.yamamomo-article p span.submenu3.note-list1::before {
  content: "※";
  position: absolute;
  left: 0;
  top: 0.1em;                 /* ← 縦位置の微調整。ずれていたら 0.05～0.2em で調整 */
  color: #004b36 !important;  /* ※も同じグリーンに */
  line-height: 1;
}

.yamamomo-photo_bn{
	border-radius: 10px 0 10px 0; /* 左上・右下だけ角丸 */
}

