@charset "UTF-8";
/*
  media-grid.css
  異種コンテンツ（リンク／動画モーダル／プレーン画像）を 2x2（SPで1列）で並べる汎用グリッド。
  HTML 側のクラス: .c-mediaGrid / __item / __link / __thumb (--video) / __caption
  動画モーダル用の再生ボタンアイコンは __thumb--video に CSS でオーバーレイ。
*/

.c-mediaGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.c-mediaGrid__item {
  background: transparent;
}
/* 全幅カード（2列をまたぐ）。横長の単独画像などに使う */
.c-mediaGrid__item--full {
  grid-column: 1 / -1;
}
/* リンク（<a>）・モーダルトリガ（<button>）共通ラッパ */
.c-mediaGrid__link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
}
.c-mediaGrid__link:focus-visible {
  outline: 2px solid #3471b0;
  outline-offset: 2px;
}
/* サムネ枠（位置基準・はみ出し処理） */
.c-mediaGrid__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
  background: #f5f5f5;
}
/* common.css 側の #main-category img を上書き */
#wrapper #contents #main-column #main-category .c-mediaGrid__thumb img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: opacity 0.2s ease;
}
.c-mediaGrid__link:hover .c-mediaGrid__thumb img {
  opacity: 0.92;
}
/* YouTube 再生ボタンを CSS で中央オーバーレイ（video-card-grid と同サイズで統一） */
.c-mediaGrid__thumb--video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 42px;
  margin: -21px 0 0 -30px;
  background: url("/img/common/ico_yt_play.png") center/contain no-repeat;
  pointer-events: none;
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.c-mediaGrid__link:hover .c-mediaGrid__thumb--video::after {
  opacity: 1;
  transform: scale(1.06);
}
/* キャプション（任意。リンク説明や動画タイトルに使う） */
.c-mediaGrid__caption {
  display: block;
  margin: 10px 4px 0;
  padding: 12px 14px !important;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.6;
  background: #ededed;
}

@media screen and (max-width: 767px) {
  .c-mediaGrid {
    grid-template-columns: 1fr;
  }
  .c-mediaGrid__thumb--video::after {
    width: 58px;
    height: 40px;
    margin: -20px 0 0 -29px;
  }
}
