/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #0c0a18; /* Fallback color */
    position: relative;
}

#animated-gradient-bg {
    position: fixed; /* Changed from absolute to fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Adjusted z-index */
    /* The gradient with darker, moody colors */
    background: linear-gradient(-45deg, #080a1a, #14112b, #2b1542, #111d30);
    background-size: 400% 400%;
    animation: gradient-flow 20s ease infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#neural-canvas {
    position: fixed; /* Changed from absolute to fixed */
    top: 0;
    left: 0;
    z-index: 1; /* Adjusted z-index */
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


a {
    text-decoration: none;
    color: inherit;
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, rgba(27, 39, 53, 0.8), rgba(9, 10, 15, 0.8));
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffd700;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 2px;
    width: 25px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

/* Hero Section */
#home {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    padding: 0 2rem;
    position: relative;
    z-index: 2; /* Ensure it's above the canvas */
}

.hero-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.hero-text {
    max-width: 50%;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background: #2d2d2d;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
    display: inline-block;
}

.cta-button:hover {
    background: #3d3d3d;
}

.hero-image {
    max-width: 40%;
}

.cyber-graphic {
    width: 100%;
    height: 300px;
    background: url('cyber-graphic.svg') center/contain no-repeat; /* Assume an SVG graphic */
}

/* General Section Styling */
section {
    position: relative;
    z-index: 2; /* Make sure all content sections are above the background */
    padding-top: 80px; /* Add padding to account for fixed header */
}

.section-container {
    background: rgba(12, 10, 24, 0.8);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#services {
    padding: 4rem 2rem;
    background: transparent;
}

.services-container {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 2rem auto;
}

.service-card {
    background: #2d2d2d;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    text-align: center;
    width: 30%;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* About Section */
#about {
    padding: 4rem 2rem;
    background: transparent;
}

.about-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-text {
    max-width: 50%;
    padding-right: 2rem;
}

.about-image {
    max-width: 50%;
}

#team-graph-canvas {
    width: 100%;
    height: 300px;
    display: block;
    border-radius: 10px;
    background: rgba(20, 20, 35, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Optional hover cursor for nodes (handled via JS if needed) */
.team-node-hover {
    cursor: pointer;
}

/* Contact Section */
#customers {
    padding: 4rem 2rem;
    background: transparent;
}

#customers .customers-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

#contact {
    padding: 4rem 2rem;
    background: transparent;
}

.contact-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    width: 50%;
    padding-right: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #444;
    border-radius: 5px;
    background: #2d2d2d;
    color: #e0e0e0;
}

.submit-button {
    background: #007bff;
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background: #0056b3;
}

.contact-info {
    width: 50%;
}

/* Footer */
footer {
    background: transparent;
    color: #fff;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2; /* Ensure footer is also on top */
}

.footer-content {
    display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto 1rem;
}

.footer-links a {
    margin: 0 1rem;
}

.footer-social a {
    margin: 0 1rem;
}

.copyright {
    font-size: 0.8rem;
}

/* Animations */
.section-container {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.visible .section-container {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #2d2d2d;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #444;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    color: #e0e0e0;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #311b92;
        position: absolute;
        top: 60px;
        left: 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 1rem 0;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-container, .about-container, .contact-container {
        flex-direction: column;
    }

    .hero-text, .about-text, .contact-form {
        max-width: 100%;
        padding: 0;
    }

    .hero-image, .about-image {
        max-width: 100%;
        margin-top: 2rem;
    }

    .services-container {
        flex-direction: column;
    }

    .service-card {
        width: 100%;
        margin-bottom: 2rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links, .footer-social {
        margin: 1rem 0;
    }
}

#customers .customer-profile {
    margin-top: 2rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #2d2d2d;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

#customers .customer-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem;
}

#customers .customer-brief {
    max-width: 720px;
    color: #d0d0d0;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    text-align: left;
}

@media (max-width: 768px) {
    #customers .customer-profile {
        width: 100%;
        box-sizing: border-box;
    }
    #customers .customer-brief {
        text-align: center;
    }
}
