@charset "UTF8";

/* Article header */
.article__header {
    padding: 134px 7.6% 64px 7.6%;
}

.worksBox__item--rinnelPC,
.figcaptionPC {
    display: none;
}

.worksBox {
    text-align: center;
    margin-top: 16px;
}

.worksTtlBox {
    padding: 24px 0 40px 0;
}

.worksTtlBox__second {
    padding-top: 0;
}

.worksBox__ttl {
    font-size: 1.4rem;
    line-height: 220%;
}

.btnMoreBox {
    text-align: right;
    margin: 16px 10.6% 0 0;
}

.btnMore:hover {
    opacity: 0.5;
}

/* =========================
   Worksページ コンテンツ アニメーション
   ========================= */

/* キーフレーム定義 */
@keyframes fadeInUpWorksItem {
    from {
      opacity: 0;
      transform: translateY(30px); /* 下からの移動距離 (調整可) */
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* アニメーション対象要素 (.worksBox__item) の初期状態 */
  .worksBox__item {
    opacity: 0; /* 最初は透明にしておく */
  }
  
  /* JSでクラスが付与されたらアニメーションを適用 */
  .worksBox__item.fade-in-visible-works {
    opacity: 1; /* 不透明に戻す */
    animation: fadeInUpWorksItem 0.8s ease-out forwards; /* アニメーション実行 */
  }


/* =========================
works PC
========================= */
@media screen and (min-width: 769px){
    .main {
        padding: 0; /* main要素の共通paddingをリセット */
    }

    .article__header {
        padding: 240px 0 80px 12%;
    }

    .worksTtlBox,
    .worksBox__item--rinnelSP {
        display: none;
    }

    .worksBox__item--rinnelPC {
        display: block;
        margin-top: 40px;
    }

    .worksImg img {
        width: 645px;
        height: 323px;
        object-fit: contain;
    }

    .worksBox {
        padding: 0 0 0 16%;
        position: relative;
        margin-bottom: 300px;
        display: flex; /* worksBoxをflexコンテナに設定 */
        flex-wrap: wrap; /* 項目を折り返す設定 */
        gap: 60px; 
    }

    .workPCset {
        display: block;
    }

    .worksBox__item--homevalPC {
        position: absolute;
        top: 390px;
    }

    /* hover */
    .figcaptionPC {
        display: block;
    }

    .wrap-img-hover {
        position: relative;
        width: 645px;
        height: 323px;
        overflow: hidden;
    }

    .wrap-img-hover--rinnel {
        width: 314px;
        height: 420px;
    }
    
    .wrap-img-hover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .figcaptionPC {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(113, 89, 58, 0.90);

        color: #fff;
        font-size: 1.6rem;
        
        padding: 15px;
        opacity: 0;
        transition: opacity 0.4s ease, transform 0.4s ease;
        transform: translateY(0);
        pointer-events: none;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        flex-direction: column;
    }

    .wrap-img-hover:hover .figcaptionPC {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .line {
        display: block;
        border-bottom: none;
    }

    .wrap-img-hover:hover .line {
        border-bottom: 1px solid #fff; 
    }

    /* footer */
    .scroll-infinity__wrap{
        margin-top: 80px;
    }

    .copy {
        padding: 80px 0 20px 0;
    }

    .contactTxt {
        margin-top: 8px;
    }

} /* PC 769px

/* =========================
   タブレット・PC（縦並び） 769px 〜 1213px
========================= */
@media screen and (min-width: 769px) and (max-width: 1213px) {
    .worksBox {
        /* worksBoxを縦並び（ブロック表示）に変更 */
        display: block;
        padding-left: 0;
        text-align: center;
    }

    .worksBox__item {
        margin: 0 auto 40px;
        /* 中央寄せと下部マージンで項目間の隙間を調整 */
    }

    .worksBox__item--homevalPC {
        /* worksBoxが縦並びになるため、position: absolute; を解除 */
        position: static;
        top: auto;
    }
    
    .worksBox__item--rinnelPC {
        /* rinnelPC の上部マージンを調整 */
        margin-top: 0;
    }

    .worksImg img,
    .wrap-img-hover {
        margin: auto;
    }
}