@charset "utf-8";

/* カードタイプ（template_1) */
.plancard {
  margin-bottom:10px;

  /* splideの設定 */
  ul.splide__pagination {
    position: static;
    margin-bottom: 20px;
  }

  .splide__pagination__page {
    height: 10px;
    width: 10px;

    &.is-active {
      background: #FFCA8E;
    }
  }

  /* PCのみ矢印。画像帯の“下端＋少し下”に配置 */
  @media (min-width: 861px) {
    .js-plancard-splide { position: relative; }

    /* 画像帯の中だけに矢印レイヤーを表示（高さ＝ --arrow-band） */
    .js-plancard-splide > .splide__arrows{
      position: absolute;
      left: 0; right: 0; top: 0;
      height: var(--arrow-band, 180px); /* JSでセット済み／なければ180px */
      display: flex;
      align-items: flex-end;            /* ★帯の“下端”に寄せる */
      justify-content: space-between;
      pointer-events: none;             /* 背景クリックを通す */
      z-index: 2;
    }

    .js-plancard-splide .splide__arrow{
      pointer-events: auto;             /* ボタンのみクリック可 */
      width: 36px; height: 36px; border-radius: 9999px;
      background: rgba(255,255,255,.92);
      box-shadow: 0 2px 8px rgba(0,0,0,.12);

      /* ★画像の下に“少しだけ”被らせる量（調整値） */
      transform: translateY(80px);      /* 8〜16pxでお好み調整 */

      /* ★フェード／微縮小のトランジション */
      transition: opacity .25s ease, transform .25s ease;
      opacity:1;
    }

    /* ★進めない側は“スッと”消える */
    .js-plancard-splide .splide__arrow[disabled]{
      opacity:0;
      pointer-events:none;                    /* 念のため */
    }

    /* 必要ならカード内に被らないよう左右も微調整 */
    .js-plancard-splide .splide__arrow--prev{ margin-left: -8px; }
    .js-plancard-splide .splide__arrow--next{ margin-right: -8px; }
  }

  /* アニメを好まない環境配慮 */
  @media (prefers-reduced-motion: reduce){
    .js-plancard-splide .splide__arrow{ transition:none; }
  }

  /* SPでは非表示のまま */
  @media (max-width: 860px){
    .js-plancard-splide > .splide__arrows{ display: none; }
  }

  .plancard__item {
    display: flex;
    flex-direction: column;
    box-shadow: 0px 2px 2px 2px rgb(0 0 0 / 3%);
    gap: 1%;
		border-radius: 10px;
		line-height: 2;
		letter-spacing: 0.05em;
    margin: 15px;

    p.plancard__badge {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 2;
      min-width: 10em;
      border-radius: 20px;
      text-align: center;
      font-size: 0.8em;
      padding: 0 10px;
      color: #fff;
      font-weight: 600;
    }

    &:nth-child(1) {
      p.plancard__badge {
        background: #fbac2f;
      }
    }

    &:nth-child(2) {
      p.plancard__badge {
        background: #fb2f82;
      }
    }

    &:nth-child(3) {
      p.plancard__badge {
        background: #2fd4fb;
      }
    }

    &:nth-child(4) {
      p.plancard__badge {
        background: #2f7ffb;
      }
    }

    .plancard__img {
      overflow-x: hidden;
      border-radius: 5px 5px 0 0;

      img {
        border-radius: 10px 10px 0 0;
      }
    }

    .plancard__title {
      padding: 3px 7px 0;
      word-break: auto-phrase;
      line-height: 1.7;
      height: 45px;

      .plancard__school-link {
        color: #333;
        font-size: 1.6rem;
        font-weight: 600;
        text-decoration: underline;
      }

      .plancard__pref-label {
        display: block;
				font-size: 1.6rem;
        color: #666666;
      }
    }

    .plancard__product {
      text-align: right;
      margin: 7px;
      margin-bottom: 0;

      .plancard__price {
				font-size: 1.8rem;
        font-weight: 600;
        color: #fb6868;

        &::before{
          content: "税込";
          font-size: 0.8em;
          margin-right: 3px;
        }

        &.plancard__price--inquiry-required:before{
          content: none;
        }

        &.plancard__price--discounted {
          font-size: 0.9em;
          font-weight: 600;
          color: #939393;
          text-decoration: line-through;
        }
      }

      .plancard__campaign {
        font-size: 0.9em;
        color: #5f5f5f;
      }
    }

    .plancard__details {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 0.2em 0.7em;
			margin: 5px 7px 10px;
			font-size: 1.45rem;

      & > * {
        display:flex;
        align-items: center;
        gap: 5px;

        &:before{
          content: "";
          display: inline-block;
          width: 1.1em;
          height: 1.1em;
          background-size: cover;
          margin-right: 0.1em;
        }
      }

      .plancard__meal:before {
        background-image: url(/img/common/meal.png);
      }

      .plancard__days{
        flex-basis: 100%;

        &:before {
          background-image: url(/img/common/calendar.png);
        }
      }

      .plancard__plan:before {
        background-image: url(/img/common/room.png);
      }

      .plancard__car-type:before {
        background-image: url(/img/common/car_type.png);
      }

      .room:before {  
        background-image: url(/img/common/house.png);
      }

      .pin:before {
        background-image: url(/img/common/pin.png);
      }
    }

    .plancard__comment {
      color:#666;
      font-size:1.4rem;
      margin: 5px;
    }

    .plancard__cta {
      margin-top: auto;
      text-align: center;

      .plancard__cta-button {
        display: inline-block;
        letter-spacing: 0.03em;
        font-weight: bold;
        cursor: pointer;
        border-radius: 5px;
				margin-bottom: 5px;
				padding-bottom: 5px;
        text-decoration: none;
        text-align: center;
        color: #3ba3b3;
				font-size: 1.8rem;
      }
    }
  }
}

/* --- Splide 基本の守り --- */
.splide .splide__list { 
  display: flex !important; 
  will-change: transform; 
}
.splide .splide__slide { 
  flex-shrink: 0 !important; 
}

/* 等高化の前提：行をstretch */
.js-plancard-splide {

 .splide__list {
    display:flex;
    align-items:stretch; 
  }

  .splide__slide {
    min-height: 0;

    & .plancard__item {
      display: flex;
      flex-direction: column;
      padding-bottom: 10px;
    }
  }

  .plancard__img {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    flex: 0 0 auto; 

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }

  /* SP時のドットを下に配置（被らない＆余白） */
  @media (max-width: 860px) {
    .splide__pagination {
      position: static;
      margin-top: 14px;
      display: flex;
      justify-content: center;
      gap: 8px;
    }
  }
}