/* ===================================
   VIDEO STYLES - ELIOSOR IA
   =================================== */

/* === Video Presentation Section === */
.video-presentation-section {
    padding: var(--spacing-3xl) 0;
    background: var(--color-lightest);
}

.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f5f5f5;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.video-container video:not([poster]) {
    background: #f5f5f5;
}

/* Hide overlay when video is playing */
.video-container.playing .video-play-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.video-container:hover .play-button {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    border-color: #ffffff;
}

.play-button i {
    font-size: 2rem;
    color: #ffffff;
    margin-left: 5px; /* Optical alignment for play icon */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Completely hide all video controls until first play */
.video-container video:not([controls]) {
    pointer-events: none;
}

.video-container video:not([controls])::-webkit-media-controls-panel {
    display: none !important;
    opacity: 0 !important;
}

.video-container video:not([controls])::-webkit-media-controls-play-button {
    display: none !important;
    opacity: 0 !important;
}

.video-container video:not([controls])::-webkit-media-controls-start-playback-button {
    display: none !important;
    opacity: 0 !important;
}

/* === Video Button in Hero === */
.btn-video {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    transition: all var(--transition-base);
}

.btn-video:hover {
    background: var(--color-white);
    color: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.btn-video i {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* === Video Modal === */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-modal-content video {
    width: 100%;
    height: auto;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all var(--transition-base);
    z-index: 10001;
}

.video-modal-close:hover {
    color: var(--color-light-gray);
    transform: scale(1.1);
}

/* === Responsive === */
@media (max-width: 768px) {
    .video-presentation-section {
        padding: var(--spacing-2xl) 0;
    }

    .video-modal {
        padding: var(--spacing-sm);
    }

    .video-modal-close {
        top: -40px;
        font-size: 1.5rem;
    }

    .btn-video {
        width: 100%;
        margin-top: var(--spacing-sm);
    }

    /* Stack hero buttons on mobile */
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero-cta .btn-large {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .video-wrapper {
        padding: 0;
    }
}
