/* CSS custom cho homepage (video container) */
.hero-video-container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    min-width: 340px;
    flex: 1 1 0%;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    pointer-events: auto; /* Đảm bảo nhận touch events */
    touch-action: manipulation; /* Tối ưu cho touch */
}

/* Video controls */
.video-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.autoplay-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.autoplay-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.autoplay-btn.active {
    background: rgba(16, 185, 129, 0.9);
    border-color: rgba(16, 185, 129, 0.5);
}

.autoplay-btn i {
    font-size: 0.9rem;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .hero-video-container {
        max-width: 100%;
        min-width: auto;
        margin-left: 0;
        margin-top: 20px;
        order: 2; /* Đưa video xuống dưới text */
    }
    
    .video-wrapper {
        padding-bottom: 56.25%; /* Giữ tỷ lệ 16:9 trên mobile */
    }
    
    .video-controls {
        top: 8px;
        right: 8px;
    }
    
    .autoplay-btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
    
    .autoplay-btn span {
        display: none; /* Ẩn text trên mobile, chỉ hiện icon */
    }
    
    .autoplay-btn i {
        font-size: 0.8rem;
    }
}
