:root {
    /* Color Palette - Azure Tech */
    --bg-body: #020810;
    /* Deepest Blue-Black */
    --bg-card: #051120;
    /* Dark Blue-Grey */
    --bg-card-hover: #0a2a40;
    /* Darker Azure Grey */

    --text-main: #e2e8f0;
    --text-muted: #94a3b8;

    --primary: #0099CC;
    /* Brilliant Azure */
    --primary-glow: rgba(0, 153, 204, 0.3);

    --secondary: #0077B6;
    /* Azure Blue */

    --accent: #005599;
    /* Royal Azure */
    --border-color: rgba(0, 119, 182, 0.2);
    /* Azure Blue low opacity */

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 60px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.15), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    /* White text for better contrast on Azure */
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
    color: #fff;
    /* Ensure text stays white on hover */
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(0, 153, 204, 0.1);
    /* Azure tint */
    color: #fff;
    /* Ensure text is visible on hover */
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.section-padding {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, #0099CC 0%, #005599 100%);
    /* Brilliant Azure to Royal Azure */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(5, 10, 16, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Full width instead of 90% */
    max-width: none;
    /* Remove max-width constraint */
    margin: 0;
    /* Remove auto centering */
    padding: 0 1rem;
    /* Equal padding on both sides for breathing room */
}


.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.8;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--primary);
}

.nav-links .btn-primary:hover,
.nav-links .btn-primary.active {
    color: #fff !important;
    /* Force white text for the button */
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column */
    gap: 4rem;
    align-items: center;
    text-align: center;
    /* Center text */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    /* Limit width for readability */
    margin: 0 auto;
    /* Center block */
    margin-top: calc(10vh - 35px);
    /* Raised higher for CTA visibility */
}

/* ... (Visual section skipped as it remains similar) ... */

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    /* Larger headline */
    margin-bottom: 1.5rem;
    animation-delay: 0.1s;
}

.hero-content p {
    font-size: 1.25rem;
    /* Larger subtext */
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation-delay: 0.3s;
}

/* Tech Visualization Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind content */
    pointer-events: none;
    /* Allow clicking through */
    background: radial-gradient(circle at center, #051120 0%, #020810 100%);
    /* Deep Blue Gradient */
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* Indicate interactivity */
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 153, 204, 0.15);
    border-color: var(--primary);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--primary-glow), transparent 60%);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: #fff;
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Certifications Grid */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-badge {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: var(--transition-smooth);
}

.cert-badge:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.cert-badge h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.cert-badge p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Why Choose M.E.G. Grid */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns */
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .why-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

.why-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--secondary);
    transform: translateY(-3px);
}

.why-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.why-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.why-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #020406;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    header .container {
        justify-content: space-between;
        padding: 0 1.5rem;
        /* Increased padding */
    }

    /* Logo - Smaller on Mobile */
    .logo {
        font-size: 1.1rem;
        /* 2 levels smaller than desktop 1.5rem */
    }

    .container {
        padding: 0 1.5rem;
        /* Increased global mobile padding */
    }

    .section-padding {
        padding: 3.5rem 0;
        /* Tightened from 4rem for better flow */
    }

    /* Section Titles - Larger on Mobile */
    h2 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    /* Buttons - Better Touch Targets */
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        /* Ensure minimum touch target */
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    /* Touch Feedback - Active State */
    .btn:active {
        transform: scale(0.97);
        box-shadow: 0 0 10px var(--primary-glow);
    }

    .btn-primary {
        font-weight: 600;
    }

    /* Card Touch Feedback */
    .service-card:active,
    .why-card:active,
    .cert-badge:active {
        transform: scale(0.98);
        opacity: 0.95;
    }

    .header-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        /* Slightly wider menu */
        height: 100vh;
        background: rgba(5, 17, 32, 0.95);
        /* Darker background */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: var(--transition-smooth);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        border-left: 1px solid var(--border-color);
        z-index: 999;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
    }

    .header-right.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 2.5rem;
        /* More space between links */
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        /* Larger touch targets */
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        text-align: center;
        justify-content: center;
        padding-top: 80px;
        /* Ensure content clears header */
    }

    .hero-content {
        margin: 0 auto;
        margin-top: 5vh;
        /* Balanced top margin */
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        /* Smaller headline for mobile */
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }

    .hero-content h3 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1.5rem;
    }

    .hero-tagline {
        gap: 1rem;
        /* More breathing room */
    }

    .hero-content p {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 3rem;
        letter-spacing: 0.01em;
        /* Improved readability */
    }

    /* Hero Buttons - Larger */
    .hero-btns .btn {
        padding: 1.25rem 2.5rem;
        font-size: 1.05rem;
        width: 100%;
        max-width: 400px;
    }

    /* Responsive CTA Button */
    .responsive-cta .cta-text {
        display: none;
    }

    .responsive-cta::before {
        content: attr(data-short-text);
    }

    .hero-bg {
        width: 100%;
        height: 60%;
        top: auto;
        bottom: 0;
    }

    /* Service Cards - 2 Column Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cards side by side */
        gap: 1rem;
        margin-top: 2rem;
        /* Tightened spacing */
    }

    .service-card {
        padding: 1.5rem 1rem;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .service-card h3 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .service-card p {
        font-size: 0.85rem;
        line-height: 1.5;
        letter-spacing: 0.01em;
    }

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

    /* Why Choose Grid - 2 Column */
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Override the existing mobile rule */
        gap: 1rem;
        margin-top: 2rem;
    }

    .why-card {
        padding: 1.5rem 1rem;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .why-card h3 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .why-card p {
        font-size: 0.85rem;
        line-height: 1.5;
        letter-spacing: 0.01em;
    }

    .why-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    /* Certifications - 2 Column Grid */
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 badges side by side */
        gap: 1rem;
        margin-top: 2rem;
    }

    .cert-badge {
        padding: 1.5rem 1rem;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .cert-badge h4 {
        font-size: 0.95rem;
    }

    .cert-badge p {
        font-size: 0.8rem;
    }

    /* Sticky CTA Button - Mobile Only */
    .sticky-cta-mobile {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .sticky-cta-mobile.visible {
        opacity: 1;
        pointer-events: all;
    }

    .sticky-cta-mobile .btn {
        box-shadow: 0 4px 20px rgba(0, 153, 204, 0.4);
        font-size: 0.95rem;
        padding: 0.9rem 2rem;
    }

    /* Tappable Links - Better Styling */
    footer a {
        text-decoration: none;
        transition: color 0.2s ease;
    }

    footer a:hover {
        color: var(--primary);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    /* Start hidden */
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.hero-content h1 {
    font-size: clamp(3.5rem, 7vw, 6rem);
    /* Larger headline */
    margin-bottom: 1.5rem;
    animation-delay: 0.1s;
}

.hero-content h3 {
    margin-top: 40px;
    /* Added to lower the sub-headline */
    margin-bottom: 1rem;
    font-size: 2.5rem;
    /* Increased font size */
}

.hero-tagline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Space between each statement */
}

.hero-content p {
    font-size: 1.4rem;
    /* Larger subtext */
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    margin-top: 45px;
    /* Added to lower the text */
    animation-delay: 0.3s;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation-delay: 0.5s;
}

/* Contact Section Hybrid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-schedule {
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-schedule h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
}

.contact-schedule p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.schedule-benefits {
    margin-bottom: 2.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.benefit-item i {
    color: var(--primary);
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.02);
    /* Made transparent to match schedule section */
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

textarea.form-control {
    resize: none;
    /* Disable resizing */
    height: 150px;
    /* Fixed height */
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-schedule {
        padding: 2rem;
        text-align: center;
    }

    .benefit-item {
        justify-content: center;
    }
}

/* Form Status Messages */
.success-message {
    color: #4ade80;
    /* Green */
    background: rgba(74, 222, 128, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(74, 222, 128, 0.2);
    margin-top: 1rem;
}


.error-message {
    color: #f87171;
    /* Red */
    background: rgba(248, 113, 113, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(248, 113, 113, 0.2);
    margin-top: 1rem;
}