/* Custom styles for NeuroxTech Global */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Global overrides */
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Logo animation */
nav img {
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.05);
}

/* Navigation enhancements */
nav {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

nav ul::-webkit-scrollbar {
    display: none;
}

nav ul li a {
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

nav ul li a:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

nav ul li a.text-blue-400::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #60A5FA;
    border-radius: 50%;
}

/* Hero section enhancements */
.hero-gradient {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(249, 115, 22, 0.6);
}

/* Card hover effects */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Form styling enhancements */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

/* Glowing text effect for headers */
.glow-text {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

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

::-webkit-scrollbar-track {
    background: #1F2937;
}

::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Loading animation for page transitions */
.page-transition {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile responsive enhancements */
/* Large screens (Desktop) */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }

    nav ul li a {
        padding: 10px 18px;
        font-size: 1rem;
    }

    .hero-section h1 {
        font-size: 4rem;
        line-height: 1.1;
    }

    .hero-section p {
        font-size: 1.25rem;
        line-height: 1.6;
    }
}

/* Medium screens (Tablet landscape) */
@media (max-width: 1024px) {
    nav ul {
        gap: 0.5rem;
    }

    nav ul li a {
        padding: 6px 12px;
        font-size: 0.875rem;
    }

    .hero-section h1 {
        font-size: 3rem;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 1.125rem;
    }

    /* Improve card layouts */
    .service-card {
        margin-bottom: 1.5rem;
    }

    /* Better spacing for sections */
    section {
        padding: 3rem 0;
    }
}

/* Small tablets (Portrait) */
@media (max-width: 768px) {

    /* Navigation adjustments */
    nav {
        padding: 0.75rem 1rem;
        height: 4rem;
    }

    nav img {
        height: 2.5rem;
    }

    /* Typography scaling */
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-section p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 2rem;
    }

    /* Section spacing */
    section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    /* Button improvements */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Card layout improvements */
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Form optimizations */
    .form-input {
        padding: 0.875rem;
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Contact info layout */
    .contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }
}

/* Mobile phones */
@media (max-width: 640px) {

    /* Navigation - mobile first */
    nav {
        padding: 0.75rem;
        height: auto;
        min-height: 3.5rem;
    }

    nav img {
        height: 2rem;
    }

    /* Hero section mobile optimization */
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .hero-section p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    /* Button stacking */
    .button-group {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    /* Typography scaling */
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    /* Spacing improvements */
    section {
        padding: 1.5rem 0;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* Card spacing */
    .service-card,
    .portfolio-item,
    .blog-card {
        margin-bottom: 1.25rem;
        padding: 1.25rem;
    }

    /* Footer improvements */
    footer {
        text-align: center;
        padding: 2rem 0;
    }

    footer .grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    nav {
        padding: 0.5rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 0.85rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    .service-card,
    .portfolio-item,
    .blog-card {
        padding: 1rem;
    }
}

/* Footer enhancements */
footer {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Custom utilities */
.text-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #F97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    background-color: rgba(31, 41, 55, 0.8);
}

/* Mobile-specific optimizations */
.mobile-optimized {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Touch-friendly buttons */
.touch-button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* Smooth scrolling for mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Mobile menu animations */
.mobile-menu-enter {
    animation: slideInRight 0.3s ease-out;
}

.mobile-menu-exit {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Improved focus states for accessibility and mobile */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    background-color: rgba(59, 130, 246, 0.05);
}

/* Better mobile form styling */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 1rem;
        border-radius: 8px;
        border: 2px solid #374151;
        background-color: #1F2937;
        color: white;
        width: 100%;
        box-sizing: border-box;
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
}

/* Image Optimization Styles */
img {
    max-width: 100%;
    height: auto;
    /* Optimize image loading */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    /* Prevent layout shift during image loading */
    aspect-ratio: attr(width) / attr(height);
}

/* Hero background images optimization */
.hero-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Enable GPU acceleration for smoother scrolling */
    transform: translateZ(0);
    will-change: transform;
}

/* Lazy loading placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* WebP support detection and fallback */
.webp .hero-bg {
    background-image: url('assets/global-connectivity-hero.webp');
}

.no-webp .hero-bg {
    background-image: url('assets/global-connectivity-hero.jpg');
}

/* Responsive image containers */
.img-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.img-container::before {
    content: '';
    display: block;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.img-container:hover img {
    transform: scale(1.05);
}