/* ================================= */
/* カルーセル記事 */
/* ================================= */
.swiper-area.realme-carousel {
  overflow: hidden;
}
.realme-carousel .swiper {
  overflow: visible;
}
.realme-carousel .swiper.is-swiper-loading {
  opacity: 0;
}
.realme-carousel .swiper.is-swiper-ready {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.realme-carousel .swiper-wrapper {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 8px 0;
}

@media (min-width: 601px) {
  .realme-carousel .swiper-wrapper.grid-pc {
    display: grid;
    align-items: stretch;
    gap: 16px;
    padding: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .realme-carousel .swiper-wrapper.grid-pc .swiper-slide {
    width: 100% !important;
    margin: 0;
    height: 100%;
  }
}

@media (max-width: 1024px) and (min-width: 601px) {
  .realme-carousel .swiper-wrapper.grid-pc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .realme-carousel .swiper-wrapper.grid-sp {
    display: grid;
    align-items: stretch;
    gap: 12px;
    padding: 0;
    grid-template-columns: 1fr;
  }
  .realme-carousel .swiper-wrapper.grid-sp .swiper-slide {
    width: 100% !important;
    margin: 0;
    height: 100%;
  }
}

.realme-carousel .swiper-slide {
  display: flex;
  flex-direction: column;
  height: auto;
}

/* early generic card-derived */
.realme-carousel .swiper-slide .card {
  display: flex;
  flex-direction: column;
  height: fit-content;
  align-self: start;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  text-decoration: none;
  transition: all 0.4s;
  border: 1px solid transparent;
}
.realme-carousel .swiper-slide .card {
  color: #fff;
}

.realme-carousel .swiper-slide .card .info {
  position: relative;
  padding: 12px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border-radius: 0 0 8px 8px;
}

.realme-carousel .swiper-slide .card .info h3 {
  text-decoration: none;
  color: #222222;
}

.realme-carousel .swiper-slide .card .info .tags {
  flex-direction: row;
  flex-wrap: wrap;
  row-gap: 4px;
  column-gap: 8px;
  display: flex;
}
.realme-carousel .swiper-slide .card .info .tags > span {
  color: #222222;
  font-size: 12px;
}
.realme-carousel .swiper-slide .card .info .date {
  color: #c0c0c0;
  font-size: 12px;
}

.realme-carousel .swiper-slide .card .tags span {
  margin-right: 5px;
  font-size: 0.85rem;
}

/* early/mid thumb img copies */
.realme-carousel .swiper-slide .thumb img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.realme-carousel .swiper-slide .thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* late swiper-specific */
.realme-carousel .swiper-slide .card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  overflow: visible;
  border: 2px solid transparent;
  transition: all 0.4s;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.realme-carousel .swiper-slide:hover .card {
  border: 2px solid #00a2af;
}

.realme-carousel .swiper-slide .thumb {
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  position: relative;
}

.realme-carousel .swiper-slide .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #00a3af51;
  pointer-events: none;
  transition: all 0.4s;
  opacity: 0;
  z-index: 1;
}

.realme-carousel .swiper-slide:hover .thumb::before {
  opacity: 1;
}

.realme-carousel .swiper-slide .thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: all 0.4s;
}

.realme-carousel .swiper-slide:hover .thumb img {
  transform: scale(1.1);
  filter: blur();
}

.realme-carousel .swiper-slide .category {
  position: absolute;
  top: 0;
  left: 0;
  /* background: #222222; */
  background-color: #00a2af;
  border-radius: 8px 0 8px 0;
  color: #fff;
  padding: 5px 10px;
  font-size: 14px;
  transition: all 0.4s;
}

.realme-carousel .swiper-slide .card:hover .category,
.realme-carousel .swiper-slide .card:focus .category {
  background-color: #222222;
  border-radius: 4px 0 4px 0;
}

.realme-carousel .swiper-slide:hover .category {
  background-color: #222222;
}

/* rank-label：旧デザイン */
.realme-carousel .swiper-slide .rank-label {
  position: absolute;
  top: -4px;
  right: 12px;
  background: linear-gradient(180deg, #888888, #585858);
  color: #fff;
  padding: 4px 6px 8px;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  gap: 4px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 90%);
}

.realme-carousel .swiper-slide .rank-label.top3 {
  background: linear-gradient(180deg, #4bc4c8, #35a7ab);
}

/* rank-new-label：新デザイン */
.realme-carousel .swiper-slide .rank-new-label {
  position: absolute;
  top: -8px;
  right: -8px;
  color: #fff;
  padding: 4px 6px 8px;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  gap: 4px;
  background-size: contain;
  background-position: top;
  background-repeat: no-repeat;
  width: 40px;
  height: 56px;
}

.realme-carousel .swiper-slide .rank-new-label.top1 {
  background-image: url("https://hr.ababa.co.jp/article/wp-content/uploads/2025/06/rank1.png");
}
.realme-carousel .swiper-slide .rank-new-label.top2 {
  background-image: url("https://hr.ababa.co.jp/article/wp-content/uploads/2025/06/rank2.png");
}
.realme-carousel .swiper-slide .rank-new-label.top3 {
  background-image: url("https://hr.ababa.co.jp/article/wp-content/uploads/2025/06/rank3.png");
}

.realme-carousel .swiper-slide .rank-label > span {
  display: block;
  line-height: 14px;
}

.realme-carousel .swiper-slide .info {
  position: relative;
  background: #fff;
  padding: 10px 12px;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.realme-carousel .swiper-slide .title {
  font-size: 1rem;
  font-weight: bold;
  margin: 5px 0;
  color: #222222;
  transition: all 0.4s;
}

.realme-carousel .swiper-slide:hover .title,
.realme-carousel .swiper-slide:focus .title {
  color: #00a2af;
}

.realme-carousel .swiper-slide .tags span {
  font-size: 0.75rem;
  color: #222222;
  margin-right: 5px;
}

.realme-carousel .swiper-slide .date {
  font-size: 0.75rem;
  color: #aaa;
}

/*
 * SWELL同梱Swiperはナビゲーションボタンに黒背景とpaddingを持つ。
 * 子テーマのカルーセルではborderのみで矢印を描画するため、
 * .realme-carousel 内に限定して親テーマの装飾を正規化する。
 */
.realme-carousel .swiper-button-prev,
.realme-carousel .swiper-button-next {
  position: absolute;
  top: 50%;
  z-index: 10;
  box-sizing: border-box;
  width: 20px !important;
  height: 20px !important;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-top: 3px solid #35a7ab;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}
.realme-carousel .swiper-button-prev {
  left: -24px !important;
  border-left: 3px solid #35a7ab;
  transform: translateY(-50%) rotate(-45deg);
}
.realme-carousel .swiper-button-next {
  right: -24px !important;
  border-right: 3px solid #35a7ab;
  transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 768px) {
  .realme-carousel .swiper-button-prev,
  .realme-carousel .swiper-button-next {
    height: 14px !important;
    width: 14px !important;
  }
  .realme-carousel .swiper-button-prev {
    left: -14px !important;
  }
  .realme-carousel .swiper-button-next {
    right: -14px !important;
  }
  .realme-carousel .swiper-button-prev.manga {
    left: 16px !important;
  }
  .realme-carousel .swiper-button-next.manga {
    right: 16px !important;
  }
}

.realme-carousel .swiper-button-prev::after,
.realme-carousel .swiper-button-next::after {
  content: none !important;
}
