/* --- Section 7: Features (Opt 41-C1 + Staggered Layout) --- */
#section_7 {
    padding: 100px 5%;
    background: #f4f6f9;
    color: #1a1a1a;
    position: relative;
}

.sec7-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.sec7-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.sec7-header p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    font-weight: 700;
}

/* 候補案 (v4.html) のスタッガードレイアウトを完全再現 */
/* 2列スタッガードレイアウトをGridで再構築 */
.sec7-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .sec7-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }
    
    /* 偶数番目（右列に来るカード）を下へオフセット */
    .sec7-card:nth-child(even) {
        margin-top: 100px;
    }
}


/* カードデザイン (Opt 41-C1: BOTTOM GRADIENT) */
.sec7-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1; /* 正方形 */
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    transform: scale(0.95);
    opacity: 0.7;
    cursor: pointer;
}

/* スクロールフォーカス演出 */
.sec7-card.in-focus, .sec7-card:hover {
    transform: scale(1.03);
    opacity: 1;
    /* 元データの色でグローを表現 */
    box-shadow: 0 20px 40px color-mix(in srgb, var(--accent-color) 20%, transparent);
    border: 2px solid var(--accent-color);
    z-index: 10;
}

.sec7-main-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.sec7-card.in-focus .sec7-main-img, .sec7-card:hover .sec7-main-img {
    transform: scale(1.1);
}

/* Opt 41-C1 の核心: ホワイトボトムグラデーション */
.sec7-bottom-grad {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, 
        rgba(255,255,255,1) 0%, 
        rgba(255,255,255,0.9) 30%, 
        rgba(255,255,255,0) 100%
    );
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 25px;
    transition: 0.5s;
}

.sec7-bottom-grad h3 {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 900;
    text-align: center;
    margin: 0;
    color: #1a1a1a;
    transition: 0.5s;
}

/* 再生ボタン (元データのカラーをアクセントに使用) */
.sec7-play-pill {
    font-size: 0.8rem;
    color: #fff;
    background: var(--accent-color);
    padding: 8px 18px;
    border-radius: 30px;
    margin-top: 12px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--accent-color) 40%, transparent);
}

.sec7-card.in-focus .sec7-play-pill, .sec7-card:hover .sec7-play-pill {
    opacity: 1;
    transform: translateY(0);
}

/* --- スマートフォン対応 --- */
@media (max-width: 767px) {
    #section_7 {
        padding: 60px 5%;
    }
    .sec7-header {
        margin-bottom: 40px;
    }
    .sec7-container {
        gap: 30px; /* 余白を広げて重なり感を解消 */
    }
    .sec7-column {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    .sec7-card {
        transform: scale(1); /* スマホでは初期状態で縮小させない */
        opacity: 1; /* スマホでは最初から全表示（スクロール追従が難しいため） */
        border-radius: 16px;
    }
    .sec7-card.in-focus, .sec7-card:hover {
        transform: scale(1.02); /* 拡大率を抑える */
    }
}

/* --- YouTube Modal --- */
.sec7-youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.sec7-youtube-modal.active {
    visibility: visible;
    opacity: 1;
}

.sec7-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.sec7-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    z-index: 2;
}

.sec7-video-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.sec7-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.sec7-close-modal {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}
