/* ============================================
   YouTube Video Enhancement
   Phóng to video YouTube để không bị trống trải
   ============================================ */

/* Container chính cho video YouTube */
.rom-content-wrapper .WIdY2d {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem auto !important;
    padding: 0 !important;
}

/* Video container với aspect ratio responsive */
.rom-content-wrapper .M1aSXe {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 56.25% !important; /* 16:9 aspect ratio - chuẩn YouTube */
    height: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    margin: 0 !important;
}

/* Padding div bên trong - override inline style */
.rom-content-wrapper .M1aSXe div[jsname="WXxXjd"] {
    padding-top: 0 !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* YouTube iframe - full size */
.rom-content-wrapper iframe.YMEQtf,
.rom-content-wrapper iframe[src*="youtube.com"],
.rom-content-wrapper iframe[src*="youtu.be"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 12px !important;
}

/* Video section wrapper - đảm bảo không bị giới hạn */
.rom-content-wrapper section[class*="yaqOZd"] {
    width: 100%;
    max-width: 100%;
}

.rom-content-wrapper section[class*="yaqOZd"] .WIdY2d {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2.5rem 0 !important;
}

/* Đảm bảo video không bị tràn */
.rom-content-wrapper {
    overflow-x: hidden;
}

.page-content {
    overflow-x: hidden;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .rom-content-wrapper .M1aSXe {
        padding-top: 56.25% !important;
        margin: 1.5rem 0 !important;
        border-radius: 8px !important;
    }
    
    .rom-content-wrapper section[class*="yaqOZd"] .WIdY2d {
        margin: 1.5rem 0 !important;
    }
}

/* Responsive cho tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .rom-content-wrapper .M1aSXe {
        padding-top: 56.25% !important;
        margin: 2rem 0 !important;
    }
    
    .rom-content-wrapper section[class*="yaqOZd"] .WIdY2d {
        margin: 2rem 0 !important;
    }
}

/* Desktop - tối đa kích thước nhưng không tràn */
@media (min-width: 1025px) {
    .rom-content-wrapper .M1aSXe {
        padding-top: 56.25% !important;
        margin: 2.5rem 0 !important;
        max-width: 100% !important;
    }
    
    .rom-content-wrapper section[class*="yaqOZd"] .WIdY2d {
        margin: 2.5rem 0 !important;
    }
}

/* Tối ưu cho video container trong các section khác */
.rom-content-wrapper .OWlOyc .WIdY2d,
.rom-content-wrapper .OWlOyc .M1aSXe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Video wrapper trong bất kỳ section nào */
.rom-content-wrapper section .WIdY2d,
.rom-content-wrapper section .M1aSXe {
    width: 100% !important;
    max-width: 100% !important;
}

/* Đảm bảo video container không bị giới hạn bởi parent */
.rom-content-wrapper .tyJCtd .WIdY2d,
.rom-content-wrapper .tyJCtd .M1aSXe {
    width: 100% !important;
    max-width: 100% !important;
}

