/* YouTube Video Player CSS - Atlas Tek - Vimeo videolarının yerine geçecek YouTube videoları için */

/* Fullpage Menü İçindeki YouTube Video (773. satır - nav içinde) */
.youtube-nav-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0; /* Background olarak arkada kalmalı */
}

.youtube-nav-video-background .youtube-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* YouTube video iframe */
.youtube-nav-video-background .youtube-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 177.78vh; /* Orijinal video-background iframe stil ile aynı */
    height: 100vh;
    scale: 1.4; /* Orijinal video-background iframe stil ile aynı */
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Video üzerine tıklamayı engelle */
    z-index: 1;
}

.youtube-nav-video-background .youtube-video-iframe.loaded {
    opacity: 1;
}

/* YouTube video thumbnail (kapak resmi) */
.youtube-nav-video-background .youtube-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 177.78vh; /* Video ile aynı boyut */
    height: 100vh;
    scale: 1.4; /* Video ile aynı scale */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Background olduğu için tıklanamaz */
    z-index: 1;
}

.youtube-nav-video-background .youtube-video-thumbnail.hidden {
    opacity: 0;
    pointer-events: none;
}

/* YouTube oynatma butonu */
.youtube-nav-video-background .youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10; /* Menü itemlarından üstte olmalı ama sadece ilk tıklama için */
}

/* Video oynatıldıktan sonra play button'ı gizle */
.youtube-nav-video-background .youtube-play-button.hidden {
    display: none;
}

.youtube-nav-video-background .youtube-play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-nav-video-background .youtube-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #ff0000;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* Video overlay (mevcut stil ile uyumlu) */
.youtube-nav-video-background .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

/* Footer YouTube Video (1489. satır) */
.youtube-footer-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Footer background olarak */
}

.youtube-footer-video-container .youtube-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Background video olduğu için tıklanamaz */
    z-index: 1;
}

.youtube-footer-video-container .youtube-video-iframe.loaded {
    opacity: 1;
}

.youtube-footer-video-container .youtube-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: auto; /* Footer video tıklanamaz */
    transition: opacity 0.5s ease;
    pointer-events: none; /* Background olduğu için tıklanamaz */
    z-index: 1;
}

.youtube-footer-video-container .youtube-video-thumbnail.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Footer videolarında play button yok - otomatik background video */

/* Loading spinner */
.youtube-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
    display: none;
}

.youtube-loading-spinner.visible {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .youtube-nav-video-background .youtube-play-button {
        width: 60px;
        height: 60px;
    }
    
    .youtube-nav-video-background .youtube-play-button::after {
        border-left: 16px solid #ff0000;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        margin-left: 3px;
    }
    
    .youtube-footer-video-container .youtube-play-button {
        width: 50px;
        height: 50px;
    }
    
    .youtube-footer-video-container .youtube-play-button::after {
        border-left: 14px solid #ff0000;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        margin-left: 2px;
    }
}