@charset "UTF-8";

/* ======================
 * === 左側の一覧エリア ===
 * ======================*/
.content {
  width: 50%;
  border-right: 2px solid #000;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding-top: 60px;
  background-color: #1E88E5;
}

.content h2 {
  color: white;
  text-align: center;
  margin: 0;
  /* background-color: #1565C0; */
  /* font-weight: normal; */
}

.content-area {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;

  /* Firefox用*/
  scrollbar-width: none;
  /* IE/Edge用 */
  -ms-overflow-style: none;
}

.content-area::-webkit-scrollbar {
  /* Chrome/Safari用 */
  display: none;
}

.card {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 200px));
  gap: 10px;
}

.card-item {
  border: 1px solid #ccc;
  /* padding: 10px; */
  cursor: pointer;
  padding: 5px;
  background-color: #fff;
  user-select: none;
}

.card-item h3 {
  /* height: 30px;
  overflow: hidden;
  text-overflow: ellipsis; */
  display: none;
}

.card-item:hover {
  background-color: #f3f3f3;
}

.card-item img {
  width: 100%;
  height: auto;
  pointer-events: none;
  margin: 0 auto;
}

.active {
  border: 3px solid #26A69A;
}

/* ============================
 * === カスタムスクロールバー ===
 * ============================*/
/* スクロールバー本体 */
.custom-bar {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 0;
}

.custom-bar:hover {
  opacity: 0.8;
}

/* スクロールバーの余白 */
.custom-track {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  background: #3988ce;
  z-index: 10;
  border-left: #1c7bce 1px solid;
}

/* ==========================
 * === 右側の詳細説明エリア ===
 * ==========================*/
.description-area {
  width: 100%;
  padding: 20px;
  padding-top: 60px;
  box-sizing: border-box;
  overflow-y: auto;
  position: relative;
}

/* ==========================
 * === カルーセル ===
 * ==========================*/
.carousel-container {
  position: relative;
  max-width: 90%;
  margin: 0 auto 20px auto;
  margin-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  height: auto;
  max-height: 450px;
  max-width: 100%;
  width: fit-content;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
  cursor: pointer;

  border: 1px solid #ccc;
}

/* スライドアニメーション */
.carousel-image.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.carousel-image.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}

.carousel-image.slide-in-left {
  transition: none;
  transform: translateX(-100%);
  opacity: 0;
}

.carousel-image.slide-in-right {
  transition: none;
  transform: translateX(100%);
  opacity: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  z-index: 10;
  user-select: none;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn-prev {
  left: -60px;
}

.carousel-btn-next {
  right: -60px;
}

.carousel-dots {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  overflow: scroll;

  /* スクロールバー非表示 */
  scrollbar-width: none;
  /* Firefox用*/
  -ms-overflow-style: none;
  /* IE/Edge用 */
}

/* ミニ画像 */
.carousel-thumbnail {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #ccc;
  opacity: 0.6;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.carousel-thumbnail:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.carousel-thumbnail.active {
  border-color: #26A69A;
  opacity: 1;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dot.active {
  background-color: #26A69A;
}

.description-area img {
  /* height: auto; */
  max-height: 450px;
  max-width: 90%;
  width: fit-content;
  display: block;
  margin: 0 auto 20px auto;
}

#title {
  font-size: 2rem;
}

#title::before {
  /* 文字の左側にいい感じのデザイン */
  content: "";
  display: inline-block;
  width: 6px;
  height: 100%;
  background-color: #26A69A;
}

#author {
  margin-bottom: 20px;
  color: #555;
  width: fit-content;
  border-bottom: 1px solid #ccc;
}

hr {
  border: 1px dashed #ccc;
  margin: 2rem 0;
}

.video-container {
  width: 80%;
  margin: 0 auto 20px auto;
}

.video-container iframe {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
}

/* =========================
 * === 高画質画像モーダル ===
 * ==========================*/
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 95vw;
  height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 1001;
  pointer-events: none;
}

.modal-close {
  display: none;
}

.modal-image {
  max-width: 95%;
  max-height: calc(95vh - 100px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  z-index: 1010;
  pointer-events: auto;
}

.modal-thumbnails {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 100%;
  pointer-events: auto;
}

.modal-thumbnail {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.3);
  opacity: 0.6;
  transition: opacity 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.modal-thumbnail:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.modal-thumbnail.active {
  border-color: #26A69A;
  opacity: 1;
}

/* =========================
 * === ページめくりボタン ===
 * =========================*/
/* .move-buttons {
  position: absolute;
  bottom: 20px;
  width: calc(100% - 40px);
  display: none;
  justify-content: space-between;
  margin-top: 20px;
}

.preview-button,
.next-button {
  padding: 10px 20px;
  background-color: #647ea1;
  color: white;
  cursor: pointer;
  text-align: center;
  border-radius: 5px;
  transition: 200ms;
}

.preview-button:hover,
.next-button:hover {
  scale: 1.05;
  opacity: 0.8;
  transition: 200ms;
} */

/* =========================
 * === レスポンシブ対応 ===
 * =========================*/

@media screen and (max-width: 1024px) {
  .content {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  .content-area hr {
    display: none;
  }

  .card {
    grid-template-columns: repeat(2, 1fr);
  }


  .description-area {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .content {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  .content-area {
    padding: 15px;
  }

  .description-area {
    padding: 15px;
  }

  .card {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }



  #title {
    font-size: 1.5rem;
  }

  .description-area img {
    max-height: 300px;
    max-width: 100%;
  }

  .video-container {
    width: 100%;
  }

}

@media screen and (max-width: 480px) {
  .content {
    width: 100%;
    padding-top: 50px;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  .content-area {
    padding: 10px;
  }

  .description-area {
    padding: 10px;
    padding-top: 50px;
    margin-top: 60px;
  }

  .card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card-item {
    padding: 8px;
  }

  #title {
    font-size: 1.2rem;
  }

  #title::before {
    width: 4px;
  }

  #author {
    margin-bottom: 15px;
    font-size: 0.9rem;
  }

  .description-area img {
    max-height: 250px;
  }

  .video-container::before {
    font-size: 1rem;
  }

  hr {
    margin: 1.5rem 0;
  }

  .carousel-btn {
    display: none;
  }

  .carousel-dots {
    width: 80%;
  }

  .modal-thumbnails img {
    width: 80px;
    /* height: 45px; */
    height: auto;
  }

  .content .custom-bar {
    display: none;
    width: 0;
    height: 0;
  }

  .content .custom-bar.active {
    display: none;
    width: 0;
    height: 0;
  }
}
