/* --- 全体共通の設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: #f5f5f5;
}
a {
    text-decoration: none;
}
/* --- 動画エリアの設定 --- */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh; /* パソコンでは画面全体の高さ */
    background-color: #000;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain; /* 動画全体を表示 */
}

/* 【修正】スマホ（700px以下）になったときの調整 */
@media (max-width: 700px) {
    .video-container {
        /* 高さを画面全体(100vh)ではなく、縦長（9:16）の比率に自動調整します */
        height: auto; 
        aspect-ratio: 9 / 16; /* 【修正】1080x1920の比率（9:16）を維持 */
    }

    .video-container video {
        /* 中央配置を解除し、縦長の箱にぴったり収まるようにします */
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        object-fit: contain; /* 動画を一切切り取らずにそのまま表示 */
    }
}

/* 動画終了後のオーバーレイの初期状態 */
.video-overlay {
  position: absolute; /* または fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* 背景を少し暗くする場合 */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;             /* 最初は透明にしておく */
  
  /* 【超重要】ここを追加！通常時はタッチをすり抜けさせてスクロールできるようにする */
  pointer-events: none;   
  
  transition: opacity 0.3s;
}

/* 動画が終了して「show」クラスがついたとき */
.video-overlay.show {
  opacity: 1;             /* 画面に見えるようにする */
  
  /* 【超重要】ここを追加！文字が表示されたらクリック（再開タップ）を受け付ける */
  pointer-events: auto;   
}

/* --- 下半分のレイアウト設定 --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* メインタイトルのデザイン */
.main-title {
    text-align: center;
    font-size: 1.1rem; /* 【変更】2.2remから半分の大きさに修正 */
    color: #333;
    margin-bottom: 40px;
    letter-spacing: 0.1em; /* 文字の間隔を少し広げて上品に */
}

.category-section {
    margin-bottom: 60px;
}

.category-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-left: 5px solid #333;
    padding-left: 10px;
}

.category-desc {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 16px;
  color: #333333;
}

/* 画像を並べる箱の設定 */
.image-grid {
    display: grid;
    gap: 15px;
}

/* パソコン用の設定（標準）：横に4個並べる */
@media (min-width: 769px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* スマホ用の設定（画面幅が狭いとき）：2個ずつ2列に並べる */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 画像自体の設定 */
.image-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* 最初はPC用を表示、スマホ用は非表示にする */
.pc-video {
  display: block;
}
.sp-video {
  display: none;
}

/* 画面幅が700px以下になったら表示を逆転させる */
@media screen and (max-width: 700px) {
  .pc-video {
    display: none;
  }
  .sp-video {
    display: block;
  }
}

/* --- 【追加】最下部リンクコーナー（フッター）の設定 --- */
.site-footer {
    background-color: #333; /* 落ち着いた黒ベースの背景色 */
    color: #fff;
    padding: 40px 20px;
    text-align: center;
}

.footer-nav {
    max-width: 800px;
    margin: 0 auto 20px auto;
}

/* リンクを並べる箱（PCでは横並び） */
.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* リンク文字のデザイン */
.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

/* マウスを乗せたときに明るくする */
.footer-links a:hover {
    color: #fff;
}

/* コピーライトの文字 */
.copyright {
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px solid #44px;
    padding-top: 15px;
    display: inline-block;
}

/* スマホ（画面幅768px以下）での見栄え調整 */
@media (max-width: 768px) {
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2列に綺麗に整列 */
        gap: 15px;
        text-align: center;
    }
}
/* カテゴリーのタイトル文字を小さくする記述 */
.category-section h2 {
  font-size: 1.1rem;
}