body {
    margin: 0;
    font-family: sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrollbar due to video overflow */
}

.video-background {
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide overflowing parts of the video */
    background-color: black; /* Fallback background color */
    /* ここにサイズを定義 */
}

#youtube-player {
    position: absolute;
    /* transform: translate(-50%, -50%); はこの方法では不要になることがあります */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 動画へのマウスイベントを無効にする（背景として重要） */
}

/* PC View Styles */
@media (min-width: 769px) {
    .video-background {
        height: 800px; /* PCでは高さ800px固定 */
    }

    #youtube-player {
        /* PC: 横幅100%に拡大し、高さを16:9で計算し、上下をトリミング */
        /* コンテナの幅を基準に動画の縦横比を維持し、高さを計算 */
        /* 幅は必ず100%になるため、高さがはみ出ることで上下が切れる */
        width: 100%;
        height: calc(100vw / (16 / 9)); /* 画面幅を基準に16:9の高さを計算 */
        min-height: 800px; /* コンテナの最小高さを保証 */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Smartphone View Styles */
@media (max-width: 768px) {
    .video-background {
        padding-top: 100%; /* 横幅100%に対して高さも同じピクセルで表示（正方形） */
        height: 0;
    }

    #youtube-player {
        /* SP: 動画の縦をコンテナの高さに固定して拡大し、横部分をトリミング */
        /* コンテナの高さに動画の高さを合わせる */
        height: 100%;
        width: calc(100vh * (16 / 9)); /* コンテナの高さを基準に16:9の幅を計算 */
        min-width: 100%; /* コンテナの最小幅を保証 */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.content {
    padding: 20px;
    background-color: white;
    position: relative;
    z-index: 1; /* Ensure content is above the video */
}

.youtube-player-button-sp {
    position: absolute;
    color: #FFF; font-weight: bold;
    background-color: dodgerblue;
    display: inline-block;
    line-height: 1;
}
@media (min-width: 769px) {
    /* for PC */
    .youtube-player-button-sp {
        display: none;
    }
}
@media (max-width: 768px) {
    /* for SP */
    .youtube-player-button-sp {
        bottom: 5px; left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        font-size: 13px;
        padding: 5px 5px 7px 5px;
        border-radius: 5px;
        box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.35);
        text-align: center;
    }
}

.youtube-player-button-pc {
    position: absolute;
    display: inline-block;
    line-height: 1;
}
@media (min-width: 769px) {
    /* for PC */
    .youtube-player-button-pc { bottom: 15px; left: 15px; }
    .youtube-player-button-pc img { width: 210px; }
}
@media (max-width: 768px) {
    /* for SP */
    .youtube-player-button-pc {
        display: none;
    }
}


.btmArea-ver2 { line-height: 1; }
@media (min-width: 769px) {
    /* for PC */
    .btmArea-ver2 { background: url(../img/btm_bnr_bg.jpg) no-repeat center center / cover; }
}
/* PC（デフォルト）のスタイル */
.btmArea-ver2 img { max-width: 100%; }
.btmArea-ver2 .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 1190px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 30px 0px 30px 0px;
}

.btmArea-ver2 .item {
    flex-grow: 1; 
    flex-shrink: 1; 
    width: 220px; 
    max-width: 220px;
    height: 220px;
    background-color: #f0f0f0;
    /*border: 1px solid #aaa;*/
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* スマートフォン用のスタイル（メディアクエリ） */
/* 画面幅が768px以下の場合に適用 */
@media (max-width: 768px) {
    .btmArea-ver2 { padding: 25px 15px 25px 15px; background: #f0f0f0; }
    .btmArea-ver2 .container {
        gap: 10px; 
        width: 100%; 
        padding: 0;
    }

    .btmArea-ver2 .item {
        width: 30%;
        min-width: 30%; 
        max-width: 32%;
        height: auto; 
    }
}