/* ==========================================
   PROMO VIDEO PLAYER STYLES
   Modern, minimalistic design with glassmorphism
   ========================================== */

/* Video Section Container */
.promo_video_section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    /* background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%); */
    position: relative;
    overflow: hidden;
}

.promo_video_section .video-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Video Player Wrapper */
.video-player-wrapper {
    position: relative;
    width: min(35vw, 35vh);
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: #000000;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Local CSS variables for responsive sizing */
    --vp-control-btn-size: clamp(28px, 4vw, 36px);
    --vp-control-icon-size: clamp(14px, 2.2vw, 18px);
    --vp-control-padding: clamp(6px, 1.2vw, 8px);
    --vp-progress-height: clamp(4px, 0.5vh, 6px);
    --vp-play-button-size: clamp(64px, 8vw, 100px);
}

.video-player-wrapper:hover {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Video Element */
.promo-video {
    width: 100%;
    height: 100%;
    display: block;
    /* aspect-ratio: 16 / 9; */
    background: #000000;
}

/* Video Overlay (Initial State) */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 2;
}

.video-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Play Button */
.play-button-wrapper {
    position: relative;
}

.play-button {
    width: var(--vp-play-button-size);
    height: var(--vp-play-button-size);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.play-button::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.play-button:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.play-button:active {
    transform: scale(1.05);
}

.play-icon {
    width: clamp(24px, 3.6vw, 40px);
    height: clamp(24px, 3.6vw, 40px);
    color: #ffffff;
    margin-left: 4px;
    /* Optical alignment */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon svg {
    width: 100%;
    height: 100%;
}

/* Custom Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: clamp(10px, 2vw, 20px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
}

.video-player-wrapper:hover .video-controls,
.video-controls.show {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: var(--vp-progress-height);
    /* increase vertical padding to improve touch target on mobile while keeping visible height small */
    /* padding: clamp(6px, 1.2vh, 10px) 0; */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.progress-bar:hover {
    height: calc(var(--vp-progress-height) + 2px);
}

.progress-filled {
    height: var(--vp-progress-height);
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.progress-filled::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(8px, 1.8vw, 12px);
    height: clamp(8px, 1.8vw, 12px);
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover .progress-filled::after {
    opacity: 1;
}

/* Controls Bottom Row */
.controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 1.6vw, 12px);
    flex-wrap: wrap;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 12px);
    flex: 1 1 auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #ffffff;
    font-size: var(--vp-control-icon-size);
    cursor: pointer;
    padding: var(--vp-control-padding);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: var(--vp-control-btn-size);
    height: var(--vp-control-btn-size);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

/* Time Display */
.time-display {
    color: #ffffff;
    font-size: clamp(11px, 1.4vw, 14px);
    font-weight: 500;
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
    user-select: none;
}



/* Loading State */
.video-player-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 4;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .promo_video_section {
        padding: 60px 16px;
    }

    .promo_video_section .subtitle {
        margin-bottom: 2rem;
    }

    .video-player-wrapper {
        border-radius: 16px;
    }

    :root .video-player-wrapper {
        --vp-play-button-size: clamp(48px, 12vw, 80px);
        --vp-control-btn-size: clamp(26px, 4.6vw, 32px);
        --vp-control-icon-size: clamp(12px, 2.2vw, 16px);
        --vp-control-padding: clamp(4px, 1.2vw, 6px);
        --vp-progress-height: 4px;
    }

    .video-controls {
        padding: 10px 12px;
    }

    .control-btn {
        font-size: var(--vp-control-icon-size);
        width: var(--vp-control-btn-size);
        height: var(--vp-control-btn-size);
        padding: var(--vp-control-padding);
    }

    .time-display {
        font-size: 12px;
    }

    .progress-bar {
        height: 4px;
        margin-bottom: 8px;
    }

    .progress-bar:hover {
        height: 6px;
    }
}

/* Fullscreen Styles */
.video-player-wrapper:fullscreen {
    max-width: 100vw;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    width: 100%;
    height: 100%;
}

.video-player-wrapper:-webkit-full-screen {
    max-width: 100vw;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    width: 100%;
    height: 100%;
}

.video-player-wrapper:-moz-full-screen {
    max-width: 100vw;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    width: 100%;
    height: 100%;
}

.video-player-wrapper:fullscreen .promo-video,
.video-player-wrapper:-webkit-full-screen .promo-video,
.video-player-wrapper:-moz-full-screen .promo-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Smooth Scroll Integration */
.promo_video_section {
    opacity: 0;
    transform: translateY(30px);
}

.promo_video_section.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Extra small devices: reduce controls and hide time text to save space */
@media (max-width: 550px) {
    .video-player-wrapper {
        width: 95vw;
        --vp-play-button-size: 54px;
        --vp-control-btn-size: 24px;
        --vp-control-icon-size: 12px;
        --vp-control-padding: 4px;
        --vp-progress-height: 4px;
    }

    /* Move fullscreen button into its own line if it wraps */
    .controls-bottom > #fullscreenBtn {
        margin-left: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 200px) {
    /* Hide time on very small devices to avoid overflow */
    .time-display {
        display: none;
    }
}

/* Ensure the progress 'knob' remains accessible on very small screens */
@media (max-width: 360px) {
    .progress-filled::after {
        width: 10px;
        height: 10px;
    }
    .play-icon svg {
        width: 100%;
        height: 100%;
    }
}