@charset "utf-8";

/* =========================================================
   メイン領域の配置（固定ヘッダーとの余白調整）
========================================================= */
#works #main {
    width: 100vw;
    position: relative;
    top: 5vw;
    box-sizing: border-box;
    padding-bottom: 8vw;
}

@media (max-width: 900px) {
    #works #main {
        top: 40px;
        padding-bottom: 60px;
    }
}

/* 見出しのスタイル調整 */
#works .headline {
    color: #222;
}

#works .headline_ja {
    text-align: center;
    font-size: 1.37vw;
    letter-spacing: 0.3em;
    color: #666;
    margin-bottom: 4vw;
}

@media (max-width: 900px) {
    #works .headline_ja {
        font-size: 4vw;
        margin-bottom: 30px;
    }
}

/* =========================================================
   PC版レイアウト（.PC: 901px以上）
========================================================= */
.PC {
    display: block;
    width: 80vw;
    max-width: 1100px;
    margin: 0 auto;
}
.SP {
    display: none;
}

.PC .movie {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.PC .movie .img {
    position: relative;
    width: 450px;
    height: 300px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.PC .movie .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* 画像ホバー時の明るさ調整用クラス */
.PC .movie .img img.brightness {
    filter: brightness(0.4);
    transform: scale(1.03);
}

/* ホバーで現れるオーバーレイマスク */
.PC .mask1,
.PC .mask2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    transition: opacity 0.3s ease;
}

.PC .mask1 h3,
.PC .mask2 h3 {
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.05em;
    text-align: left;
}

/* マスク内ボタン */
.PC .mask1 button,
.PC .mask2 button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 24px;
    background: #1aa170;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Roboto Slab', serif;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, transform 0.2s;
}

.PC .mask1 button:hover,
.PC .mask2 button:hover {
    background: #158058;
    transform: translateY(-2px);
}

/* =========================================================
   スマホ版レイアウト（.SP: 900px以下）
========================================================= */
@media (max-width: 900px) {
    .PC {
        display: none;
    }
    .SP {
        display: block;
        width: 90vw;
        margin: 0 auto;
    }

    .SP .movie_wrap {
        display: flex;
        flex-direction: column;
        gap: 35px;
    }

    .SP .movie {
        background: #fff;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    }

    .SP .movie .img {
        width: 100%;
        height: 200px;
        overflow: hidden;
        background: #000;
    }

    .SP .movie .img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* キャプション部分 */
    .SP .caption {
        padding: 20px 16px;
        position: relative;
    }

    .SP .caption .button a {
        display: inline-block;
        padding: 5px 16px;
        background: #1aa170;
        color: #fff;
        font-family: 'Roboto Slab', serif;
        font-size: 11px;
        letter-spacing: 0.08em;
        border-radius: 15px;
        margin-bottom: 12px;
    }

    .SP .caption h4 {
        font-size: 12px;
        font-weight: normal;
        color: #666;
        margin-bottom: 6px;
    }

    .SP .caption h4 .gray {
        font-family: 'Roboto Slab', serif;
        font-weight: 700;
        color: #1aa170;
    }

    .SP .caption h2 {
        font-size: 18px;
        font-weight: 700;
        color: #222;
        margin-bottom: 12px;
    }

    /* あらすじテキスト（折りたたみ設定） */
    .SP .caption .text {
        font-size: 13px;
        line-height: 1.8;
        color: #444;
        position: relative;
        max-height: 4.8em; /* 初期状態は約3行分のみ表示 */
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    /* jQuery で付与される展開クラス */
    .SP .caption .text.textopen {
        max-height: 1000px;
    }

    /* 「READ MORE」 / 「▲」 ボタン */
    .SP .more,
    .SP .close {
        display: block;
        font-family: 'Roboto Slab', serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.1em;
        color: #1aa170;
        margin-top: 10px;
        cursor: pointer;
        text-align: right;
    }

    .SP .close {
        display: none; /* 初期状態は非表示 */
    }
}