/* Mobile First CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066ff;
    --secondary: #00d4ff;
    --dark: #0a0e27;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

html {
    scroll-behavior: smooth;
}

/* Ensure sections have proper scroll margin - much higher value */
section[id] {
    scroll-margin-top: 100px;
}

/* Special case for services section to avoid overlap */
#services {
    scroll-margin-top: 120px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    font-size: 16px;
}

/* Mobile First - Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile menu visible by default */
.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
}

/* Mobile navigation links */
.nav-links {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    list-style: none;
    gap: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-links.active {
    display: flex;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Mobile First - Hero Section */
.hero {
    min-height: 100vh;
    background: 
        linear-gradient(135deg, rgba(10, 14, 39, 0.4) 0%, rgba(26, 31, 58, 0.5) 100%),
        url('tech-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
    --parallax-offset: 0px;
}

/* WebP support for modern browsers */
.webp .hero {
    background: 
        linear-gradient(135deg, rgba(10, 14, 39, 0.4) 0%, rgba(26, 31, 58, 0.5) 100%),
        url('tech-background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

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

.hero-content {
    width: 100%;
    z-index: 1;
    position: relative;
}

.hero h1 {
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn {
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    width: 100%;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-outline {
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--dark);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile First - Services Section */
.services {
    padding: 4rem 1rem 3rem;
    background: var(--light);
}

.container {
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1rem;
    padding: 0 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.service-card h3 {
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-size: 1.25rem;
}

.service-card p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Mobile First - Projects Section */
.projects {
    padding: 4rem 1rem 3rem;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.project-card {
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.project-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-header {
    background: var(--gradient);
    padding: 1.5rem;
    color: white;
}

.project-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-body {
    padding: 1.5rem;
}

.project-body p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

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

.project-link:hover {
    gap: 1rem;
}

/* Mobile First - About Section */
.about {
    padding: 4rem 1rem 3rem;
    background: linear-gradient(135deg, var(--dark) 0%, #1a1f3a 100%);
    color: white;
}

.about-content {
    width: 100%;
    text-align: center;
}

.about h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.about p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.parent-company {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.parent-company a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.parent-company a:hover {
    color: white;
}

/* Mobile First - Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.footer-content {
    width: 100%;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tablet Styles (min-width: 768px) */
@media (min-width: 768px) {
    section[id] {
        scroll-margin-top: 110px;
    }
    
    #services {
        scroll-margin-top: 130px;
    }
    .nav-container {
        padding: 0 2rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .hero {
        padding: 6rem 2rem 4rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .subtitle {
        font-size: 1.3rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: row;
    }

    .btn {
        width: auto;
        padding: 1rem 2rem;
    }

    .services {
        padding: 5rem 2rem 4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

/* Desktop Styles (min-width: 1024px) */
@media (min-width: 1024px) {
    section[id] {
        scroll-margin-top: 120px;
    }
    
    #services {
        scroll-margin-top: 140px;
    }
    nav {
        padding: 1rem 0;
    }

    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
    }

    /* Desktop navigation */
    .mobile-menu {
        display: none;
    }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        padding: 0;
        background: transparent;
        gap: 2rem;
        box-shadow: none;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero .subtitle {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1.2rem;
        max-width: 600px;
    }

    .hero-content {
        max-width: 1200px;
        margin: 0 auto;
    }

    .services {
        padding: 6rem 2rem 5rem;
    }

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

    .section-title {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .service-card {
        padding: 2rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .projects {
        padding: 6rem 2rem 5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .project-header {
        padding: 2rem;
    }

    .project-body {
        padding: 2rem;
    }

    .about {
        padding: 6rem 2rem 5rem;
    }

    .about-content {
        max-width: 800px;
        margin: 0 auto;
    }

    .about p {
        font-size: 1.1rem;
        line-height: 1.8;
    }

    footer {
        padding: 3rem 2rem 2rem;
    }

    .footer-content {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Large Desktop (min-width: 1440px) */
@media (min-width: 1440px) {
    .hero h1 {
        font-size: 4rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}