/*
Theme Name: My Media OnePage Theme
Author: AI Assistant
Description: メディア事業向け、スクロール連動背景＆左右スライドイン＆動画対応レスポンシブOneページテーマ。
Version: 5.0
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #0b0f19;
    color: #ffffff;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}

/* 固定背景用のオーバーレイ */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3) blur(2px);
    transition: background-image 1s ease-in-out;
}

/* 5つのセクションのレイアウト */
.media-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 4%;
    position: relative;
}

.section-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5%;
}

/* 偶数番目は左右反転（PC用） */
.media-section:nth-child(even) .section-container {
    flex-direction: row-reverse;
}

.section-visual, .section-content {
    flex: 1;
    width: 100%;
}

/* レスポンシブ動画プレイヤー（16:9） */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 25px;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-visual img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #a0aec0;
}

/* アニメーション初期設定（画面外） */
.media-section:nth-child(odd) .section-visual {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.media-section:nth-child(even) .section-visual {
    opacity: 0;
    transform: translateX(60px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.section-content {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1) 0.3s;
}

/* 画面内に入ったとき（アクティブ状態） */
.media-section.is-active .section-visual {
    opacity: 1;
    transform: translateX(0);
}
.media-section.is-active .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* モバイル最適化（スマホ・タブレット用） */
@media (max-width: 968px) {
    .section-container, 
    .media-section:nth-child(even) .section-container {
        flex-direction: column;
        gap: 30px;
    }
    .section-content h2 {
        font-size: 1.8rem;
    }
    .media-section:nth-child(odd) .section-visual,
    .media-section:nth-child(even) .section-visual {
        transform: translateY(30px);
    }
}
