@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&family=Roboto+Mono&display=swap');

/* Basic Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: #222;
    color: #333;
    scroll-behavior: smooth;
}

button {
    font-family: inherit; /* Ensure buttons use the site's font */
}

/* Set heading font */
h1, h2, h3 {
    font-family: 'Manrope', sans-serif;
    font-style: normal;
    font-weight: 500;
}

/* Hero Section with Video Background */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    background-color: #000; /* Fills potential video gaps */
}

#headerVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0; /* Corrected z-index */
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 15vh; /* Nudges the text down from the center */
}

/* Keyframe animation for fading in and sliding up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 0;
    /* Gradient Effect */
    background-image: linear-gradient(180deg, #fff 60%, #bbb); /* More noticeable gradient */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Animation */
    animation: fadeInUp 1s ease-out 0.5s forwards;
    opacity: 0; /* Start as invisible */
}

.hero-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 5px;
    /* Animation */
    animation: fadeInUp 1s ease-out 0.8s forwards;
    opacity: 0; /* Start as invisible */
}

/* Scroll Arrows Animation */
.scroll-arrows {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #fff;
    margin-bottom: 5px;
    opacity: 0;
    animation: fade-in-out 2s infinite;
}

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1s;
}

@keyframes fade-in-out {
    0% { transform: translateY(-20px); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}


/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: transparent; /* Transparent by default */
    padding: 1rem 0;
    text-align: center;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Smooth transition */
}

/* Style for the navbar WHEN SCROLLED */
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.85); /* See-through black */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: bold;
    position: relative; /* Required for the pseudo-element */
    transition: color 0.3s ease; /* Transition for color change */
}

/* Creates the underline */
.navbar a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #fff;
    bottom: 0;
    left: 0;
    transform: scaleX(0); /* Initially hidden */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

/* The hover effect */
.navbar a:hover {
    color: #ddd; /* Slightly fade the text on hover */
}

.navbar a:hover::after {
    transform: scaleX(1); /* Reveal the underline */
    transform-origin: bottom left;
}


/* Content Sections */
.content-section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff; /* Updated for dark mode */
}

.about-section {
    display: flex;
    flex-direction: column; /* Stacks the h2 and the card */
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.1rem;
    color: #ccc; /* Updated for dark mode */
    position: relative;
    z-index: 1;
    background-color: #222; /* Set to match patent section */
    box-shadow: 0 0 0 100vmax #222;
    clip-path: inset(-2px -100vmax);
}

/* Styling for the About Us container */
.about-card {
    background-image: linear-gradient(160deg, #444444, #2a2a2a);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 40px;
    max-width: 800px; /* Stretched out */
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center; /* Ensures text inside is centered */
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.patents-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    background-color: #222; /* Dark background */
    box-shadow: 0 0 0 100vmax #222;
    clip-path: inset(-2px -100vmax); /* Cover potential gaps */
}

.patents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.patent-card {
    background-color: #333; /* Fallback color */
    background-image: linear-gradient(160deg, #444444, #2a2a2a); /* More noticeable gradient */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.patent-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Image Slider Styles */
.slider-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn.prev-btn {
    left: 10px;
}

.slider-btn.next-btn {
    right: 10px;
}


/* Container for the 3D viewer to ensure proper centering and consistent height */
.p3d-viewer-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rule for the 3D model iframe to fill its container */
.p3d-viewer {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.patent-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.patent-content {
    padding: 20px;
    min-height: 150px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.patent-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.patent-content h3 a {
    color: #fff;
    text-decoration: none;
}

.patent-content h3 a:hover {
    text-decoration: underline;
}

.patent-content p {
    font-size: 1rem;
    color: #ccc; /* Lighter text for dark mode */
    margin-bottom: 20px;
}

/* Updated button style */
.demo-btn {
    background-color: #fff; /* Inverted style */
    color: #000;
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    align-self: center;
}

.demo-btn:hover {
    background-color: #ccc;
    color: #000;
}

/* Video Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Contact Section */
.contact-section {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    background-color: #222; /* Dark background */
    box-shadow: 0 0 0 100vmax #222;
    clip-path: inset(-2px -100vmax); /* Cover potential gaps */
}

.contact-card {
    background-color: #333; /* Fallback color */
    background-image: linear-gradient(160deg, #444444, #2a2a2a); /* More noticeable gradient */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.contact-person h3 {
    font-size: 1.5rem;
    color: #fff; /* White text */
}

.contact-person p {
    color: #ccc; /* Lighter text */
    font-style: italic;
}

.contact-person:first-child {
    position: relative;
}

.contact-person:first-child::after {
    content: "";
    position: absolute;
    background-color: rgba(204, 204, 204, 0.2); /* Subtler divider */
    /* --- DESKTOP: VERTICAL LINE --- */
    width: 1px;
    height: 70%;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
}

.contact-email {
    text-align: center;
    margin-top: 15px;
    color: #ccc; /* Lighter text */
}

.contact-email a {
    color: #00aaff; /* Brighter blue */
    text-decoration: none;
    font-weight: bold;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Social media icons container */
.social-media {
    margin-bottom: 15px;
}

.social-media a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-media a:hover {
    color: #ccc;
    transform: scale(1.2);
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8); /* Changed to match navbar */
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
}

/* ==== Mobile Responsiveness (Screen sizes up to 768px) ==== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 10vw;
    }

    .hero-content p {
        font-size: 4vw;
        padding: 0 10px;
    }
    
    .scroll-arrows {
        bottom: 30px;
        display: flex;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .navbar a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .content-section {
        padding: 40px 5%;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .slider-btn {
        opacity: 0.6;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .contact-person:first-child::after {
        /* --- MOBILE: HORIZONTAL LINE --- */
        width: 80%;
        height: 1px;
        top: auto;
        right: auto;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
    }
}