* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: #f8f7f5;
  color: #333;
  font-family: "BIZ UDPGothic", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  overflow-x: hidden;
  letter-spacing: 0.03em;
}

body.loading .show-after-delay {
  opacity: 0 !important;
}

.container {
  width: 100%;
  height: auto !important;
  min-height: 100vh;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* common.css などの影響を排除 */
  background-image: url('../../images/facility/centerHouse/haikei_mokume_pc.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.link-to-map-container {
  position: relative;
  height: 120px;
}

.safe-area-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 50px 40px 50px;
  position: relative;
  display: block;
  /* common.css の flex を解除 */
  height: auto;
  /* common.css の 100% を解除 */
  top: auto;
  /* common.css の 0 を解除 */
  transform: none;
}

@media screen and (max-width: 768px) {
  .container {
    background-image: url('../../images/facility/centerHouse/haikei_mokume_mobile.webp');
    background-size: contain;
    background-repeat: repeat;
    padding: 20px 15px 40px 15px;
  }
}

/* 閉じるボタン (ロゴ) */
.close-modal {
  position: absolute;
  top: 0;
  right: 20px;
  width: 120px;
  height: 120px;
  line-height: 120px;
  z-index: 100;
  transition: opacity 0.3s;
}

@media screen and (max-width: 1024px) {
  .link-to-map-container {
    height: 80px;
  }

  .close-modal {
    width: 80px;
    height: 80px;
    line-height: 80px;
  }
}

.close-modal:hover {
  opacity: 0.7;
}

.center-content.show-after-delay {
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
  gap: 60px;
  opacity: 1 !important;
  /* 時間差での表示を無効化 */
}

/* 共通の背景を暗くする設定を無効化 */
.container::before {
  display: none !important;
}

.center-content.visible {
  opacity: 1;
}

/* セクションタイトル */
.section-title {
  font-size: 24px;
  color: #8c734e;
  margin-bottom: 25px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding-left: 0;
  /* 縦棒があった分の余白を削除 */
}

/* 1. 紹介セクション */
.intro-flex {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.video-preview-large {
  flex: 0 0 37%;
  /* 画面の約1/3に調整 */
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-preview-large img {
  width: 100%;
  height: auto;
  display: block;
}

.play-button-overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  z-index: 2;
  pointer-events: none;
}

.play-button-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.9;
  /* 透けさせる(90%の不透明度) */
}

.intro-text {
  flex: 1;
  /* font-size: 16px; */
  font-size: clamp(11.5px, 1.15vw, 16px);
  line-height: 1.8;
  color: #8c734e;
  /* タイトルと同じ茶色に変更 */
}

/* 2. ムービーグリッド */
.movies-section {
  border-top: 1px solid rgba(140, 115, 78, 0.3);
  /* 透明度を下げてより細く見せる */
  margin-top: 60px;
  /* 線の上にもスペースを追加 */
  padding-top: 60px;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* 6つ並ぶように変更 */
  gap: 30px 12px;
  /* アイテム間の隙間を調整 */
  justify-items: center;
  /* グリッドの各列の中で中央に配置 */
}

.movie-item {
  cursor: pointer;
  max-width: 288px;
  /* 1440 / 5 = 288px */
  width: 100%;
  margin: 0 auto;
  /* 左右中央に配置 */
  text-decoration: none;
  /* 追加 */
  display: block;
  /* 追加 */
}

.movie-thumbnail {
  position: relative;
}

.movie-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  z-index: 2;
  pointer-events: none;
}

.movie-play-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.9;
  /* 透けさせる(90%の不透明度) */
}

.movie-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-item:hover .movie-thumbnail img {
  transform: scale(1.02);
}

.movie-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5px;
}

.movie-caption {
  width: 100%;
  padding: 0 4px;
}

.movie-caption img {
  width: 100%;
  height: auto;
}

/* 3. 新着情報 */
.news-section {
  /* background: rgba(235, 233, 228, 0.8); */
  background: #E5E3DD;
  padding: 40px 50px;
}

.news-flex {
  display: flex;
  gap: 50px;
  align-items: center;
}

.news-header {
  flex: 0 0 130px;
}

.news-badge {
  width: 120px;
  height: 120px;
  border: 5px solid #a8bcc2;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  /* 縦に並べる */
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.news-badge-en {
  font-size: 12px;
  /* 少し大きめに */
  font-weight: bold;
  color: #7CAEE5;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.news-badge-jp {
  font-size: 15px;
  /* 少し小さめに */
  font-weight: 500;
  color: #8c734e;
}

.news-list {
  flex: 1;
  list-style: none;
  /* デフォルトの「・」を消す */
  padding: 0;
  /* デフォルトの余白を消す */
  margin: 0;
}

.news-item {
  display: flex;
  gap: 30px;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 1) !important;
  width: 100%;
}

.news-item:last-child {
  border-bottom: none !important;
}

.news-date {
  font-size: 15px;
  color: #666;
  flex: 0 0 120px;
  /* 幅を 90px から 120px に拡大 */
}

.news-content {
  width: 100%;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.news-content li {
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 1) !important;
}

/* モーダル全体（背景） */
.modal {
  display: none;
  /* JSでflexに切り替える */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  /* 基本は黒背景 */
  z-index: 2000;
  justify-content: center;
  align-items: center;
  /* 上下中央に配置 */
}

/* 詳細表示モード（ベージュ背景・フルページ風） */
.modal.detail-mode {
  background: #E5E3DD;
  align-items: flex-start;
  /* 詳細モードは上端から */
  overflow-y: auto;
  /* 縦スクロールを有効に */
}

.close-modal-btn {
  position: absolute;
  top: 1%;
  right: 1%;
  color: #fff;
  font-size: 50px;
  width: 120px;
  height: 120px;
  text-align: center;
  line-height: 120px;
  cursor: pointer;
  z-index: 2100;
}

@media screen and (max-width: 1024px) {
  .close-modal-btn {
    width: 80px;
    height: 80px;
    line-height: 80px;
  }
}

/* 詳細モード時の閉じるボタン（×）を非表示にする */
.modal.detail-mode .close-modal-btn {
  display: none;
}

/* モーダル内詳細表示用戻るボタン */
.modal-back-button {
  display: none;
  /* 基本は非表示 */
  cursor: pointer;
  height: 40px;
  align-items: center;
  margin-bottom: 0;
  width: fit-content;
}

.modal.detail-mode .modal-back-button {
  display: flex;
  /* 詳細モード時のみ表示 */
}

.modal-back-button img {
  width: 65px;
}

/* 詳細モーダル用コンテンツコンテナ */
.modal-content-container {
  width: 90%;
  max-width: 1200px;
  /* 基本（イントロ用）の幅 */
  margin: 0 auto;
  position: relative;
}

/* イントロモーダル（通常モード）のみ theater に合わせて中央配置 */
.modal:not(.detail-mode) .modal-content-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: auto;
  height: 100%;
  /* 上下中央のため */
}

/* 詳細モード時のコンテナ幅制限 */
.modal.detail-mode .modal-content-container {
  max-width: 1000px;
  padding: 10px 20px 80px;
}

/* イントロモーダル（通常モード）は theater に合わせて横幅制限 */
@media screen and (orientation: landscape) {
  .modal:not(.detail-mode) .modal-content-container {
    width: 70% !important;
  }
}

/* 動画のスタイル */
#bgVideo {
  width: 100%;
  max-width: 1300px;
  height: auto;
  display: block;
}

/* 詳細モード用ベーススタイル */
.movie-detail-content {
  margin-top: 20px;
}

.description-section {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding: 0 20px;
}

.theme-icon {
  flex: 0 0 80px;
  text-align: center;
}

.theme-icon img {
  width: 100%;
  height: auto;
}

.theme-text {
  flex: 1;
}

.theme-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.walkview-section {
  border-top: 1px solid #fff;
  padding-top: 20px;
  padding-left: 10px;
  padding-right: 10px;
}

.walkview-title {
  font-size: 13px;
  color: #555;
  margin-bottom: 15px;
}

.walkview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  justify-items: center;
}

.walkview-item {
  text-decoration: none;
  transition: transform 0.3s;
  width: 100%;
}

.walkview-item:hover {
  transform: scale(1.02);
}

.walkview-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* レスポンシブ調整 */
@media screen and (max-width: 992px) {
  .intro-flex {
    flex-direction: column;
  }

  .intro-text {
    font-size: 14.5px;
  }

  .video-preview-large {
    flex: none;
    width: 100%;
  }

  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .movie-caption {
    width: 80%;
    padding: 0 2px;
  }

  .play-button-overlay {
    width: 20%;
    height: 20%;
  }

  .news-content,
  .news-date {
    font-size: 13px;
  }
}

@media screen and (max-width: 768px) {
  .modal:not(.detail-mode) .modal-content-container {
    width: 95% !important;
    padding: 0;
  }

  .intro-text {
    font-size: clamp(13px, 1.0vw, 14.5px);
  }

  .safe-area-content {
    padding: 0px 15px 40px 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-flex {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* --- モーダル・詳細画面用の設定をここに統合 --- */
  .modal-content-container {
    width: 95%;
    padding: 10px;
  }

  .description-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 0 10px;
  }

  .theme-icon {
    width: 60px;
  }

  .walkview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .section-title {
    font-size: 17px;
  }

  .movies-grid {
    grid-template-columns: 1fr;
  }

  .movie-item {
    max-width: 320px;
  }

  .news-item {
    flex-direction: column;
    gap: 10px;
  }

  /* ニュース項目などの既存スタイル */
  .news-date {
    flex: none;
  }

  .play-button-overlay {
    width: 30%;
    height: 30%;
  }

  .walkview-grid {
    grid-template-columns: 1fr;
  }
}