/* Lazy Loading Styles for Images */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: #f8f9fa;
    background-image: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.lazy.loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lazy YouTube Video Player Styles - Only for businessplan page */
.youtube-player {
    position: relative;
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.youtube-player:hover {
    opacity: 0.8;
}

.youtube-player img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.youtube-player::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 68"><circle cx="34" cy="34" r="34" fill="rgba(255,255,255,0.9)"/><path d="M45,34L28,44V24" fill="%23FF0000"/></svg>') center/cover no-repeat;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0.9;
    border-radius: 50%;
}

.youtube-player:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.youtube-player .video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    z-index: 3;
}

/* Businessplan page - add more top margin for better alignment */
.container .youtube-player {
    margin-top: 80px;
}

/* Homepage Video Modal Styles */
.lazy-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.lazy-video-modal {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    transform: scale(0.8);
    animation: scaleIn 0.3s ease-in-out forwards;
}

.lazy-video-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.lazy-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.lazy-video-close {
    position: absolute;
    top: -40px;
    right: -5px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lazy-video-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Improved Homepage Video Modal with Thumbnail Loading */
.video-thumbnail-loading {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail-loading img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.loading-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.loading-play-btn i {
    font-size: 48px;
    color: #fba311;
    margin-bottom: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-play-btn span {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

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

@keyframes scaleIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container .youtube-player {
        margin-top: 40px;
    }
    
    .youtube-player::after {
        width: 50px;
        height: 50px;
    }
    
    .lazy-video-modal {
        width: 95%;
        max-width: none;
    }
    
    .lazy-video-close {
        top: -35px;
        right: 0;
        font-size: 25px;
    }
} 