/* =============================================
   Note Carousel — shared component
   ============================================= */

/* Swiper overrides */
#js-note-carousel {
  overflow: hidden;
  width: 100%;
}

#js-note-carousel .swiper-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
}

/* --- Container --- */
.note-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 108px;
  width: 100%;
  max-width: 100%;
}

.note-carousel__slider-wrap {
  width: 1320px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  padding-bottom: 50px;
}

/* --- Slide width --- */
.note-carousel .swiper-slide {
  height: auto;
}

/* --- Card --- */
.note-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: 1px solid #a0a0a0;
  border-right: 0;
  padding: 40px;
  gap: 70px;
  text-decoration: none;
  color: #000;
  height: 100%;
  box-sizing: border-box;
  transition: background 0.2s;
}

.swiper-slide:last-child .note-card {
  border-right: 1px solid #a0a0a0;
}

.note-card:hover {
  background: transparent;
}

.note-card:focus-visible {
  outline: 2px solid #000;
}

/* --- Card upper --- */
.note-card__upper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.note-card__image {
  width: 100%;
  aspect-ratio: 1280 / 670;
  overflow: hidden;
  background: #ddd;
}

.note-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.note-card__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -0.02em;
  color: #000;
  margin: 0;
}

/* --- Card lower --- */
.note-card__lower {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.note-card__arrow {
  width: 20px;
  height: auto;
}

/* --- Nav buttons --- */
.note-carousel__nav {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1320px;
  max-width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  padding-right: 50px;
  box-sizing: border-box;
}

.note-carousel__btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s;
}

.note-carousel__btn:hover {
  opacity: 0.5;
}

.note-carousel__btn .material-icons {
  font-size: 36px;
  color: #222;
  line-height: 1;
}

.note-carousel__btn--pause .material-icons {
  font-size: 28px;
}

/* --- CTA button --- */
.note-carousel__cta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  border: 1px solid #a0a0a0;
  padding: 12px 28px 11px;
  text-decoration: none;
  color: #000;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.note-carousel__cta--sp {
  display: none;
}

.note-carousel__cta-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 5;
}

.note-carousel__cta-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
}

.note-carousel__cta-icon {
  color: inherit;
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.note-carousel__cta-arrow-wrap {
  position: absolute;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.note-carousel__cta-arrow {
  filter: invert(1);
  transition: transform 0.3s;
}

.note-carousel__cta-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: #000;
  opacity: 0;
  transition:
    width 480ms cubic-bezier(0.19, 1, 0.22, 1),
    opacity 480ms cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 0;
}

.note-carousel__cta:hover .note-carousel__cta-bg {
  width: 100%;
  opacity: 1;
}

.note-carousel__cta:hover {
  color: #fff;
}

.note-carousel__cta:hover .note-carousel__cta-icon {
  opacity: 0;
  transform: translateX(10px);
}

.note-carousel__cta:hover .note-carousel__cta-arrow-wrap {
  opacity: 1;
}

.note-carousel__cta:hover .note-carousel__cta-arrow {
  transform: translateX(10px);
}

/* --- PC: right border for 3rd visible slide --- */
@media (min-width: 769px) {
  .note-carousel__slider-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: calc(100% - 50px);
    background: #a0a0a0;
    z-index: 1;
  }
}

/* --- Responsive --- */

@media (max-width: 1140px) {
  .note-carousel {
    gap: 80px;
  }

  .note-carousel__slider-wrap {
    width: auto;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .note-carousel .swiper-slide {
    width: 342px !important;
  }

  .note-card {
    padding: 30px;
  }

  .note-card__title {
    font-size: 14px;
  }

  .note-carousel__cta-text {
    font-size: 14px;
  }

  .note-carousel__nav {
    padding-right: 0;
  }

  .note-carousel__cta--pc {
    display: none;
  }

  .note-carousel__cta--sp {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .note-carousel {
    gap: 40px;
  }

  .note-carousel .swiper-slide {
    width: calc(100% - 40px) !important;
  }

  .note-card {
    padding: 30px;
    gap: 50px;
  }

  .swiper-slide:last-child .note-card {
    border-right: none;
  }

  .note-card__title {
    font-size: 15px;
  }

  .note-carousel__cta-inner {
    gap: 8px;
    justify-content: center;
  }

  .note-carousel__cta-text {
    font-size: 13px;
  }

  .note-carousel__cta--sp {
    width: 100%;
    padding: 12px 0;
    justify-content: center;
  }
}
