/* Reset and Base Styles */
:root {
    --navbar-padding: 0.75rem; /* Reduced from 1rem for better mobile experience */
    --navbar-border: 1px;
    --navbar-height: calc((var(--navbar-padding) * 2) + var(--navbar-border));
    --safe-area-top: env(safe-area-inset-top, 0px);
    --total-header-height: calc(var(--navbar-height) + var(--safe-area-top));
    
    /* Samsung device specific CSS variables */
    --samsung-touch-zone: 44px; /* Minimum touch target size for Samsung */
    --samsung-input-height: 48px; /* Optimal input height for Samsung keyboards */
    --samsung-navbar-padding: 0.5rem; /* Even more compact for Samsung */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Samsung device compatibility */
    -webkit-tap-highlight-color: rgba(0, 255, 65, 0.2);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for inputs and text areas */
input, textarea, select {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #00ff41;
    background-color: #000;
    overflow-x: hidden;
    /* Samsung browser compatibility */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Prevent iOS zoom on input focus for Samsung browsers */
    -webkit-text-size-adjust: none;
}

html {
    scroll-behavior: smooth;
    /* Samsung device specific fixes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-synthesis: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: var(--safe-area-top);
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    /* Samsung browser fallback */
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: var(--navbar-padding) 0;
    border-bottom: var(--navbar-border) solid #00ff41;
    /* Prevent navbar from disappearing on Samsung devices */
    will-change: transform;
    transform: translateZ(0);
}

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

/* Navigation logo removed - using only centered links */

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #00ff41;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff41;
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(90deg, #00ff41, #00ff00);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #00ff41;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - var(--safe-area-top));
    min-height: calc(100dvh - var(--safe-area-top)); /* Use dynamic viewport height on mobile for better browser support */
    margin-top: var(--total-header-height); /* Maintain consistent navbar offset */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, #001100 0%, #000000 100%);
}

.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 1;
    /* Fallback background for when JavaScript doesn't load */
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.1) 2px,
            rgba(0, 255, 65, 0.1) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(0, 255, 65, 0.05) 20px,
            rgba(0, 255, 65, 0.05) 22px
        );
    animation: matrix-scroll 20s linear infinite;
}

/* Animation for the fallback background */
@keyframes matrix-scroll {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 0 100vh, 0 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px; /* Add some padding for breathing room */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-logo {
    width: 80%; /* Smaller logo on mobile */
    height: auto;
    display: block;
    margin: 0 auto 2rem auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Service tile styling */
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid rgba(0, 255, 65, 0.3);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.hero-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.15), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    z-index: 1;
    opacity: 0;
}

.hero-logo:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    box-shadow: 0 20px 40px rgba(0, 255, 65, 0.4);
    transform: translateY(-10px) scale(1.05);
    backdrop-filter: blur(10px);
}

.hero-logo:hover::before {
    opacity: 1;
    animation: logoShine 0.8s ease-in-out;
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    color: #00ff41;
    text-shadow: 
        0 0 5px #00ff41,
        0 0 10px #00ff41,
        0 0 15px #00ff41;
    animation: glitch 2s infinite;
    margin-bottom: 1rem;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #4CAF50;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    background: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
    border-color: #00ff41;
}

.btn-primary:hover {
    background: #00ff00;
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    color: #00ff41;
    border-color: #00ff41;
}

.btn-secondary:hover {
    background: #00ff41;
    color: #000;
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.hero-contact {
    display: flex;
    gap: 3rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: #00ff41;
    font-size: 1.5rem;
}

/* Hero contact item links styling */
.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    position: relative;
}

.contact-item a:hover {
    color: #00ff00;
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 65, 0.2);
}

.contact-item a:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 255, 65, 0.3);
}

/* Add subtle underline animation for hero contact links */
.contact-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    transition: width 0.3s ease;
}

.contact-item a:hover::after {
    width: 100%;
}

/* Section Styles */
section {
    padding: 60px 0;
}

/* Alternating Background Styles */
.bg-variant-a {
    background: linear-gradient(135deg, #001100 0%, #000800 50%, #000000 100%);
    position: relative;
}

.bg-variant-a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 255, 65, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(0, 200, 50, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bg-variant-b {
    /* background: linear-gradient(135deg, #000000 0%, #111111 50%, #000000 100%); */
    position: relative;
}

.bg-variant-b::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 40% 30%, rgba(255, 255, 255, 0.01) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(0, 255, 65, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stays above background effects */
.bg-variant-a > *,
.bg-variant-b > * {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Services Grid */
.services {
    padding-bottom: 120px;
}

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

.services-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 3rem auto;
    padding: 2rem;
    max-width: 1400px;
    height: 380px;
    position: relative;
    overflow: visible;
}

.service-card {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: absolute;
    overflow: hidden;
    width: 280px;
    height: 450px; /* Increased height to accommodate varying content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between to flex-start for better control */
    align-items: center;
    text-decoration: none;
    color: inherit;
    z-index: 1;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
}

/* Cascading positions for each service card */
.service-card:nth-child(1) {
    left: 0%;
    top: 20px;
    transform: rotate(-2deg);
    z-index: 5;
}

.service-card:nth-child(2) {
    left: 18%;
    top: 0px;
    transform: rotate(1deg);
    z-index: 4;
}

.service-card:nth-child(3) {
    left: 36%;
    top: 30px;
    transform: rotate(-1deg);
    z-index: 3;
}

.service-card:nth-child(4) {
    left: 54%;
    top: 10px;
    transform: rotate(2deg);
    z-index: 2;
}

.service-card:nth-child(5) {
    left: 72%;
    top: 25px;
    transform: rotate(-1.5deg);
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.15), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    z-index: 1;
    opacity: 0;
}

.service-card:hover::before {
    opacity: 1;
    animation: cascadeShine 0.8s ease-in-out;
}

@keyframes cascadeShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.service-card:hover {
    transform: translateY(-20px) rotate(0deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 255, 65, 0.4);
    border-color: #00ff00;
    text-decoration: none;
    color: inherit;
    z-index: 100 !important;
    backdrop-filter: blur(10px);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #00ff41;
    position: relative;
    z-index: 2;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    color: #00ff41;
    line-height: 1.3;
    min-height: 3.6rem; /* Fixed height for titles - accommodates 2 lines */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-card p {
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    color: #00ff41;
    line-height: 1.5;
    font-size: 0.95rem;
    flex-grow: 1; /* Allow description to take available space */
    display: flex;
    align-items: flex-start; /* Align text to top of area */
    min-height: 4.5rem; /* Fixed minimum height for descriptions */
    max-height: 6rem; /* Maximum height to prevent overflow */
    overflow: hidden;
}

.service-link {
    color: #00ff41;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin-top: auto; /* Push to bottom */
    flex-shrink: 0; /* Prevent link from shrinking */
    padding: 0.5rem 0; /* Add some padding for consistent spacing */
}

.service-card:hover .service-link {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff41;
}

/* Product Sections */
.product-section {
    padding: 80px 0;
    position: relative;
}

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

/* Desktop: Explicit grid area names for better control */
@media (min-width: 1025px) {
    .product-content {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "text visual";
    }
    
    .product-content.reverse {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "visual text";
    }
    
    .product-text {
        grid-area: text;
    }
    
    .product-visual {
        grid-area: visual;
    }
}

.product-content.reverse {
    direction: ltr; /* Keep LTR for proper text rendering */
}

.product-content.reverse > * {
    direction: ltr;
}

.product-text {
    text-align: center;
    padding: 0 1rem;
}

.product-subtitle {
    font-size: 1.2rem;
    color: #4CAF50;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
    display: inline-block;
    max-width: 100%;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.feature-list i {
    color: #00ff41;
    font-size: 1.2rem;
}

.product-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 400px;
}

.tech-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 300px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    border-radius: 10px;
    text-align: center;
}

.teams-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 350px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    border-radius: 10px;
    text-align: center;
}

.teams-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.teams-icon i {
    font-size: 3rem;
    color: #00ff41;
}

.routing-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.flow-item {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.system-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 350px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    border-radius: 10px;
}

.system-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    border-radius: 8px;
    text-align: center;
}

.system-component i {
    font-size: 2rem;
    color: #00ff41;
}

.phone-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    border-radius: 10px;
}

.contact-cta {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
}

.contact-cta p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.contact-cta .btn {
    font-size: 1.1rem;
    padding: 15px 30px;
}

/* Contact Section */
.contact {
    /* Remove old background, will be handled by bg-variant class */
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding: 0 20px;
    align-items: start; /* Default alignment */
}

/* Mobile Contact Layout - Force Single Column */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr !important; /* Force single column on mobile */
        gap: 2rem !important;
        padding: 0 15px !important;
        align-items: stretch !important;
    }
    
    .contact-info {
        order: 1; /* Ensure contact info comes first */
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-form-section {
        order: 2; /* Ensure form comes second */
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    background: rgba(0, 255, 65, 0.02);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 10px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #00ff41;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    max-width: 350px;
    margin: 0 auto;
    flex-grow: 1; /* This will make the contact methods section fill remaining space */
    justify-content: center; /* Center the contact methods vertically */
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 255, 65, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    width: 100%;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.2);
}

.contact-method i {
    font-size: 1.8rem;
    color: #00ff41;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.contact-method div {
    flex-grow: 1;
}

.contact-method h4 {
    color: #00ff41;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-method p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

/* Contact method links styling */
.contact-method a,
.footer-section p a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.contact-method a:hover,
.footer-section p a:hover {
    color: #00ff00;
    background: rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 65, 0.2);
}

.contact-method a:active,
.footer-section p a:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 255, 65, 0.3);
}

/* Add a subtle underline that appears on hover */
.contact-method a::after,
.footer-section p a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    transition: width 0.3s ease;
}

.contact-method a:hover::after,
.footer-section p a:hover::after {
    width: 100%;
}

/* Clickable contact method wrapper styling */
.contact-method-link {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-radius: 8px;
    width: 100%;
}

.contact-method-link:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
}

.contact-method-link:hover .contact-method {
    background: rgba(0, 255, 65, 0.15);
    border-color: #00ff41;
    box-shadow: 0 8px 25px rgba(0, 255, 65, 0.3);
}

.contact-method-link:hover .contact-method i {
    color: #00ff00;
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
    transform: scale(1.1);
}

.contact-method-link:hover .contact-method h4 {
    color: #00ff00;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.contact-method-link:hover .contact-method p {
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.4);
}

.contact-method-link:active {
    transform: translateY(-1px);
}

.contact-method-link:active .contact-method {
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.4);
}

/* Contact Form Section Wrapper */
.contact-form-section {
    display: flex;
    flex-direction: column;
}

/* Contact Form */
.contact-form {
    flex-grow: 1; /* This will make the form stretch to fill available height */
    display: flex;
    flex-direction: column;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid #00ff41;
    padding: 2rem;
    border-radius: 10px;
    /* Samsung device optimizations */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;
}

.contact-form h3 {
    color: #00ff41;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Form content wrapper to allow proper spacing */
.contact-form > *:not(h3):not(.contact-form button) {
    flex-shrink: 0; /* Prevent form elements from shrinking */
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff41;
    border-radius: 5px;
    color: #00ff41;
    font-size: 16px; /* Prevent zoom on Samsung devices */
    /* Samsung device specific input fixes */
    min-height: var(--samsung-input-height);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-border-radius: 5px;
    /* Prevent Samsung browser zoom */
    -webkit-text-size-adjust: 100%;
    /* Better touch handling */
    touch-action: manipulation;
    /* Prevent Samsung keyboard issues */
    autocomplete: off;
    autocorrect: off;
    autocapitalize: off;
    spellcheck: false;
}

/* Samsung specific select styling */
.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    /* Samsung device focus improvements */
    -webkit-tap-highlight-color: rgba(0, 255, 65, 0.2);
    background: rgba(0, 0, 0, 0.9);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(0, 255, 65, 0.6);
    /* Samsung placeholder fixes */
    opacity: 1;
    -webkit-text-fill-color: rgba(0, 255, 65, 0.6);
}

.contact-form .g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    /* Samsung reCAPTCHA fixes */
    min-height: 78px;
    align-items: center;
}

.contact-form button {
    display: block;
    margin: auto auto 0 auto; /* Changed from '1.5rem auto 0 auto' to push button to bottom */
    padding: 12px 30px;
    background: linear-gradient(45deg, #00ff41, #00cc33);
    color: #000;
    border: 2px solid #00ff41;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px; /* Prevent Samsung zoom */
    cursor: pointer;
    transition: all 0.3s ease;
    /* Samsung button optimizations */
    min-height: var(--samsung-touch-zone);
    min-width: 120px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 255, 65, 0.3);
    will-change: transform, box-shadow;
}

.contact-form button:hover,
.contact-form button:active {
    background: #00ff00;
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer */
.footer {
    background: #000;
    border-top: 1px solid #00ff41;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 0 20px;
}

.footer-section {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 200px;
}

.footer-section h4 {
    color: #00ff41;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    width: 100%;
    max-width: 200px;
}

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

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

.footer-section ul li a:hover {
    color: #00ff41;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: rgba(0, 255, 65, 0.8);
    max-width: 250px;
    line-height: 1.6;
}

.footer-logo {
    height: 150px;
    width: auto;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Service tile styling */
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid rgba(0, 255, 65, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.footer-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.15), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    z-index: 1;
    opacity: 0;
}

.footer-logo:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    box-shadow: 0 15px 30px rgba(0, 255, 65, 0.4);
    transform: translateY(-5px) scale(1.05);
    backdrop-filter: blur(10px);
}

.footer-logo:hover::before {
    opacity: 1;
    animation: logoShine 0.8s ease-in-out;
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(0, 255, 65, 0.3);
    padding-top: 1.5rem;
    text-align: center;
    opacity: 0.7;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-content {
        gap: 3rem;
        align-items: start;
        padding: 0 1rem;
    }
    
    .product-text h2 {
        font-size: 2.2rem;
    }
    
    .product-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-list li {
        font-size: 1rem;
    }
    
    .product-visual {
        min-height: 350px;
        padding: 1.5rem;
    }
    
    .tech-diagram {
        gap: 1.2rem;
        max-width: 260px;
        padding: 1.5rem;
    }
    
    .tech-diagram .node {
        min-width: 120px;
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .tech-diagram .connection {
        height: 35px;
    }
    
    .tech-diagram .connection::after {
        top: 30px;
        font-size: 1.1rem;
    }
}

@media (max-width: 1024px) {
    /* Mobile navbar size reduction */
    :root {
        --navbar-padding: 0.5rem; /* Smaller padding for all mobile devices */
    }
    
    .navbar {
        padding: var(--navbar-padding) 0;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero {
        margin-top: calc(var(--navbar-padding) * 2 + var(--navbar-border) + var(--safe-area-top));
        padding-top: 1rem; /* Add breathing room */
    }
    
    .hero-content {
        padding: 1.5rem 15px; /* More compact on mobile */
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--total-header-height);
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-top: 1px solid #00ff41;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 1rem;
        display: block;
    }

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

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

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

    .glitch {
        font-size: 2.5rem;
    }

    .hero-content {
        padding: 1rem 15px; /* More compact padding on mobile */
    }

    .hero-logo {
        width: 90%; /* Smaller logo on mobile */
        padding: 1.5rem; /* Reduced padding for mobile */
    }

    .product-section {
        padding: 50px 0;
    }

    .contact {
        padding: 50px 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-contact {
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
        align-items: center;
    }

    .product-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 15px;
    }

    /* Mobile: Force consistent text-first layout regardless of reverse class */
    .product-content,
    .product-content.reverse {
        grid-template-columns: 1fr !important;
        direction: ltr !important; /* Override any RTL direction */
        grid-template-areas: 
            "text"
            "visual" !important;
    }

    .product-text {
        padding: 0;
        grid-area: text;
        order: 1; /* Force text to come first */
    }
    
    .product-visual {
        grid-area: visual;
        order: 2; /* Force visual to come second */
    }

    .feature-list {
        text-align: left;
        margin: 0 auto 2rem auto;
        max-width: 100%;
    }

    .product-visual {
        min-height: 300px;
        padding: 1rem;
    }

    .tech-diagram {
        max-width: 280px;
        padding: 1.5rem;
        gap: 1rem;
    }

    .teams-diagram {
        max-width: 300px;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .system-overview {
        grid-template-columns: 1fr;
        max-width: 280px;
        padding: 1.5rem;
    }

    .phone-showcase {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 280px;
        padding: 1.5rem;
    }

    .services-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        padding: 2rem 0; /* Simplified padding */
        gap: 2rem;
        height: auto;
        align-items: stretch;
        -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
        /* Ensure minimum width for proper scrolling */
        min-width: 100%;
        /* Better momentum scrolling on iOS */
        -webkit-scroll-snap-type: x mandatory;
        /* Allow both horizontal and vertical touch actions */
        touch-action: pan-x pan-y;
        /* Center the content within the viewport */
        justify-content: flex-start;
    }
    
    .service-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        flex-shrink: 0; /* Prevent cards from shrinking */
        width: 280px;
        max-width: 280px;
        min-width: 280px; /* Ensure consistent width */
        height: 420px;
        scroll-snap-align: center;
        scroll-snap-stop: always; /* Force stop at each card */
        -webkit-scroll-snap-align: center; /* Safari support */
        z-index: 1 !important;
        opacity: 0.6;
        transition: all 0.4s ease;
        border: 2px solid rgba(0, 255, 65, 0.5);
        transform: scale(0.9);
        /* Ensure proper box model */
        box-sizing: border-box;
        /* Allow vertical touch actions to pass through */
        touch-action: manipulation;
    }
    
    /* Active/centered service card styling */
    .service-card.active {
        opacity: 1;
        transform: scale(1) !important;
        border-color: #00ff00;
        box-shadow: 0 15px 35px rgba(0, 255, 65, 0.4);
        z-index: 10 !important;
    }
    
    .service-card:hover {
        opacity: 0.8;
    }
    
    .service-card.active:hover {
        opacity: 1;
        transform: scale(1.02) !important;
    }
    
    /* Clone cards styling */
    .service-card.service-clone {
        opacity: 0.4; /* Dimmer by default */
    }
    
    .service-card.service-clone.active {
        opacity: 1;
    }
    
    /* Hide scrollbar but keep functionality */
    .services-grid::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    
    .services-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* Ensure proper grid container on mobile */
    .services .container {
        max-width: 100%;
        padding: 0;
        overflow: visible; /* Changed from hidden to visible */
    }
    
    /* Ensure the services section doesn't interfere with page scrolling */
    .services {
        overflow: visible;
        position: relative;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 15px;
    }

    .contact-info {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .contact-methods {
        max-width: 100%;
        gap: 1.5rem;
    }

    .contact-method {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
    }

    .footer-section {
        min-height: auto;
        padding: 1.5rem 1rem;
    }

    .footer-section ul {
        max-width: 100%;
    }

    .footer-bottom {
        padding: 1rem 15px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        gap: 1.5rem;
    }
    
    .service-card {
        width: 260px;
        max-width: 260px;
        min-width: 260px;
        height: 400px;
        padding: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
        min-height: 3.2rem;
        margin-bottom: 1.2rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
        min-height: 4rem;
        max-height: 5.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .glitch {
        font-size: 2rem;
    }

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

    .product-text h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 24px; /* Increased for better Samsung touch targets */
        font-size: 16px; /* Prevent Samsung zoom */
        min-height: var(--samsung-touch-zone);
        min-width: 120px;
        -webkit-appearance: none;
        touch-action: manipulation;
    }

    .hero-content {
        padding: 50px 10px; /* Ultra-compact padding for small screens */
    }


    /* Ultra-compact padding for small mobile devices */
    section {
        padding: 30px 0;
    }

    .product-section {
        padding: 40px 0;
    }

    .contact {
        padding: 40px 0;
    }
    
    /* Service grid adjustments for extra small screens */
    .services-grid {
        gap: 1rem;
    }
    
    .service-card {
        width: 230px;
        max-width: 230px;
        min-width: 230px;
        height: 380px;
        padding: 1.25rem;
    }
    
    /* Samsung specific contact form fixes */
    .contact-form {
        padding: 1.5rem;
        margin: 0 auto;
        max-width: 100%;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 16px 12px; /* Larger padding for Samsung devices */
        font-size: 16px; /* Prevent zoom */
        border-width: 2px; /* Thicker borders for better visibility */
        border-radius: 8px; /* Slightly larger radius */
    }
    
    .form-group textarea {
        min-height: 120px; /* Ensure adequate height for Samsung keyboards */
        resize: vertical;
    }
    
    .contact-form button {
        width: 100%;
        padding: 16px;
        font-size: 18px;
        font-weight: 700;
        min-height: 56px; /* Extra large touch target for Samsung */
    }
    
    /* Samsung hamburger menu improvements */
    .hamburger {
        padding: 8px;
        min-width: var(--samsung-touch-zone);
        min-height: var(--samsung-touch-zone);
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .hamburger span {
        width: 24px;
        height: 3px;
        display: block;
    }

    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
        margin: 1rem 0;
    }
    
    .form-message {
        font-size: 14px;
        padding: 12px;
        border-radius: 6px;
        margin-top: 1rem;
        text-align: center;
    }
    
    /* Samsung specific reCAPTCHA container */
    .contact-form .g-recaptcha {
        width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 80px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        padding: 10px;
    }
    
    /* Samsung Internet browser specific fixes */
    @supports (-webkit-appearance: none) {
        .form-group input,
        .form-group select,
        .form-group textarea {
            -webkit-appearance: none;
            border-radius: 8px;
        }
        
        .contact-form button {
            -webkit-appearance: none;
            border-radius: 8px;
        }
    }
}

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

.service-card,
.product-section,
.contact-method {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #00ff41;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ff00;
}

/* Matrix Fly-in Animations */
.matrix-fly-container {
    position: relative;
    overflow: hidden;
}

.matrix-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.matrix-particles.active {
    opacity: 1;
}

.matrix-particle {
    position: absolute;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff41;
    animation-duration: 2s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
    opacity: 0;
}

/* Fly-in from left */
@keyframes flyInLeft {
    0% {
        transform: translateX(-100px) rotate(-10deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
}

/* Fly-in from right */
@keyframes flyInRight {
    0% {
        transform: translateX(100px) rotate(10deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
}

/* Fly-in from top */
@keyframes flyInTop {
    0% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
}

/* Fly-in from bottom */
@keyframes flyInBottom {
    0% {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
}

/* Spiral animation */
@keyframes spiral {
    0% {
        transform: translateX(-50px) translateY(-50px) rotate(0deg) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(0) translateY(0) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* Glitch effect for particles */
@keyframes glitchParticle {
    0% {
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translateX(-2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translateX(2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translateX(-1px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translateX(1px);
        filter: hue-rotate(360deg);
    }
    100% {
        transform: translateX(0);
        filter: hue-rotate(0deg);
        opacity: 0;
    }
}

/* Animation classes */
.matrix-particle.fly-left {
    animation-name: flyInLeft;
}

.matrix-particle.fly-right {
    animation-name: flyInRight;
}

.matrix-particle.fly-top {
    animation-name: flyInTop;
}

.matrix-particle.fly-bottom {
    animation-name: flyInBottom;
}

.matrix-particle.spiral {
    animation-name: spiral;
    animation-duration: 3s;
}

.matrix-particle.glitch {
    animation-name: glitchParticle;
    animation-duration: 1.5s;
}

/* Section content fade-in effect */
.section-content {
    transition: all 0.8s ease;
    transform: translateY(20px);
    opacity: 0;
}

.section-content.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .matrix-particle {
        font-size: 10px;
    }
    
    .matrix-particles {
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .matrix-particle {
        font-size: 8px;
    }
    
    .matrix-particles {
        opacity: 0.5;
    }
}

/* Continuous matrix particle styling */
.matrix-particle-continuous {
    position: absolute;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff41;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    opacity: 0.8;
    z-index: 1;
}

/* Continuous flow animations */
@keyframes matrixFlowLeft {
    0% {
        transform: translateX(0) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(-120vw) rotateY(-10deg);
        opacity: 0;
    }
}

@keyframes matrixFlowRight {
    0% {
        transform: translateX(0) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(120vw) rotateY(10deg);
        opacity: 0;
    }
}

@keyframes matrixFlowTop {
    0% {
        transform: translateY(-100px) rotateX(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(120vh) rotateX(5deg);
        opacity: 0;
    }
}

/* Form Message Styling */
.form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.form-message.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #27ae60;
    opacity: 1;
    transform: translateY(0);
}

.form-message.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    color: #c0392b;
    opacity: 1;
    transform: translateY(0);
}

/* reCAPTCHA container styling */
.g-recaptcha {
    transform: scale(0.95);
    transform-origin: center center;
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: center center;
        display: flex;
        justify-content: center;
    }
    
    .form-message {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* Mobile continuous matrix effect */
.mobile-matrix-wrapper {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    overflow: hidden; /* Clip particles to wrapper bounds */
    opacity: 0;
    transition: opacity 0.8s ease;
    /* Add a subtle border for debugging - remove in production */
    /* border: 1px solid rgba(0, 255, 65, 0.1); */
}

.mobile-matrix-wrapper.active {
    opacity: 1;
}

.matrix-particle-mobile-continuous {
    position: absolute;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 8px #00ff41;
    animation: mobileMatrixFlow infinite linear;
    opacity: 0.9;
    z-index: 1;
    pointer-events: none;
}

@keyframes mobileMatrixFlow {
    0% {
        transform: translateY(0px) rotateZ(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.9;
    }
    95% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(var(--flow-distance)) rotateZ(5deg);
        opacity: 0;
    }
}

/* Mobile optimizations for continuous effect */
@media (max-width: 768px) {
    .matrix-particle-mobile-continuous {
        font-size: 12px;
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .matrix-particle-mobile-continuous {
        font-size: 10px;
        opacity: 0.7;
    }
}

/* Service indicators for mobile */
@media (max-width: 1024px) {
    .services .container {
        position: relative;
    }
    
    .services-indicators {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 2rem;
        padding: 0 20px;
    }
    
    .service-indicator {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(0, 255, 65, 0.3);
        border: 1px solid #00ff41;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .service-indicator.active {
        background: #00ff41;
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.6);
        transform: scale(1.2);
    }
    
    .service-indicator:hover {
        background: rgba(0, 255, 65, 0.6);
        transform: scale(1.1);
    }
    
    /* Matrix effect on active indicator */
    .service-indicator.active::after {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        border: 1px solid #00ff41;
        border-radius: 50%;
        animation: pulseIndicator 2s ease-in-out infinite;
    }
    
    @keyframes pulseIndicator {
        0%, 100% {
            transform: scale(1);
            opacity: 1;
        }
        50% {
            transform: scale(1.5);
            opacity: 0;
        }
    }
    
    /* Navigation hints */
    .services-nav-hint {
        text-align: center;
        margin-top: 1rem;
        color: rgba(0, 255, 65, 0.7);
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .services-nav-hint i {
        font-size: 1.2rem;
        animation: swipeHint 2s ease-in-out infinite;
    }
    
    @keyframes swipeHint {
        0%, 100% {
            transform: translateX(-5px);
        }
        50% {
            transform: translateX(5px);
        }
    }
}

/* Hide mobile indicators and hints on desktop */
@media (min-width: 1025px) {
    .service-card.service-clone {
        display: none;
    }
    
    /* Restore original desktop layout */
    .services-grid {
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        margin: 3rem auto !important;
        padding: 2rem !important;
        max-width: 1400px !important;
        height: 380px !important;
        position: relative !important;
        overflow: visible !important;
        flex-direction: row !important;
        gap: 0 !important;
        scroll-snap-type: none !important;
        touch-action: auto !important;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: auto !important;
        -webkit-scroll-snap-type: none !important;
        justify-content: center !important;
    }
    
    /* Restore original service card positioning */
    .service-card {
        position: absolute !important;
        width: 280px !important;
        height: 450px !important;
        opacity: 1 !important;
        transform: none !important;
        border: 1px solid #00ff41 !important;
        scroll-snap-align: unset !important;
        flex-shrink: unset !important;
        box-sizing: border-box !important;
        touch-action: auto !important;
    }
    
    /* Restore cascading positions for each service card */
    .service-card.service-original:nth-child(3) { /* First original card (SIP Trunks) */
        left: 0% !important;
        top: 20px !important;
        transform: rotate(-2deg) !important;
        z-index: 5 !important;
    }

    .service-card.service-original:nth-child(4) { /* Second original card (Teams) */
        left: 18% !important;
        top: 0px !important;
        transform: rotate(1deg) !important;
        z-index: 4 !important;
    }

    .service-card.service-original:nth-child(5) { /* Third original card (3CX) */
        left: 36% !important;
        top: 30px !important;
        transform: rotate(-1deg) !important;
        z-index: 3 !important;
    }

    .service-card.service-original:nth-child(6) { /* Fourth original card (Hardware) */
        left: 54% !important;
        top: 10px !important;
        transform: rotate(2deg) !important;
        z-index: 2 !important;
    }

    .service-card.service-original:nth-child(7) { /* Fifth original card (Custom) */
        left: 72% !important;
        top: 25px !important;
        transform: rotate(-1.5deg) !important;
        z-index: 1 !important;
    }
    
    /* Desktop hover behavior - ensure hovered cards come to front */
    .service-card.service-original:nth-child(3):hover,
    .service-card.service-original:nth-child(4):hover,
    .service-card.service-original:nth-child(5):hover,
    .service-card.service-original:nth-child(6):hover,
    .service-card.service-original:nth-child(7):hover {
        z-index: 999 !important;
        transform: translateY(-20px) rotate(0deg) scale(1.05) !important;
        box-shadow: 0 20px 40px rgba(0, 255, 65, 0.4) !important;
        border-color: #00ff00 !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .services-indicators,
    .services-nav-hint {
        display: none;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .glitch {
        font-size: 2rem;
    }

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

    .product-text h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 50px 10px; /* Ultra-compact padding for small screens */
    }

    /* Ultra-compact padding for small mobile devices */
    section {
        padding: 30px 0;
    }

    .product-section {
        padding: 40px 0;
    }

    .contact {
        padding: 40px 0;
    }
    
    /* Service grid adjustments for extra small screens */
    .services-grid {
        gap: 1rem;
    }
    
    .service-card {
        width: 230px;
        max-width: 230px;
        min-width: 230px;
        height: 380px;
        padding: 1.25rem;
    }
}

/* Service Icon Display for Product Sections */
.service-icon-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 300px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-icon-display i {
    font-size: 8rem;
    color: #00ff41;
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.6);
    transition: all 0.8s ease;
    z-index: 2;
    position: relative;
}

.service-icon-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    border-radius: 50%;
    animation: rotateGlow 8s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-icon-display::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 50%;
    transition: all 0.8s ease;
}

/* Hover effects for service icon displays */
.product-section:hover .service-icon-display {
    border-color: #00ff41;
    box-shadow: 0 0 50px rgba(0, 255, 65, 0.4);
    transform: scale(1.05);
}

.product-section:hover .service-icon-display::before {
    opacity: 1;
}

.product-section:hover .service-icon-display::after {
    border-color: #00ff41;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.2);
}

.product-section:hover .service-icon-display i {
    color: #00ff00;
    text-shadow: 0 0 40px rgba(0, 255, 65, 0.8);
    transform: scale(1.1);
}

/* Animation for rotating glow */
@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments for service icons */
@media (max-width: 1024px) {
    .service-icon-display {
        width: 250px;
        height: 250px;
    }
    
    .service-icon-display i {
        font-size: 6rem;
    }
}

@media (max-width: 768px) {
    .service-icon-display {
        width: 200px;
        height: 200px;
    }
    
    .service-icon-display i {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .service-icon-display {
        width: 150px;
        height: 150px;
    }
    
    .service-icon-display i {
        font-size: 4rem;
    }
}

/* Desktop Equal Height Contact Sections */
@media (min-width: 1025px) {
    .contact-content {
        align-items: stretch; /* Keep stretch for fallback */
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
    }
    
    .contact-methods {
        flex-grow: 1;
        justify-content: center;
    }
    
    .contact-form-section {
        display: flex;
        flex-direction: column;
    }
    
    .contact-form {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .contact-form button {
        margin-top: auto; /* Push button to bottom in desktop */
        margin-bottom: 0;
    }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding: 0 20px;
    align-items: start; /* Default alignment */
}

/* Samsung mobile logo adjustments */
@media screen and (max-width: 480px) {
    .samsung-device {
        min-width: 320px !important;
        max-width: 100% !important;
    }
    
    .samsung-device body {
        font-size: 14px !important;
        overflow-x: hidden !important;
    }
    
    .samsung-device .hero {
        margin-top: calc(var(--samsung-navbar-padding) * 2 + 1px) !important; /* Minimal top margin */
        padding-top: 0.5rem !important; /* Minimal padding */
    }
    
    .samsung-device .hero-content {
        padding: 0.5rem 10px !important; /* Ultra-compact */
        transform: translateY(-1rem) !important; /* Pull content up more on small screens */
    }
    
    .samsung-device .hero-text {
        margin-bottom: 1.5rem !important; /* Reduce spacing */
    }
    
    .samsung-device .contact-form {
        padding: 1rem !important;
        margin: 1rem auto !important;
        max-width: calc(100% - 2rem) !important;
        border-radius: 12px !important;
    }
    
    .samsung-device .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    .samsung-device .form-group input,
    .samsung-device .form-group select,
    .samsung-device .form-group textarea {
        padding: 18px 14px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
        border-width: 2px !important;
    }
    
    .samsung-device .form-group textarea {
        min-height: 140px !important;
        resize: vertical !important;
    }
    
    .samsung-device .contact-form button {
        padding: 20px !important;
        font-size: 18px !important;
        min-height: 60px !important;
        border-radius: 10px !important;
        margin-top: 2rem !important;
    }
    
    .samsung-device .glitch {
        font-size: 1.8rem !important;
    }
    
    .samsung-device .section-title {
        font-size: 1.8rem !important;
    }
}

/* Samsung navbar fixes */
.samsung-device .navbar {
    padding: var(--samsung-navbar-padding) 0 !important;
    min-height: auto !important;
    /* Reduce Samsung navbar size */
}

.samsung-device .nav-container {
    padding: 0 15px !important;
    min-height: auto !important;
}

/* Samsung hero section fixes */
.samsung-device .hero {
    /* Reduce the top margin that pushes content down */
    margin-top: calc(var(--samsung-navbar-padding) * 2 + var(--navbar-border) + var(--safe-area-top)) !important;
    min-height: calc(100vh - calc(var(--samsung-navbar-padding) * 2 + var(--navbar-border) + var(--safe-area-top))) !important;
    padding-top: 1rem !important; /* Add some breathing room at the top */
}

.samsung-device .hero-content {
    padding: 1rem 15px !important; /* More compact padding */
    /* Reduce top spacing */
    transform: translateY(-2rem) !important; /* Pull content up slightly */
}

/* Extra small mobile screens - ultra-compact layout */
@media (max-width: 390px) {
    /* Even more compact navbar */
    :root {
        --navbar-padding: 0.4rem;
    }

    .container {
        padding: 0 0 !important;
    
    .hero {
        margin-top: calc(var(--navbar-padding) * 2 + var(--navbar-border)) !important;
        padding-top: 50px !important;
    }
    
    .hero-content {
        padding: 0.75rem 10px !important;
        transform: translateY(-0.5rem) !important;
    }
    
    
    .glitch {
        font-size: 1.6rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .hero-text {
        margin-bottom: 1.25rem !important;
    }
}