@charset "UTF-8";

/* =========================================
　 Task (Works) Page Specific Styles
   ========================================= */

/* タイトルスタイル */
#task-title {
    font-family: "WDXL Lubrifont JP N", sans-serif;
    font-size: 5rem;
    text-align: center;
    margin: 50px auto 80px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    letter-spacing: 0.05em;
    border-bottom: 3px solid var(--light-green);
    padding-bottom: 5px;
    width: fit-content;
}

/* 作品カード (Activityの改良版デザインを継承) */
.work-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* 高さを揃える */
    gap: 0;
    max-width: 1200px;
    margin: 0 auto 100px; /* カード間の余白 */
    background: #ffffff;
    border: 2px solid var(---navy); /* 枠線 */
    border-radius: 20px;
    box-shadow: 0 15px 40px -10px rgba(4, 49, 75, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px -10px rgba(4, 49, 75, 0.25);
}

/* 画像エリア */
.work-img {
    flex: 0 0 55%; /* 画像を少し広めに (55%) */
    width: 55%;
    min-height: 400px; /* 高さを確保 */
    position: relative;
    overflow: hidden;
}

.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ホバー時に画像が少しズームする演出 */
.work-card:hover .work-img img {
    transform: scale(1.05);
}

/* テキストコンテンツエリア */
.work-contents {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 作品タイトル */
.work-contents h2 {
    font-family: "WDXL Lubrifont JP N", sans-serif;
    font-size: 2.5rem;
    color: var(---navy);
    margin-bottom: 10px;
    line-height: 1.2;
}
.work-contents a {
    font-family: "M PLUS 1p", sans-serif; 
}

/* カテゴリータグ */
.work-category {
    font-size: 1rem;
    color: var(--green);
    font-weight: bold;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 説明文 */
.work-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

/* リンクボタン */
.btn-link {
    display: inline-block;
    width: fit-content;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(---navy);
    border: 2px solid var(---navy);
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.btn-link:hover {
    color: var(--white);
    background-color: var(---navy);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(4, 49, 75, 0.2);
}

/* =========================================
　  交互レイアウト (Zigzag Layout)
   ========================================= */
/* 偶数番目のカードは画像を右、テキストを左にする */
.work-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* =========================================
　  Smartphone Styles
   ========================================= */
@media screen and (max-width: 768px) {
    #task-title {
        font-size: 3.5rem;
        margin: 40px auto 50px;
    }

    /* スクロールコンテナ（ボタン配置基準） */
    .task-scroll-container {
        position: relative;
    }

    /* 横スクロール設定 */
    .task-scroll-wrapper {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        padding: 10px 5vw 50px; 
        margin-bottom: 50px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        scroll-behavior: smooth;
    }

    /* カードのスタイル（横スクロール用に固定幅にする） */
    .work-card {
        flex: 0 0 85vw; 
        width: 85vw;
        max-width: 85vw;
        margin: 0; 
        scroll-snap-align: center;
        flex-direction: column;
        height: auto;
    }

    /* スマホでも偶数番目の順序を「画像→テキスト」に戻す（画像が上） */
    .work-card:nth-child(even) {
        flex-direction: column;
    }

    .work-img {
        width: 100%;
        height: 250px; 
        min-height: auto;
        flex: none;
    }

    .work-contents {
        padding: 30px 20px;
    }

    .work-contents h2 {
        font-size: 2rem;
    }
}