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

/* Custom Properties */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #0f172a;
  --text-color: #1e293b;
  --text-light: #64748b;
  --background-light: #f8fafc;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  /* Responsive Breakpoints */
  --mobile-s: 320px;
  --mobile-m: 375px;
  --mobile-l: 425px;
  --tablet: 768px;
  --laptop: 1024px;
  --laptop-l: 1440px;
  
  /* Touch Target Sizes */
  --touch-target-size: 44px;
  --touch-target-spacing: 8px;
  
  /* Performance Variables */
  --transition-speed: 0.3s;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--background-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animation Effects */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Optimized Animation Effects */
@media (prefers-reduced-motion: no-preference) {
  .animate-fade-in {
    animation: fadeIn 0.6s var(--transition-timing) forwards;
    will-change: transform, opacity;
  }
  
  .fade-in-right {
    animation: fadeInRight 0.6s var(--transition-timing) forwards;
    will-change: transform, opacity;
  }
  
  .fade-in-left {
    animation: fadeInLeft 0.6s var(--transition-timing) forwards;
    will-change: transform, opacity;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Custom Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--background-light);
  transform: translateY(-2px);
}

/* Card Hover Effects */
.card {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hero Section Enhancements */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0) 70%);
  z-index: 0;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0) 70%);
  z-index: 0;
}

/* Section Title Styling */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary-color);
}

/* Enhanced Mobile Responsiveness */
@media screen and (max-width: 640px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    max-width: 100%;
  }
  
  .hero-text h1 {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero-text p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Improved Touch Targets for Mobile */
  .btn,
  .nav-link,
  .nav-button,
  select,
  input[type="button"],
  input[type="submit"] {
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
    padding: 0.75rem 1rem;
    margin: var(--touch-target-spacing);
  }
  
  /* Stack Navigation Items */
  .nav-menu {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-item {
    width: 100%;
    text-align: center;
  }
  
  /* Adjust Card Layout */
  .card {
    margin: 0.5rem 0;
    width: 100%;
  }
  
  /* Form Elements */
  input,
  select,
  textarea {
    font-size: 16px; /* Prevent iOS zoom on focus */
    width: 100%;
    margin: 0.5rem 0;
  }
  
  /* Table Responsiveness */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablet Optimization */
@media screen and (min-width: 641px) and (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 90%;
    margin: 0 auto;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  /* Tablet Navigation */
  .nav-menu {
    padding: 0 1rem;
  }
  
  .nav-item {
    margin: 0 0.5rem;
  }
}

/* Landscape Mode Optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .nav-menu {
    padding: 0.5rem;
  }
  
  .mega-menu {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Touch Device Optimizations */
@media (hover: none) {
  .btn:hover,
  .nav-link:hover,
  .card:hover {
    transform: none;
    box-shadow: none;
  }
  
  .btn:active,
  .nav-link:active,
  .card:active {
    transform: scale(0.98);
  }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Accessibility Improvements */
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.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;
}

/* Client Logos Styling */
.client-logos-container {
  width: 100%;
  position: relative;
  padding: 20px 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.client-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 20px 0;
  width: 100%;
}

.client-logos-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
  animation: scroll 50s linear infinite;
  min-width: fit-content;
}

.client-logos::-webkit-scrollbar {
  display: none;
}

.client-logo {
  height: 50px;
  width: auto;
  max-width: 160px;
  min-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.7;
  background: white;
  padding: 8px;
  border-radius: 8px;
}

.client-logo:hover {
  transform: scale(1.05);
  filter: grayscale(0%);
  opacity: 1;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  z-index: 10;
  transition: all 0.3s ease;
}

.slider-nav.prev {
  left: 5px;
}

.slider-nav.next {
  right: 5px;
}

.slider-nav:hover {
  background: var(--background-light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: var(--primary-dark);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 20px));
  }
}

/* Responsive adjustments for client logos */
@media (max-width: 768px) {
  .client-logos-container {
    padding: 15px 35px;
  }
  
  .client-logos {
    gap: 25px;
    padding: 15px 0;
  }
  
  .client-logo {
    height: 40px;
    max-width: 130px;
    min-width: 100px;
    padding: 6px;
  }
  
  .slider-nav {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .client-logos-container {
    padding: 10px 30px;
  }
  
  .client-logos {
    gap: 20px;
    padding: 10px 0;
  }
  
  .client-logo {
    height: 35px;
    max-width: 110px;
    min-width: 90px;
    padding: 4px;
  }
  
  .slider-nav {
    width: 30px;
    height: 30px;
  }
}

/* Navigation Menu Styles */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: white;
  padding: 0.5rem 1rem;
}

.nav-item {
  position: relative;
  display: inline-block;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

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

.nav-button-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Mega Menu Styling */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 50;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.mega-menu-item {
  padding: 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.mega-menu-item:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

.mega-menu-title {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.mega-menu-title i {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.mega-menu-description {
  font-size: 0.875rem;
  color: var(--text-light);
}

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

.mega-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background-color: white;
  transform: rotate(45deg);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 10px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mobile-menu:not(.hidden) {
  animation: slideDown 0.3s ease-out forwards;
}

@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  
  .mega-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    padding: 0.5rem 0 0.5rem 1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .mega-menu::before {
    display: none;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
    justify-content: space-between;
  }
  
  .nav-button {
    width: 100%;
    justify-content: center;
  }
}

/* Form Styling */
input, select, textarea {
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Stats Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-counter {
  animation: countUp 1s ease-out forwards;
  display: inline-block;
  opacity: 1 !important;
  transform: none !important;
}

/* Grid Pattern Background */
.grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Technology Logo Styling */
.tech-logo {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
  padding: 4px;
}

.tech-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.tech-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tech-name {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* Performance Optimizations */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy Loading */
.lazy-load {
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-timing);
}

.lazy-load.loaded {
  opacity: 1;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: none;
    color: #000;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Mobile Menu Styles */
#mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transition: opacity 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    display: block;
}

#mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 50;
}

#mobile-menu-button:focus {
    outline: none;
}

#mobile-menu-button svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 768px) {
    #mobile-menu {
        display: none !important;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 