/* スライダーコンテナ */
.slider-container {
  position: relative;
  width: 300px;
  height: 350px;
}

/* スライド */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #b9a786 0%, #d1c3a2 100%);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .25);
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, .3));
  text-align: center;
  transform-origin: center;
  transition: transform 0.4s ease, opacity 0.2s ease;
  padding: 5px;
  box-sizing: border-box;
}

/* スライドの後ろにぼかし効果 */
.slide::after {
  position: absolute;
  content: "";
  inset: 0;
  border: 3px solid #362004;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1000;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #362004;
  pointer-events: none;
  filter: blur(5px);
}

/* ヘッダー */
.slide h2 {
  font-size: xx-large;
  font-weight: bold;
  margin: 10px 0 5px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  border-bottom: 2px dotted #362004;
  padding-bottom: 5px;
}

/* サムネイル画像 */
.thumbnail {
  width: 95%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 10px 0;
  mask-image: radial-gradient(farthest-corner, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: radial-gradient(farthest-corner, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
}

/* 説明文 */
.slide p {
  font-size: small;
  font-weight: bold;
  margin: 10px 0;
  line-height: 1.5;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

/* リンクボタン */
.slide a {
  text-decoration: none;
  background: #362004;
  color: #b9a786;
  font-size: medium;
  font-weight: bold;
  padding: 1px 20px;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: background-color 0.3s;
  border-style: double none;
  border-width: 5px 0;
  border-color: #5a3d28;
  display: inline-block;
  /* クリップが安定 */
  --cut: max(8px, 0.6em);
  /* 角落とし量（好きに） */
  clip-path: polygon(var(--cut) 0,
      calc(100% - var(--cut)) 0,
      100% var(--cut),
      100% calc(100% - var(--cut)),
      calc(100% - var(--cut)) 100%,
      var(--cut) 100%,
      0 calc(100% - var(--cut)),
      0 var(--cut));
}

.slide a:hover {
  background-color: #5a3d28;
}

.tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.tag {
  font-size: xx-small;
  font-weight: normal;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

/* ページネーション */
.pagination {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pagination-dot {
  width: 8px;
  height: 16px;
  border-radius: 9999px;
  background-color: #F4F1EC;
  opacity: 0.6;
  transition: background-color 0.3s, opacity 0.3s;
}

.pagination-dot.active {
  background-color: #362004;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .slider-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
    position: relative;
  }

  .slider-container> :nth-child(n + 4) {
    display: none;
  }

  /* 各スライドを通常のカード風に配置 */
  .slide {
    position: relative;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    transition: none;
  }

  /* ページネーションを非表示（または横向きに変更） */
  .pagination {
    display: none;
  }
}