/* Works Page Specific Styles */

/* -----------------------------------------------------------
   Swiper (Carousel) Customization
----------------------------------------------------------- */
.works-swiper {
    width: 100%;
    padding-bottom: 50px;
    padding-top: 100px;
    overflow: visible;
    position: relative;
    z-index: 0;
}

.works-swiper-container {
    overflow: hidden;
}

@media (min-width: 768px) {
    .works-swiper .swiper-slide {
        width: 700px;
    }
}

.works-swiper .swiper-wrapper {
    /* アイテムの垂直方向の並びを中央揃えに */
    align-items: center;
}

.works-swiper .swiper-slide {
    /* 16:9のアスペクト比を維持するための設定 */
    aspect-ratio: 16 / 9; 
    
    /* 非アクティブ時のスタイル */
    opacity: 0.4;
    transition: all 0.3s ease;
    transform: scale(0.9);
    
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding-left: 20px;
    padding-right: 20px;
}

/* 画像の高さをスライドに合わせて埋める */
.works-swiper .slide-content {
    width: 100%;
    height: 100%;
}

.works-swiper .slide-content img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠に合わせてトリミング */
    display: block;
}

/* アクティブなスライドのスタイル */
.works-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    cursor: default;
}

/* PC時のスライド幅調整 */
@media (min-width: 768px) {
    .works-swiper .swiper-slide {
        transform: scale(0.85);
    }
    .works-swiper .swiper-slide-active {
        transform: scale(1);
    }
}

/* ナビゲーションボタンの色調整 */
.swiper-button-next,
.swiper-button-prev {
    --swiper-navigation-color: #B76300;
    color: #B76300; 
    background-color: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(2px);
}

/* PC: スクロールで固定に切り替え */
@media (min-width: 576px) {
    .swiper-button-next.fixed,
    .swiper-button-prev.fixed {
        position: fixed !important;
        top: 50% !important;
        transform: translateY(-50%);
        z-index: 9999;
    }
    .swiper-button-prev.fixed {
        left: 20px !important;
    }
    .swiper-button-next.fixed {
        right: 20px !important;
    }
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background-color: #B76300;
}

/* -----------------------------------------------------------
   Description Area (Floating Layout)
----------------------------------------------------------- */
.work-description-container {
    background-color: #fff;
    padding: 2rem 0; 
    border-top: 1px solid #eee;
    min-height: 300px;
    transition: opacity 0.3s ease-in-out;
}

.work-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: bold;
    color: #333;
    margin-top: 0;
}

.work-body {
    font-family: 游ゴシック, 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: #707070;
    white-space: pre-wrap;
    text-align: justify;
}

.work-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: #B76300;
    border: 1px solid #B76300;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 回り込みレイアウト */
.work-logo-wrapper {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
    width: 150px;
    height: auto;
    text-align: right;
}

.work-client-logo {
    width: 100%;
    height: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Clearfix for float layout */
.work-description-container::after {
    content: "";
    display: block;
    clear: both;
}

@media (max-width: 576px) {
    .work-logo-wrapper {
        width: 100px;
        margin-left: 1rem;
    }
}

.fade-out {
    opacity: 0;
}