/* General Styles */
body {
    font-family: Roboto;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

header .hero {
    background: linear-gradient(to right, #4e54c8, #8f94fb);
    color: white;
    text-align: center;
    padding: 50px 20px;
}

header .hero h1 {
    font-size: 2.5rem;
    margin: 0;
}

header .hero p {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* Demo Video Section */
.demo-videos {
    padding: 30px 20px;
    background-color: #f8f9fa;
    text-align: center;
}

.demo-videos h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Video Gallery */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.video-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    cursor: pointer;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Maintain 16:9 aspect ratio */
    overflow: hidden;
}

.before-video,
.after-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    transition: opacity 1s ease; /* Smooth fade transition */
}

.before-video {
    opacity: 1; /* Default visible video */
}

.after-video {
    opacity: 0; /* Initially hidden */
}

.video-item:hover .after-video {
    opacity: 1; /* Fade-in the "after" video on hover */
}

.video-item:hover .before-video {
    opacity: 0; /* Fade-out the "before" video on hover */
}

.video-item p {
    margin-top: 10px;
    font-size: 1rem;
    color: #333;
}

/* Popup Modal */
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 85%;
    max-width: 800px;
    text-align: center;
    position: relative;
}

.popup-content video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.popup-content p {
    margin-top: 10px;
    color: #333;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}
