/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgb(14 11 24 / 95%), rgb(14 16 50 / 95%));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 1200px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8) translateY(-20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    color: #ffffff;
}

.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(186, 255, 227, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-play-overlay::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #5840BA;
    margin-left: 3px;
}

.video-item:hover .video-play-overlay {
    background: rgba(186, 255, 227, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
    color: #ffffff;
    font-size: 1.0rem;
    font-weight: 400;
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modal Video Player Section */
.modal-video-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-main-video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.modal-video-thumbnail-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.modal-video-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.modal-video-placeholder.hidden {
    opacity: 0;
}

.modal-play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(186, 255, 227, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.modal-play-button-overlay::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid #5840BA;
    margin-left: 4px;
}

.modal-play-button-overlay:hover {
    background: rgba(186, 255, 227, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.modal-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-video-iframe.active {
    opacity: 1;
}

/* See Examples Button Styles */
.see-examples-btn {
    background: linear-gradient(135deg, #5840BA, #2F34A1);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(88, 64, 186, 0.3);
}

.see-examples-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.see-examples-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 64, 186, 0.4);
    background: linear-gradient(135deg, #6B4FCA, #3A41B2);
}

.see-examples-btn:hover::before {
    left: 100%;
}

.see-examples-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .video-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .video-thumbnail {
        height: 150px;
    }
    
    .see-examples-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .modal-play-button-overlay {
        width: 60px;
        height: 60px;
    }
    
    .modal-play-button-overlay::before {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 15px solid #5840BA;
    }
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(186, 255, 227, 0.5);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(186, 255, 227, 0.7);
} 

.modal-main-video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Video Modal for mobile */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
}

.video-modal .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-modal .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1051;
}

/* Mobile Video Overlay Styles */
.mobile-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-video-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.mobile-video-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mobile-video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-video-wrapper iframe {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border: none;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .mobile-video-wrapper {
        padding: 10px;
    }
    
    .mobile-video-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}