/* General Sans Font - Performance Optimized */
@font-face {
    font-family: 'General Sans';
    src: url('../fonts/GeneralSans-Variable.woff2') format('woff2-variations');
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'General Sans';
    src: url('../fonts/GeneralSans-VariableItalic.woff2') format('woff2-variations');
    font-weight: 200 700;
    font-style: italic;
    font-display: swap;
}

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

:root {
    --primary: #73AB3B;
    --secondary: #8BC34A;
    --dark: #0a0a0a;
    --dark-gray: #1a1a1a;
    --light-gray: #2a2a2a;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    
    /* Font stack following Google/Apple best practices */
    --font-primary: 'General Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font-primary);
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
}

/* Ensure no element can cause horizontal overflow */
* {
    max-width: 100%;
}

html {
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
nav {
    position: fixed;
    width: 100%;
    padding: 20px 5%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Header component container - prevent layout shift during loading */
[data-component="header"] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px; /* Reserve space for the header */
    z-index: 1000;
}

/* Ensure body has padding to account for fixed header */
body {
    padding-top: 80px;
}

nav.scrolled {
    padding: 15px 5%;
    box-shadow: 0 2px 20px rgba(115, 171, 59, 0.1);
}

.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    order: 0;
    padding: 8px;
    background: none;
    border: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: var(--primary);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background: var(--primary);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    grid-column: 1;
    justify-self: start;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Ensure logo link is clickable on mobile */
.logo a {
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 1001;
    position: relative;
}

/* Mobile-specific logo touch handling */
@media (max-width: 768px) {
    .logo a {
        padding: 10px;
        margin: -10px;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    grid-column: 2;
    justify-self: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

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

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-contact {
    display: none;
}

.desktop-cta {
    grid-column: 3;
    justify-self: end;
}

.cta-button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(115, 171, 59, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 5%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    filter: hue-rotate(60deg) saturate(1.1);
    /* Mobile video optimization */
    -webkit-playsinline: true;
    -webkit-background-size: cover;
    background-size: cover;
    /* Hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    /* Prevent video from being selectable */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Ensure video covers container properly */
    min-width: 100%;
    min-height: 100%;
}

/* Video fallback styles - Clean gradient background like 404 page */
.hero.video-fallback {
    background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
}

/* Hide video controls on all platforms */
.hero-video-background::-webkit-media-controls {
    display: none !important;
}

.hero-video-background::-webkit-media-controls-panel {
    display: none !important;
}

.hero-video-background::-webkit-media-controls-play-button {
    display: none !important;
}

.hero-video-background::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Mobile video fallback */
@media (max-width: 768px) {
    .hero-video-background {
        /* Reduce opacity on mobile for better text readability */
        opacity: 0.3;
        /* Force hardware acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
        /* Optimize for mobile performance */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
      /* Provide clean gradient fallback for mobile if video fails */
    .hero {
        background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    }    /* Enhanced fallback for when video is disabled */
    .hero.video-fallback {
        background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    }

    /* Ensure video doesn't cause layout shifts on mobile */
    .hero-video-background {
        /* Prevent zoom/scale issues on mobile */
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        /* Improve performance on mobile */
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-button {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.secondary-button:hover {
    background: var(--primary);
    color: white;
}

/* Credibility Bar */
.credibility-bar {
    background: 
        radial-gradient(circle at 20% 50%, rgba(115, 171, 59, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 50%),
        linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.85));
    background-size: cover;
    background-position: center;
    padding: 40px 5%;
    text-align: center;
    position: relative;
    transition: background-image 0.3s ease-in-out;
}

/* Lazy loaded background image state */
.credibility-bar.bg-loaded {
    background: 
        radial-gradient(circle at 20% 50%, rgba(115, 171, 59, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 50%),
        linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.85)), 
        url('../images/AlpineBahrainTest2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.credibility-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(115, 171, 59, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(139, 195, 74, 0.05) 0%, transparent 40%),
        linear-gradient(45deg, transparent 30%, rgba(115, 171, 59, 0.02) 50%, transparent 70%);
    z-index: 1;
}

.credibility-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.credibility-title {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    text-shadow: 0 0 15px rgba(115, 171, 59, 0.2);
}

.credibility-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: nowrap;
    min-height: 80px;
}

.logo-item {
    flex-shrink: 0;
}

.logo-item img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
}

/* Services Section */
.services {
    padding: 100px 5%;
    background: var(--text);
    position: relative;
    overflow: hidden;
}

.services .section-header,
.services .services-grid {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--dark-gray);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(115, 171, 59, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: translateX(0);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 25px;
}

.service-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* About Section */
.about {
    padding: 100px 5%;
    background: var(--dark-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-text h2 {
    font-size: 42px;
    margin-bottom: 30px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 18px;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.tag {
    background: var(--light-gray);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-visual {
    position: relative;
    height: 500px;
    background: linear-gradient(45deg, rgba(115, 171, 59, 0.1), rgba(139, 195, 74, 0.1));
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-content {
    text-align: center;
    padding: 40px;
}

.visual-content h3 {
    font-size: 36px;
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary);
}

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

/* Service Packages */
.packages {
    padding: 100px 5%;
    background: var(--dark);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.package-card {
    background: var(--dark-gray);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.package-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.package-tier {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.package-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.package-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 60px;
}

.ideal-for {
    font-size: 14px;
    color: var(--secondary);
    margin-top: 20px;
}

/* Contact Section */
.contact {
    padding: 100px 5%;
    background: var(--dark-gray);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    margin-top: 40px;
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 10px;
    text-align: left;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--light-gray);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(115, 171, 59, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Privacy notice in contact form */
.privacy-notice {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(115, 171, 59, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(115, 171, 59, 0.2);
}

.privacy-notice p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.privacy-notice a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.privacy-notice a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Footer */
footer {
    padding: 40px 5%;
    background: var(--dark);
    text-align: center;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Problem Section */
.problem {
    padding: 100px 5%;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.problem .section-header,
.problem .problem-grid {
    position: relative;
    z-index: 1;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 60px;
}

.problem-card {
    background: var(--dark-gray);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #ff4444;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.problem-card:hover {
    transform: translateY(-5px);
    border-color: #ff6666;
    box-shadow: 0 20px 40px rgba(255, 68, 68, 0.1);
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff4444, #ff6666);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.problem-card:hover::before {
    transform: translateX(0);
}

.problem-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff4444, #ff6666);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.problem-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ff6666;
}

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

.problem-solution {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px;
    background: linear-gradient(45deg, rgba(0, 102, 255, 0.1), rgba(0, 212, 255, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.problem-solution h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary);
}

.problem-solution p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Methodology Section */
.methodology {
    padding: 100px 5%;
    background: var(--dark-gray);
    position: relative;
    overflow: hidden;
}

.methodology .section-header,
.methodology .methodology-grid {
    position: relative;
    z-index: 1;
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.methodology-card {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.methodology-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.1);
}

.methodology-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.methodology-card:hover::before {
    transform: translateX(0);
}

.methodology-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.methodology-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text);
}

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

/* Privacy Policy Page Styles */
.privacy-intro {
    padding: 150px 5% 100px 5%;
    background: var(--dark);
    text-align: center;
}

.privacy-content {
    padding: 80px 5%;
    background: var(--dark-gray);
}

.privacy-text {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.privacy-text h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.privacy-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

.privacy-text ul {
    color: var(--text-secondary);
    margin: 20px 0;
    padding-left: 30px;
}

.privacy-text li {
    margin-bottom: 8px;
}

.privacy-text a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-text a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.privacy-text strong {
    color: var(--text);
}

.privacy-footer {
    padding: 40px 5%;
    background: var(--dark);
    text-align: center;
    border-top: 1px solid var(--light-gray);
}

.privacy-footer p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.privacy-footer p:last-child {
    margin-bottom: 0;
}

/* Mobile responsive adjustments for privacy page */
@media (max-width: 768px) {
    .privacy-intro {
        padding: 120px 5% 80px 5%;
    }
    
    .privacy-text {
        padding: 0 10px;
    }
    
    .privacy-text h2 {
        font-size: 24px;
        margin-top: 30px;
    }
    
    .privacy-text p {
        font-size: 15px;
    }
    
    .privacy-text ul {
        padding-left: 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Force all grid containers to use single column on mobile and override minimum widths */
    .services-grid,
    .packages-grid,
    .problem-grid,
    .methodology-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure all cards fit properly on mobile */
    .service-card,
    .package-card,
    .problem-card,
    .methodology-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 20px;
    }
    
    /* Force all sections to respect mobile width */
    .services,
    .packages,
    .problem,
    .methodology,
    .about,
    .contact {
        padding-left: 2%;
        padding-right: 2%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Ensure hero section doesn't cause horizontal overflow */
    .hero {
        padding: 0 2%;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .hero-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 20px;
        margin: 0;
    }    .nav-container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
      .hamburger {
        display: flex;
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        order: 0;
    }
    
    .hamburger:hover {
        transform: translateY(-50%) scale(1.1);
    }
      .desktop-cta {
        display: none;
        grid-column: unset;
        justify-self: unset;
    }.logo {
        text-align: center;
        flex: 1;
        order: 1;
        width: 100%;
        margin: 0;
        grid-column: unset;
        justify-self: unset;
    }    .nav-links {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: left 0.3s ease;
        z-index: 1002;
        order: 2;
        overflow-y: auto;
        list-style: none;
        margin: 0;
        padding: 0;
        grid-column: unset;
        justify-self: unset;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    
    .nav-links a {
        font-size: 24px;
        font-weight: 600;
        padding: 15px 20px;
        display: block;
        border-radius: 10px;
        transition: all 0.3s ease;
        min-width: 200px;
        text-align: center;
    }
    
    .nav-links a:hover {
        background: rgba(115, 171, 59, 0.1);
        color: var(--primary);
        transform: translateY(-2px);
    }
    
    .nav-contact {
        display: block;
        background: linear-gradient(45deg, var(--primary), var(--secondary));
        color: white !important;
        padding: 15px 40px;
        border-radius: 30px;
        margin-top: 20px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .nav-contact:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(115, 171, 59, 0.3);
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .credibility-bar {
        padding: 30px 5%;
        /* Remove fixed attachment on mobile */
        background-attachment: scroll;
    }
    
    .credibility-logos {
        gap: 30px;
        min-height: 60px;
    }
    
    .credibility-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .logo-item img {
        height: 35px;
        filter: brightness(0) invert(1);
    }
    
    /* Hero section mobile optimizations */
    .hero {
        /* Ensure hero content is always readable on mobile */
        position: relative;
        min-height: 100vh;
    }    .hero-content {
        /* Improve text readability with subtle gradient instead of heavy blur */
        background: linear-gradient(145deg, 
            rgba(10, 10, 10, 0.15) 0%, 
            rgba(10, 10, 10, 0.25) 50%, 
            rgba(10, 10, 10, 0.15) 100%);
        padding: 20px;
        border-radius: 15px;
        /* Much lighter blur effect */
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);        /* Add subtle border for definition */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }    /* Footer mobile optimization - two rows */
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 15px 5px;
        max-width: 450px;
        margin: 0 auto 20px auto;
    }
    
    .footer-links a {
        font-size: 13px;
        text-align: center;
        padding: 8px 3px;
        line-height: 1.2;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 calc(25% - 5px);
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    /* Additional mobile-specific overrides for very small screens */
    .services,
    .packages,
    .problem,
    .methodology,
    .about,
    .contact,
    .hero {
        padding-left: 1%;
        padding-right: 1%;
        margin: 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Ensure all content containers respect screen width */
    .services-grid,
    .packages-grid,
    .problem-grid,
    .methodology-grid,
    .about-content,
    .contact-content,
    .hero-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }
    
    /* Override any potential width issues */
    .service-card,
    .package-card,
    .problem-card,
    .methodology-card {
        margin: 0 0 15px 0;
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .nav-links a {
        font-size: 20px;
    }
    
    .nav-contact {
        padding: 12px 30px;
        font-size: 16px;
    }
    
    .logo {
        margin: 0 50px; /* Adjust margin for smaller screens */
    }
    
    .logo img {
        height: 35px;
    }
    
    nav {
        padding: 15px 5%;
    }
    
    .hamburger {
        left: 10px; /* Adjust hamburger position for smaller screens */
    }
    
    .credibility-logos {
        gap: 20px;
    }
    
    .credibility-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .logo-item img {
        height: 30px;
    }
    
    /* Additional mobile video optimizations */
    .hero-video-background {
        /* Further reduce video opacity on very small screens */
        opacity: 0.2;
        /* Optimize for very small screens */
        object-fit: cover;
        object-position: center center;
    }    .hero-content {
        /* Slightly more prominent but still subtle background on small screens */
        background: linear-gradient(145deg, 
            rgba(10, 10, 10, 0.2) 0%, 
            rgba(10, 10, 10, 0.35) 50%, 
            rgba(10, 10, 10, 0.2) 100%);
        margin: 10px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }    /* Disable video on very slow connections or very small screens if needed */
    .hero.low-bandwidth .hero-video-background {
        display: none;
    }    /* Footer optimization for very small screens */
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px 3px;
        max-width: 350px;
    }
    
    .footer-links a {
        font-size: 12px;
        padding: 6px 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex: 0 0 calc(33.333% - 4px);
        min-width: 70px;
    }
}

/* Prefers reduced motion - disable video entirely */
@media (prefers-reduced-motion: reduce) {
    .hero-video-background {
        display: none;
    }
      .hero {
        background: radial-gradient(circle at 20% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    }
}

/* High contrast mode optimizations */
@media (prefers-contrast: high) {
    .hero-video-background {
        opacity: 0.2;
        filter: contrast(1.2) brightness(0.8);
    }
    
    .hero-content {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

/* Smooth Scroll Animations */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Hero content should be visible immediately */
.hero-content {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for service cards and similar elements */
.service-card.fade-in-element:nth-child(1) { transition-delay: 0.1s; }
.service-card.fade-in-element:nth-child(2) { transition-delay: 0.2s; }
.service-card.fade-in-element:nth-child(3) { transition-delay: 0.3s; }
.service-card.fade-in-element:nth-child(4) { transition-delay: 0.4s; }

.package-card.fade-in-element:nth-child(1) { transition-delay: 0.1s; }
.package-card.fade-in-element:nth-child(2) { transition-delay: 0.2s; }
.package-card.fade-in-element:nth-child(3) { transition-delay: 0.3s; }
.package-card.fade-in-element:nth-child(4) { transition-delay: 0.4s; }

/* Legacy animation support - keep for backwards compatibility */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Flow visualization background */
.flow-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.1;
}

.flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: flow 10s linear infinite;
}

@keyframes flow {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* Universal mobile overflow prevention */
@media (max-width: 768px) {
    /* Prevent any element from causing horizontal overflow */
    *, *::before, *::after {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    /* Ensure body and html properly constrain content */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Force all main containers to respect viewport width */
    .nav-container,
    .hero-content,
    .credibility-content,
    .section-header,
    .services-grid,
    .packages-grid,
    .problem-grid,
    .methodology-grid,
    .about-content,
    .contact-content,
    .footer-content {
        max-width: 100vw;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: max(2%, 10px);
        padding-right: max(2%, 10px);
        box-sizing: border-box;
    }
    
    /* Ensure images and media don't overflow */
    img, video, iframe, embed, object {
        max-width: 100%;
        height: auto;
    }
    
    /* Handle long text and prevent word overflow */
    h1, h2, h3, h4, h5, h6, p, div, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Ensure form elements don't overflow */
    input, textarea, select, button {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Additional safety for very small screens */
@media (max-width: 320px) {
    .hero h1 {
        font-size: 24px !important;
    }
    
    .hero p {
        font-size: 14px !important;
    }
    
    .section-header h2 {
        font-size: 32px !important;
    }
    
    .service-card,
    .package-card,
    .problem-card,
    .methodology-card {
        padding: 10px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .nav-links a {
        font-size: 18px !important;
        padding: 10px 15px !important;
    }
}
