/* ===========================================
   Cases Section - 活用事例
   =========================================== */

.cases {
  background-color: #FFFFFF;
  padding: 40px 16px 48px;
}

.cases__inner {
  max-width: 343px;
  margin: 0 auto;
}

/* Section Title */
.cases__title {
  text-align: center;
  margin-bottom: 24px;
}

.cases__title h2 {
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  line-height: 1.45;
}

.cases__title-marker { display: none; }

/* Slider wrap */
.cases__slider-wrap {
  margin-bottom: 32px;
  position: relative;
}

.cases__slider {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.cases__slider-track {
  display: flex;
  transition: transform 0.4s ease;
}

/* Slider navigation arrows */
.cases__nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}
.cases__nav-arrow img { width: 100%; height: 100%; }
.cases__nav-arrow--prev { left: -10px; }
.cases__nav-arrow--next { right: -10px; }

.cases__slide {
  flex: 0 0 340px;
  width: 340px;
  box-sizing: border-box;
  padding: 0 10px;
  display: flex;
}

.cases__slide-card {
  background: #FFEEEC;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cases__slide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Slide image with play button - 16:9 ratio */
.cases__slide-image {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background-color: var(--color-gray-light);
}

.cases__slide-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Play button overlay */
.cases__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(216, 46, 46, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cases__play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.cases__slide-body {
  padding: 12px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cases__slide-title-row { display: none; }

.cases__slide-title {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
  letter-spacing: -0.05em;
  margin: 0 0 6px;
}

.cases__slide-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  letter-spacing: -0.05em;
}

/* Dots indicator */
.cases__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cases__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #F5C9C9;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cases__dot.is-active {
  background-color: var(--color-primary);
}

/* ---- YouTube Modal ---- */
.cases__modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.cases__modal.is-open {
  display: flex;
}

.cases__modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.cases__modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
}

.cases__modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.cases__modal-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.cases__modal-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---- Other industries ---- */
.cases__more {
  text-align: center;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  line-height: 1.5;
  margin-bottom: 20px;
}

.cases__more-red {
  color: var(--color-primary);
  background: linear-gradient(transparent 55%, rgba(216, 46, 46, 0.2) 55%);
  padding: 0 2px;
}

/* Tags grid */
.cases__tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cases__tag {
  display: flex;
  align-items: stretch;
  padding: 0;
  background-color: #FFEEEC;
  border: 1px solid #D82E2E;
  border-radius: 6px;
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  line-height: 29px;
  letter-spacing: -0.05em;
  color: var(--color-black);
  min-height: 48px;
  box-sizing: border-box;
  overflow: hidden;
}

.cases__tag-icon {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 6px 0 0 6px;
}
.cases__tag-icon img { width: 32px; height: 32px; object-fit: contain; }

.cases__tag-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-align: center;
}

/* ============================================================
   PC (>=768px)
   ============================================================ */
@media (min-width: 768px) {
  .cases {
    padding: 80px 0 100px;
  }
  .cases__inner {
    max-width: 1760px;
    padding: 0 40px;
  }
  .cases__title {
    margin-bottom: 40px;
  }
  .cases__title h2 {
    font-size: 40px;
  }
  .cases__slider-wrap {
    margin-bottom: 60px;
  }
  .cases__slide {
    flex: 0 0 340px;
    width: 340px;
  }
  .cases__slide-title {
    font-size: 16px;
  }
  .cases__slide-text {
    font-size: 14px;
  }
  .cases__play-btn {
    width: 64px;
    height: 64px;
  }
  .cases__play-btn::after {
    border-width: 12px 0 12px 22px;
  }
  .cases__nav-arrow { width: 60px; height: 60px; }
  .cases__nav-arrow--prev { left: 10px; }
  .cases__nav-arrow--next { right: 10px; }
  .cases__dots { display: none; }
  .cases__more {
    font-size: 36px;
    margin-bottom: 40px;
  }
  .cases__more br { display: none; }
  .cases__tags {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
  }
  .cases__tag {
    font-size: 20px;
    min-height: 80px;
  }
  .cases__tag-icon { width: 80px; }
  .cases__tag-icon img { width: 52px; height: 50px; }
  .cases__tag-text { padding: 10px 16px; }
}
