/*
 Theme Name:   VideoPro Child
 Template:     videopro
*/

/* 整體容器 */
.single-post-content {
    max-width: 1920px;
    margin: 0 auto;
    overflow: hidden;
}

/* 播放器和廣告的包裹容器 */
.video-and-recommended {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 10px;
    margin-top: 20px; /* 與頂部菜單的間距設為 20px */
}

/* 播放器區域 */
.cactus-post-format-video-wrapper {
    flex: 0 0 60%;
    position: relative;
}

.flowplayer {
    border: 2px solid red; /* 測試邊框 */
    margin-bottom: 0 !important; /* 移除播放器底部間距 */
}

/* 播放器下方的廣告 */
.ad-below-player {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* 廣告區域 */
.recommended-videos {
    flex: 0 0 40%;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: auto;
    align-items: center;
}

.ad-section {
    width: 300px;
    height: 250px;
    overflow: hidden;
}

/* 覆蓋廣告的內聯樣式 */
#gg300 {
    width: 300px !important;
    height: 250px !important;
}

/* 移除頂部空白（僅針對特定元素） */
#cactus-body-container,
.cactus-container,
.cactus-row {
    margin-top: 0;
    padding-top: 0;
}

/* 減小下方元素的頂部間距 */
.cactus-single-content > *:not(.video-and-recommended) {
    margin-top: 10px !important;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .video-and-recommended {
        flex-direction: column;
        margin-top: 0;
    }
    .cactus-post-format-video-wrapper,
    .recommended-videos {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        height: auto;
    }
    .ad-section {
        width: 100%;
        height: auto;
    }
    #gg300 {
        width: 100% !important;
        height: auto !important;
    }

    /* 隱藏 .cactus-nav-left */
    .cactus-nav-left {
        display: none !important;
    }
}