/**
 * Video Section Block Styles
 *
 * @package PNK_Group
 */

.advantages-video-section {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 4rem auto;
    overflow: hidden;
    padding: 0 var(--spacing-sm, 1rem);
    box-sizing: border-box;
}

.advantages-video-section .container {
    max-width: 1280px !important;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.video-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.video-placeholder {
    background-color: #f5f5f5;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder p {
    color: #999;
    font-style: italic;
    font-size: 1.125rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advantages-video-section {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .video-container {
        padding-bottom: 56.25%; /* Maintain 16:9 aspect ratio */
    }

    .video-title {
        font-size: 2rem;
    }

    .video-placeholder {
        min-height: 200px;
        padding: 2rem 1rem;
    }
}

/* Editor Styles */
.block-editor-block-list__layout .advantages-video-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* ==========================================
   Mute/Unmute Toggle Button
   ========================================== */

.video-container .video-mute-toggle {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    color: white;
}

.video-container .video-mute-toggle:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: white;
    transform: scale(1.1);
}

.video-container .video-mute-toggle:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.video-container .video-mute-toggle svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .video-container .video-mute-toggle {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    .video-container .video-mute-toggle svg {
        width: 20px;
        height: 20px;
    }
}
