:root {
    --primary-color: #ff6b6b;
    --primary-dark: #e55555;
    --primary-light: #ff8a8a;
    --accent-color: #4ecdc4;
    --accent-dark: #45b7b8;
    --dark-bg: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-tertiary: #2a2a2a;
    --light-bg: #ffffff;
    --light-secondary: #f8f9fa;
    --light-tertiary: #e9ecef;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    --backdrop-blur: backdrop-filter: blur(16px) saturate(180%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Account for fixed navbar */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation - Fixed positioning issues */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.logo {
    height: 40px;
    width: auto;
    max-width: 200px;
}

.nav-menu {
    display: flex; /* THIS IS THE MOST IMPORTANT FIX */
    list-style: none;
    gap: 2rem; /* Choose one gap value and stick to it */
    align-items: center;
}
@media (max-width: 768px) {
    .nav-menu {
        /* This is the mobile-specific override */
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column; /* This now applies ONLY on mobile */
        justify-content: center;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transition: right 0.5s ease-in-out;
        z-index: 999;
    }
}

.nav-dropdown {
    position: relative;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary-color);
}

.hamburger {
    display: none; /* This is already in your code, which is correct */
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        /* Change the menu to a column layout and hide it by default */
        position: fixed;
        top: 0;
        right: -100%; /* Initially hide the menu off-screen */
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transition: right 0.5s ease-in-out;
        z-index: 999;
    }

    .nav-menu.active {
        /* This class will be added by JavaScript to show the menu */
        right: 0;
    }

    .hamburger {
        /* Display the hamburger icon on mobile */
        display: flex;
        z-index: 1000;
    }
}

/* Hero Section - Fixed layout issues */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    color: #ffffff;
    position: relative;
    padding-top: 70px; /* Account for fixed navbar */
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 100%;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.accent {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: #ffffff;
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Data Visualization - Fixed positioning */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.data-visualization {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;
}

.data-point {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.8;
}

.data-point:nth-child(1) {
    top: 0;
    left: 0;
    animation: pulse 2s infinite;
}

.data-point:nth-child(2) {
    top: 0;
    right: 0;
    animation: pulse 2s infinite 0.5s;
}

.data-point:nth-child(3) {
    bottom: 0;
    left: 0;
    animation: pulse 2s infinite 1s;
}

.data-point:nth-child(4) {
    bottom: 0;
    right: 0;
    animation: pulse 2s infinite 1.5s;
}

.connection-line {
    position: absolute;
    background: rgba(255, 107, 107, 0.4);
    height: 2px;
    width: calc(100% - 120px);
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
}

.connection-line.vertical {
    width: 2px;
    height: calc(100% - 120px);
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1; 
    }
}

/* Section Headers - Fixed spacing */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Services Section - Fixed grid issues */
.services {
    padding: 80px 0;
    background: var(--light-secondary);
    width: 100%;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.service-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: left;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 0.75rem;
}

/* Mission & Vision - Fixed layout */
.mission-vision {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    color: #ffffff;
    width: 100%;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
}

.mission-card, .vision-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.mission-card h3, .vision-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.mission-card p, .vision-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Values Section - Fixed grid */
.values {
    padding: 80px 0;
    background: var(--light-bg);
    width: 100%;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.value-item {
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.value-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-icon svg {
    width: 30px;
    height: 30px;
}

.value-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.value-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Section - Fixed layout */
.about {
    padding: 80px 0;
    background: var(--light-secondary);
    width: 100%;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 100%;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Contact Section - Fixed layout */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    color: #ffffff;
    width: 100%;
}

.contact .section-header h2,
.contact .section-header p {
    color: #ffffff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-item p {
    opacity: 0.9;
    line-height: 1.6;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Footer - Fixed layout */
.footer {
    background: var(--dark-bg);
    color: #ffffff;
    padding: 60px 0 20px;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
    width: 100%;
}

.footer-logo p {
    margin-top: 1rem;
    opacity: 0.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.6;
}

/* Responsive Design - Fixed all breakpoints */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        backdrop-filter: blur(10px);
        height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        padding-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 20px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .mission-vision-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .data-visualization {
        max-width: 250px;
        height: 250px;
    }
    
    .data-point {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-container {
        padding: 20px 15px;
    }
    
    .service-card,
    .mission-card,
    .vision-card,
    .contact-form {
        padding: 1.5rem;
    }
    
    .data-visualization {
        max-width: 200px;
        height: 200px;
    }
    
    .data-point {
        width: 40px;
        height: 40px;
    }
    
    .section-header {
        padding: 0 15px;
    }
}

/* Fix for any overflow issues */
section {
    width: 100%;
    overflow-x: hidden;
}

/* Ensure all containers respect max width */
.hero-container,
.container {
    max-width: 1200px;
    width: 100%;
}

/* Modern Immersive Scrolling Effects */
/* Parallax effect for hero background */
.hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Scroll-triggered animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.5s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.6s; }

/* Enhanced navbar scroll effects */
.navbar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

/* Smooth section transitions */
section {
    position: relative;
    overflow: hidden;
}

/* Floating card animations on scroll */
.service-card,
.mission-card,
.vision-card,
.value-item,
.stat {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progressive blur effect */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
    will-change: transform;
}

/* Scale animations for images/icons */
.scale-on-scroll {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.scale-on-scroll.in-view {
    transform: scale(1.05);
}

/* Text reveal animations */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}

.text-reveal.revealed::after {
    transform: translateX(100%);
}

/* Smooth progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Enhanced button hover with scroll awareness */
.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* Magnetic cursor effect for interactive elements */
.magnetic {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance optimizations */
.hero-visual,
.data-visualization,
.service-icon,
.value-icon {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-reveal {
        transform: none;
        opacity: 1;
    }
}