/* EkLabs Website Styles */

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', sans-serif;
    color: white;
    background-color: #0f0f0f;
    overflow-x: hidden;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.video-background video.active {
    opacity: 0.95;
    z-index: 1;
}

/* Content Overlay */
.content-overlay {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    min-height: 100vh;
}

/* Interactive Blob Effects */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(60px);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.blob-1 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.1), transparent);
}

.blob-2 {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4), rgba(34, 197, 94, 0.1), transparent);
}

.blob-3 {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), rgba(168, 85, 247, 0.1), transparent);
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(34, 197, 94, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Flip Cards */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 400px;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.flip-card:hover {
    transform: scale(1.05);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.flip-card-front {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-card-back {
    background: linear-gradient(135deg, #1e40af, #059669);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border: 2px solid rgba(59, 130, 246, 0.6);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(-3px);
}

/* Sections */
.section {
    min-height: 100vh;
    padding: 80px 0;
    display: flex;
    align-items: center;
    position: relative;
}

/* Statistics Counter */
.stat-counter {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #3b82f6, #22c55e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flip-card {
        width: 280px;
        height: 360px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .stat-counter {
        font-size: 2rem;
    }
}

/* Parallax Effect */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Lazy Loading Styles */
.lazy-image {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    transition: opacity 0.3s ease;
}

.lazy-video {
    background: #000;
    transition: opacity 0.3s ease;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Hide only truly empty <video> tags (without any <source> children) */
video:empty {
    visibility: hidden;
}

/* Performance optimizations */
img, video {
    content-visibility: auto;
    contain: layout style paint;
}

/* Hyperspectral Image Cards */
.hyperspectral-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
}

.hyperspectral-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hyperspectral-card .image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.hyperspectral-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hyperspectral-card:hover .image-container img {
    transform: scale(1.05);
}

.hyperspectral-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hyperspectral-card:hover .overlay {
    opacity: 1;
}

.hyperspectral-card .read-more-btn {
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.hyperspectral-card:hover .read-more-btn {
    transform: translateY(0);
}

.hyperspectral-card .content {
    padding: 24px;
}

/* Computer Vision and Robotics Cards - same styling */
.vision-card, .robotics-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
}

.vision-card:hover, .robotics-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.vision-card .image-container, .robotics-card .image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.vision-card .image-container img, .robotics-card .image-container img,
.vision-card .image-container video, .robotics-card .image-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vision-card:hover .image-container img, .robotics-card:hover .image-container img,
.vision-card:hover .image-container video, .robotics-card:hover .image-container video {
    transform: scale(1.05);
}

.vision-card .overlay, .robotics-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vision-card:hover .overlay, .robotics-card:hover .overlay {
    opacity: 1;
}

.vision-card .read-more-btn, .robotics-card .read-more-btn {
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.vision-card:hover .read-more-btn, .robotics-card:hover .read-more-btn {
    transform: translateY(0);
}

.vision-card .content, .robotics-card .content {
    padding: 24px;
}