@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700&display=swap");

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #0f172a;
  --accent: #6366f1;
  --background: #ffffff;
  --surface: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --container: 1280px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

/* Mobile Performance Optimizations & Smooth Scrolling */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  /* Enhanced smooth scrolling */
  scroll-padding-top: 80px; /* Account for fixed nav */
}

/* Smooth scroll for all anchor links */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Optimize scrolling performance on mobile */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
}

/* Mobile-safe scroll lock - only applies on desktop */
body.no-scroll-desktop {
  overflow: hidden;
}

/* Force scrolling on mobile even if class is applied */
@media (max-width: 768px) {
  body.no-scroll-desktop {
    overflow-x: hidden !important;
    overflow-y: auto !important; /* Always allow vertical scrolling on mobile */
    position: static !important;
  }
}

/* Improve touch responsiveness */
a,
button,
input,
textarea,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Allow default touch behavior for scrolling - removed overly restrictive touch-action */
/* touch-action: pan-y pinch-zoom can interfere with native scrolling on some devices */

img,
.hero-video {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: #000;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Outfit", sans-serif;
  color: var(--secondary);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 9999999 !important; /* ULTRA HIGH PRIORITY */
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  isolation: isolate; /* Create clean stacking context at the root level */
  overflow: visible !important; /* Ensure mobile menu isn't clipped */
}

/* Background and Blur via pseudo-element to avoid stacking context trap for fixed children */
/* Background via pseudo-element */
nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white; /* Solid background for performance */
  z-index: -1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Disable expensive backdrop blur on mobile for better performance */
@media (max-width: 768px) {
  nav::before {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 2rem;
  position: relative;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 2rem;
}

.logo-img {
  height: 48px;
  mix-blend-mode: multiply;
}

.logo span {
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--secondary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 2002; /* Highest z-index to stay above everything */
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px; /* Touch-friendly size */
  min-height: 44px;
}

/* Mobile Menu Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.6); /* Slightly darker for better focus */
  z-index: 9999990 !important; /* Just below navigation and links */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Global Scroll Lock - Managed via nav-active to ensure z-index overrides */
html.nav-active,
html.nav-active body {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
}

.no-scroll {
  overflow: hidden !important;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1;
  justify-content: center;
  margin: 0 auto;
  max-width: 900px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-main);
  white-space: nowrap;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  letter-spacing: 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-1px);
}

.nav-cta {
  background: var(--secondary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  flex-shrink: 0;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.nav-cta:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* --- Dropdown Menu --- */
.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 0;
  min-height: auto;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: var(--surface);
  color: var(--primary);
  transform: none;
  padding-left: 1.75rem;
}

/* Dropdown Toggle Arrow */
.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-toggle::after {
  content: "\f107"; /* FontAwesome angle-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* --- Social Media Links (Footer) --- */
.footer-social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: #ffffff;
  border-radius: 50%;
  transition: var(--transition);
  color: var(--secondary);
  font-size: 1.25rem;
}

.footer-social-links a:hover {
  background: var(--primary);
  color: white; /* Ensure text/icon stays white */
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

/* --- Hero Section --- */
.hero {
  padding: 180px 0 100px;
  background: radial-gradient(circle at top right, #f1f5f9 0%, #ffffff 50%);
  text-align: center;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  display: inline-block;
  min-height: 44px;
  min-width: 120px;
  text-align: center;
  touch-action: manipulation;
  cursor: pointer;
  /* Premium animation */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02) translateZ(0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0) scale(0.98) translateZ(0);
  transition-duration: 0.1s;
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .btn:hover {
    transform: translateZ(0);
  }
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  touch-action: manipulation;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  background: var(--secondary);
  color: white;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

/* Mobile: disable hover lift */
@media (hover: none) {
  .btn-outline:hover {
    transform: translateZ(0);
  }
}

/* --- Cards --- */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  /* Premium text animation */
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.1s;
}

.section-title p {
  opacity: 0;
  transform: translateY(15px) translateZ(0);
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition);
  will-change: transform;
  transform: translateZ(0);
  /* Mobile performance optimization */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card:hover {
  transform: translateY(-10px) translateZ(0);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.card-icon {
  width: auto;
  height: auto;
  background: none;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: none;
  transition: var(--transition);
  animation: floating 3s ease-in-out infinite;
  will-change: transform;
  /* GPU acceleration for smooth animations */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.card:hover .card-icon {
  transform: scale(1.1) translateZ(0);
  color: var(--primary-dark);
}

/* --- Metrics --- */
.metrics {
  padding: 100px 0;
  background: var(--secondary);
  color: white;
}

.metrics h2 {
  color: white;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
}

.metric-item span {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  font-family: "Outfit";
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.metric-item p {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* --- Footer --- */
footer {
  padding: 20px 0 10px; /* Further reduced */
  background: #000;
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem; /* Further reduced */
  margin-bottom: 1.5rem; /* Further reduced */
}

.footer-brand p {
  margin-top: 0.5rem; /* Further reduced */
  opacity: 0.6;
  max-width: 300px;
  font-size: 0.85rem;
}

.footer-links h4 {
  color: white;
  margin-bottom: 0.5rem; /* Further reduced */
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links li {
  margin-bottom: 0.25rem; /* Further reduced */
}

.footer-links a {
  opacity: 0.6;
  font-size: 0.85rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem; /* Further reduced */
  display: flex;
  justify-content: space-between;
  /* opacity: 0.4; Removed */
  font-size: 0.8rem;
}

.footer-bottom p {
  opacity: 0.5;
}

/* --- Carousel --- */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
  transform: translateZ(0);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  text-align: left;
}

.carousel-caption h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 0.75rem;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

/* --- Utilities --- */
.text-center {
  text-align: center;
}
.py-100 {
  padding: 100px 0;
}
.w-100 {
  width: 100%;
}
.rounded {
  border-radius: var(--radius-lg);
}
.rounded-lg {
  border-radius: 2rem;
}
.rounded-sm {
  border-radius: var(--radius-sm);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
  /* Mobile optimization */
  backface-visibility: hidden;
}

/* Reduce animation complexity on mobile for better performance */
@media (max-width: 768px) {
  .scroll-reveal {
    transform: translateY(15px); /* Smaller movement */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Faster */
  }
  
  /* Simplify floating animation on mobile */
  @keyframes floating {
    0%, 100% {
      transform: translateY(0px) translateZ(0);
    }
    50% {
      transform: translateY(-5px) translateZ(0); /* Reduced from -10px */
    }
  }
  
  /* Faster, simpler pulse on mobile */
  @keyframes pulse {
    0%, 100% {
      transform: scale(1) translateZ(0);
    }
    50% {
      transform: scale(1.02) translateZ(0); /* Reduced from 1.05 */
    }
  }
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.scroll-fade.revealed {
  opacity: 1;
}

.scroll-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-slide-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-slide-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Animation Classes */
.animate-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade {
  animation: fadeIn 1s ease-out forwards;
}

.animate-scale {
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.8s ease forwards;
}

.animate-slide-right {
  animation: slideInRight 0.8s ease forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.delay-4 {
  animation-delay: 0.8s;
}

.delay-5 {
  animation-delay: 1s;
}

.animate-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade {
  animation: fadeIn 1s ease-out forwards;
}

.animate-scale {
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}

/* --- Responsive --- */
/* --- Responsive Grids --- */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-2-cols-uneven {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-2-cols-uneven-reverse {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

/* --- Footer --- */
footer {
  padding: 30px 0 15px; /* Reduced padding */
  background: #000;
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 1.5rem;
  margin-bottom: 15px;
}

.footer-brand .logo {
  font-size: 1.3rem; /* Slightly smaller */
}

.footer-brand p {
  margin-top: 0.5rem;
  opacity: 0.6;
  max-width: 100%;
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer-links h4 {
  color: white;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.footer-links ul {
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.3rem; /* Tighter list */
  line-height: 1.2;
}

.footer-links a {
  opacity: 0.6;
  font-size: 0.8rem;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
  padding-left: 3px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05); /* Lighter border */
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* opacity: 0.5; Removed to allow full white icons */
  font-size: 0.75rem;
}

.footer-bottom p {
  opacity: 0.5;
}

/* --- Carousel --- */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  text-align: left;
}

.carousel-caption h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 0.75rem;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: white;
  transform: scale(1.2);
}

/* --- Utilities --- */
.text-center {
  text-align: center;
}
.py-100 {
  padding: 100px 0;
}
.w-100 {
  width: 100%;
}
.rounded {
  border-radius: var(--radius-lg);
}
.rounded-sm {
  border-radius: var(--radius-sm);
}

/* --- Background Utilities --- */
.bg-surface {
  background-color: var(--surface);
}

/* --- Padding Utilities --- */
.p-6 {
  padding: 1.5rem;
}
.p-12 {
  padding: 3rem;
}
@media (max-width: 768px) {
  .p-12 {
    padding: 1.5rem;
  }
}

/* --- Spacing Utilities --- */
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mb-6 {
  margin-bottom: 3rem;
}

.pt-hero {
  padding-top: 150px;
  padding-bottom: 60px;
}

@media (max-width: 1024px) {
  .pt-hero {
    padding-top: 120px;
    padding-bottom: 40px;
  }
}
@media (max-width: 480px) {
  .pt-hero {
    padding-top: 100px;
    padding-bottom: 30px;
  }
}

.gap-large {
  gap: 4rem;
}
@media (max-width: 1024px) {
  .gap-large {
    gap: 2.5rem;
  }
}

/* --- Border Utilities --- */
.border-primary-left {
  border-left: 4px solid var(--primary);
}

/* --- Form Utilities --- */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* --- Phone Input Styling (intl-tel-input overrides) --- */
.iti {
  width: 100%;
  display: block;
  margin-bottom: 0;
}

.iti__flag {
  background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/img/flags@2x.png");
  }
}

.phone-input-group {
  position: relative;
  z-index: 10; /* Ensure dropdown appears above other elements */
}

/* Ensure the input matches other form fields */
.iti input, 
.iti input[type=tel] {
  width: 100%;
  height: 100%;
  padding-left: 90px !important; /* Make room for the flag dropdown */
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.iti input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mt-2 {
  margin-top: 1rem;
}

/* Text & Color Utilities */
.text-primary {
  color: var(--primary);
}
.text-white {
  color: white;
}
.bg-secondary {
  background-color: var(--secondary);
}
.font-bold {
  font-weight: 700;
}
.tracking-wide {
  letter-spacing: 2px;
}
.uppercase {
  text-transform: uppercase;
}

/* Effects */
.shadow-glow {
  box-shadow: var(--shadow-glow);
}

.mt-2 {
  margin-top: 1rem;
}
.w-100 {
  width: 100%;
}
.relative {
  position: relative;
}
.overflow-hidden {
  overflow: hidden;
}
.text-4xl {
  font-size: 2.5rem;
}
.text-white-80 {
  color: rgba(255, 255, 255, 0.8);
}

/* Grid Utilities */
.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 1024px) {
  .grid-3-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-3-cols {
    grid-template-columns: 1fr;
  }
}

/* Responsive Typography Utilities */
.text-responsive-h1 {
  font-size: 3rem;
  line-height: 1.2;
}

.text-responsive-h2 {
  font-size: 2.5rem;
  line-height: 1.3;
}

.text-responsive-h2-large {
  font-size: 2.8rem;
  line-height: 1.2;
}

@media (max-width: 1200px) {
  .text-responsive-h1 {
    font-size: 2.5rem;
  }
  .text-responsive-h2-large {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .text-responsive-h1 {
    font-size: 2rem;
  }
  .text-responsive-h2 {
    font-size: 1.75rem;
  }
  .text-responsive-h2-large {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .text-responsive-h1 {
    font-size: 1.75rem;
  }
  .text-responsive-h2 {
    font-size: 1.5rem;
  }
  .text-responsive-h2-large {
    font-size: 1.6rem;
  }
}

.text-responsive-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.text-responsive-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  margin-top: 1rem;
  display: inline-block;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.animate-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fade {
  animation: fadeIn 1s ease-out forwards;
}

.animate-scale {
  animation: scaleIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}
.delay-3 {
  animation-delay: 0.6s;
}

/* --- Responsive Media Queries --- */

/* Large Desktop (min-width: 1280px) */
@media (min-width: 1280px) {
  .nav-links {
    gap: 0.5rem;
  }

  .nav-links a {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .logo {
    font-size: 1.6rem;
  }
}

/* Extra Large Desktop (min-width: 1440px) */
@media (min-width: 1440px) {
  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    padding: 10px 18px;
    font-size: 0.95rem;
  }
}

/* Ultra Wide Desktop (min-width: 1600px) */
@media (min-width: 1600px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    padding: 12px 20px;
    font-size: 1rem;
  }
}

/* Cleaned up aggressive laptop queries - now handled by 1024px mobile split */

/* Laptop (max-width: 1200px) */
@media (max-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .grid-2-cols {
    gap: 2.5rem;
  }
}

/* Tablet / Small Laptop (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero {
    padding: 140px 0 70px;
  }
  .hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
  }

  /* Disable hover effects on touch devices to better handle clicks */
  .card:hover {
    transform: none;
    box-shadow: none; /* or keep default shadow if needed */
    border-color: var(--border);
  }
  .card:hover .card-icon {
    transform: none;
    color: var(--primary); /* Keep default color */
  }

  /* Stop floating animations on mobile to ensure clickable targets */
  .animate-float,
  .card-icon {
    animation: none !important;
    transform: none !important;
  }

  .hero p {
    font-size: 1.1rem;
  }
  .section-title h2 {
    font-size: 2rem;
  }
  .py-100 {
    padding: 70px 0;
  }

  .grid-2-cols,
  .grid-2-cols-uneven,
  .grid-2-cols-uneven-reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .grid-2-cols-uneven-reverse {
    display: flex;
    flex-direction: column-reverse;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .metric-item span {
    font-size: 2.5rem;
  }

  .carousel-slide img {
    height: 400px;
  }

  .carousel-caption {
    padding: 2rem 1.5rem;
  }

  .carousel-caption h3 {
    font-size: 1.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: span 2;
    text-align: center;
    margin-bottom: 1rem;
  }
  .footer-brand p {
    margin: 0.5rem auto;
  }
  .footer-contact-item {
    justify-content: center;
  }

  /* Mobile Touch Target Optimizations */
  button,
  a,
  input,
  select,
  textarea,
  .btn,
  .mobile-toggle {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
  }

  /* Improve readability on mobile */
  body {
    font-size: 16px; /* Prevent iOS zoom on input focus */
  }

  input,
  textarea,
  select {
    font-size: 16px; /* Prevent iOS zoom */
  }

  /* Optimize animations for individual elements instead of global */
  .card,
  .hero img,
  .nav-links {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Reduce animation complexity on mobile */
  .card,
  .animate-up,
  .animate-scale {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;
  }
}

/* Ensure nav-links are always visible on desktop */
@media (min-width: 1024px) {
  .nav-links {
    display: flex !important; /* Force display on desktop */
  }

  .mobile-toggle {
    display: none !important; /* Hide hamburger on desktop */
  }
}

/* Tablet & Mobile Toggle Trigger (max-width: 1023px) */
@media (max-width: 1023px) {
  .nav-links:not(.active) {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-cta {
    display: none;
  }

  .logo {
    font-size: 1.3rem;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto !important; /* Force vertical scrolling on mobile */
    width: 100%;
    height: 100%;
    position: relative;
  }

  body {
    font-size: 15px;
    /* Critical: ensure body is always scrollable on mobile */
    position: relative !important;
    -webkit-overflow-scrolling: touch;
  }

  .container {
    padding: 0 1.25rem;
    width: 100%;
    overflow-x: hidden;
  }

  .py-100 {
    padding: 50px 0;
  }

  /* Navigation */
  nav {
    height: 70px;
    /* Disable transform to prevent stacking context issues for fixed children */
    transform: none !important;
    will-change: auto !important;
  }

  /* Force scroll on mobile */
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000001 !important; /* Above nav links for visibility */
    padding: 0.75rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
    background: transparent !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    position: relative !important;
    color: var(--secondary) !important;
    margin-left: auto !important;
  }

  .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100% !important;
    height: 100dvh !important;
    background: white !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 80px 0 20px !important;
    z-index: 10000000 !important; /* ABSOLUTE TOP */
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.2) !important;
    overflow-y: auto !important;
    display: flex !important;
    transform: translateX(-110%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: var(--surface);
    color: var(--primary);
  }
  .dropdown {
    display: block;
    width: 100%;
    height: auto;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* Hidden by default, toggled via JS */
    background: var(--surface);
    margin-top: 0;
    width: 100%;
    min-width: 100%;
  }

  .dropdown-menu.active {
    display: block;
  }

  .dropdown-menu a {
    padding-left: 2.5rem; /* Indent sub-items */
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
  }

  .dropdown-menu a:hover {
    padding-left: 3rem;
  }

  /* Custom Grids for Mobile Fixes */
  .grid-3-cols-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .grid-global-map {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-toggle::after {
    float: right;
  }

  .dropdown.active .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .nav-cta {
    display: none;
  }

  /* Hero */
  .hero,
  .pt-hero {
    padding-top: 100px !important; /* Force reduce top padding */
    padding-bottom: 40px;
    overflow-x: hidden;
  }

  /* Mobile Grid Overrides */
  .grid-3-cols-custom,
  .grid-global-map {
    grid-template-columns: 1fr; /* Force single column on mobile */
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 1.8rem; /* Slightly smaller for better fit */
    line-height: 1.25;
    margin-bottom: 1.25rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    padding: 0 1rem; /* Add padding for buttons validation */
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 0.875rem 2rem;
  }

  /* Typography */
  .section-title h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .section-title p {
    font-size: 0.95rem;
  }

  /* Grids */
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-2-cols,
  .grid-2-cols-uneven,
  .grid-2-cols-uneven-reverse {
    gap: 2rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card:hover {
    transform: none;
  }

  .card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    animation: none;
  }

  /* Metrics */
  .metrics {
    padding: 50px 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .metric-item span {
    font-size: 2rem;
  }

  .metric-item p {
    font-size: 0.9rem;
  }

  /* Carousel */
  .carousel-slide img {
    height: 300px;
  }

  .carousel-caption {
    padding: 1.5rem 1rem;
  }

  .carousel-caption h3 {
    font-size: 1.1rem;
  }

  .carousel-caption p {
    font-size: 0.85rem;
  }

  .carousel-dots {
    bottom: 1rem;
    right: 1rem;
    gap: 0.5rem;
  }

  .dot {
    width: 8px;
    height: 8px;
    min-width: unset; /* Reset min width */
    min-height: unset;
    padding: 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-links:last-child {
    grid-column: span 1;
    border-bottom: 0;
  }

  .footer-contact-item {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Disable animations on mobile for performance */
  .animate-up,
  .animate-fade,
  .animate-scale {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Tablet Landscape & Small Desktop (max-width: 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .carousel-slide img {
    height: 280px;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .py-100 {
    padding: 40px 0;
  }

  nav {
    height: 65px;
  }

  .logo {
    font-size: 1.15rem;
  }

  .logo-img {
    height: 35px !important;
  }

  .hero {
    padding: 100px 0 40px;
  }

  .hero h1 {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card h3 {
    font-size: 1.1rem;
  }

  .metrics {
    padding: 40px 0;
  }

  .metric-item span {
    font-size: 1.75rem;
  }

  .carousel-slide img {
    height: 250px;
  }

  .carousel-caption {
    padding: 1rem 0.75rem;
  }

  .carousel-caption h3 {
    font-size: 1rem;
  }

  .carousel-caption p {
    font-size: 0.8rem;
    display: none;
  }
}

/* Extra Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .carousel-slide img {
    height: 220px;
  }

  .metric-grid {
    gap: 1.25rem;
  }
}

/* --- Ecommerce Specific Grids --- */
.grid-logistics {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}

.grid-omnichannel {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

/* --- Textiles Specific Grids --- */
.grid-textiles-hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 6rem;
  align-items: center;
}

.grid-textiles-legacy {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

/* Responsive adjustments for custom grids */
@media (max-width: 1024px) {
  .grid-logistics,
  .grid-omnichannel,
  .grid-textiles-hero,
  .grid-textiles-legacy {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Contact Form Status --- */
.status-success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #10b981;
  margin-top: 1rem;
}

.status-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #ef4444;
  margin-top: 1rem;
}

/* ============================================
   PREMIUM ANIMATION SYSTEM
   GPU-Accelerated, Mobile-Optimized, SEO-Safe
   ============================================ */

/* --- IMAGE & MEDIA ANIMATIONS --- */
img {
  /* Smooth fade-in for all images */
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
  animation-delay: 0.1s;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Disable animation for logos and critical images */
.logo-img,
nav img,
.hero img[src*="logo"] {
  opacity: 1 !important;
  animation: none !important;
}

/* Lazy loaded images - animate only after load */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* --- ICON ANIMATIONS --- */
.card-icon,
i.fa,
i.fab,
i.fas {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
}

.card:hover .card-icon,
a:hover i {
  transform: scale(1.1) translateZ(0);
}

/* Mobile: reduce icon animation */
@media (hover: none) {
  .card:hover .card-icon,
  a:hover i {
    transform: translateZ(0);
  }
}

/* --- LINK & ANCHOR ANIMATIONS --- */
a:not(.btn):not(.logo) {
  position: relative;
  transition: color 0.3s ease;
}

/* Subtle underline animation for text links */
.footer-links a,
.nav-links a {
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

/* --- NAVIGATION ANIMATIONS --- */
.nav-links a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backface-visibility: hidden;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(0);
}

.dropdown-menu a {
  transition: all 0.25s ease;
}

/* --- HERO SECTION ANIMATIONS --- */
.hero h1 {
  opacity: 0;
  transform: translateY(30px) translateZ(0);
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.hero p {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.4s;
}

.hero-btns {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.6s;
}

.hero-btns .btn:nth-child(1) {
  animation-delay: 0.7s;
}

.hero-btns .btn:nth-child(2) {
  animation-delay: 0.8s;
}

/* --- CARD STAGGER ANIMATIONS --- */
.grid-4 .card:nth-child(1) { animation-delay: 0.1s; }
.grid-4 .card:nth-child(2) { animation-delay: 0.2s; }
.grid-4 .card:nth-child(3) { animation-delay: 0.3s; }
.grid-4 .card:nth-child(4) { animation-delay: 0.4s; }
.grid-4 .card:nth-child(5) { animation-delay: 0.5s; }
.grid-4 .card:nth-child(6) { animation-delay: 0.6s; }

/* --- FORM INPUT ANIMATIONS --- */
input:not([type="submit"]):not([type="button"]),
textarea,
select {
  transition: all 0.3s ease;
  transform: translateZ(0);
}

input:focus,
textarea:focus,
select:focus {
  transform: scale(1.01) translateZ(0);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* --- METRIC COUNTER ANIMATIONS --- */
.metric-item {
  opacity: 0;
  transform: translateY(30px) translateZ(0);
  animation: fadeInUp 0.8s ease-out forwards;
}

.metric-item:nth-child(1) { animation-delay: 0.2s; }
.metric-item:nth-child(2) { animation-delay: 0.3s; }
.metric-item:nth-child(3) { animation-delay: 0.4s; }
.metric-item:nth-child(4) { animation-delay: 0.5s; }

/* --- CAROUSEL ANIMATIONS --- */
.carousel-slide {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

.carousel-caption {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.3s;
}

/* --- SECTION ANIMATIONS --- */
section {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger section animations */
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }
section:nth-of-type(4) { animation-delay: 0.4s; }

/* --- MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  .hero h1,
  .hero p,
  .hero-btns,
  .section-title h2,
  .section-title p,
  .card,
  .metric-item,
  section {
    animation-duration: 0.5s !important;
    transform: translateY(10px) translateZ(0) !important;
  }
  
  /* Disable hover animations on mobile */
  .card:hover,
  .btn:hover,
  a:hover i {
    transform: translateZ(0) !important;
  }
  
  /* Faster transitions on mobile */
  * {
    transition-duration: 0.2s !important;
  }
}

/* --- ACCESSIBILITY: RESPECT REDUCED MOTION --- */
@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;
  }
  
  /* Remove all transforms */
  .hero h1,
  .hero p,
  .hero-btns,
  .section-title h2,
  .section-title p,
  .card,
  .metric-item,
  section,
  img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* --- PERFORMANCE OPTIMIZATIONS --- */
/* Remove will-change after animation completes */
.hero h1,
.hero p,
.hero-btns,
.section-title h2,
.section-title p {
  animation-fill-mode: forwards;
}

/* Prevent layout shift during animations */
.hero,
section {
  min-height: fit-content;
}

/* GPU acceleration for all animated elements */
.card,
.btn,
.metric-item,
.carousel-slide,
img {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* --- UTILITY ANIMATION CLASSES --- */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
  animation: fadeInUp 0.6s ease-out forwards;
}

.slide-left {
  opacity: 0;
  transform: translateX(-20px) translateZ(0);
  animation: slideInLeft 0.6s ease-out forwards;
}

.slide-right {
  opacity: 0;
  transform: translateX(20px) translateZ(0);
  animation: slideInRight 0.6s ease-out forwards;
}

.scale-in {
  opacity: 0;
  transform: scale(0.95) translateZ(0);
  animation: scaleIn 0.6s ease-out forwards;
}

/* Delay utilities */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* --- END PREMIUM ANIMATION SYSTEM --- */
