/* ==========================================================================
   NextHub Technologies - Enhanced CSS
   Modern, performant, and maintainable styles
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --secondary-50: #f0f9ff;
  --secondary-500: #06b6d4;
  --secondary-600: #0891b2;
  
  --accent-50: #fff7ed;
  --accent-500: #f97316;
  --accent-600: #ea580c;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --success-500: #10b981;
  --error-500: #ef4444;
  --warning-500: #f59e0b;
  
  /* Semantic Colors */
  --color-primary: var(--primary-600);
  --color-primary-hover: var(--primary-700);
  --color-secondary: var(--secondary-500);
  --color-accent: var(--accent-500);
  --color-text: var(--gray-900);
  --color-text-muted: var(--gray-600);
  --color-text-light: var(--gray-500);
  --color-bg: #ffffff;
  --color-bg-alt: var(--gray-50);
  --color-bg-dark: var(--gray-900);
  --color-border: var(--gray-200);
  --color-border-focus: var(--primary-500);
  
  /* Typography */
  --font-family-primary: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  
  /* Layout */
  --container-max-width: 1280px;
  --container-padding: var(--space-5);
  --section-padding: var(--space-24);
  --section-padding-mobile: var(--space-16);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.025em;
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-padding) 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: white;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.grid--responsive {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  justify-content: space-between;
}

.flex--column {
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ==========================================================================
   Button Components
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-primary-hover), var(--secondary-600));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--outline:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
}

/* Button Sizes */
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* ==========================================================================
   Form Components
   ========================================================================== */

.form-group {
  position: relative;
  margin-bottom: var(--space-6);
}

.form-label {
  position: absolute;
  top: var(--space-3);
  left: var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
  pointer-events: none;
  transition: all var(--transition-fast);
  transform-origin: left top;
}

.form-control {
  width: 100%;
  padding: var(--space-4);
  font-family: inherit;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
  transform: translateY(-1.5rem) scale(0.875);
  color: var(--color-primary);
}

.form-control--error {
  border-color: var(--error-500);
}

.form-control--success {
  border-color: var(--success-500);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--error-500);
}

.form-success {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--success-500);
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card__header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.card__body {
  padding: var(--space-6);
}

.card__footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-normal);
}

.navbar--scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.navbar__logo img {
  height: 45px;
  width: auto;
  transition: transform var(--transition-fast);
}

.navbar__logo:hover img {
  transform: scale(1.05);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.navbar__link {
  position: relative;
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-fast);
}

.navbar__link:hover::after,
.navbar__link--active::after {
  width: 100%;
}

.navbar__link--active {
  color: var(--color-primary);
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.navbar__toggle-line {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.navbar__toggle--active .navbar__toggle-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle--active .navbar__toggle-line:nth-child(2) {
  opacity: 0;
}

.navbar__toggle--active .navbar__toggle-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-500));
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 var(--space-6);
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-6);
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero__title--highlight {
  color: var(--accent-500);
}

.hero__description {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-10);
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
  display: flex;
  gap: var(--space-5);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header__subtitle {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  background: var(--primary-50);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.section-header__title {
  margin-bottom: var(--space-6);
}

.section-header__description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Service Cards
   ========================================================================== */

.services-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
}

.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}

.service-card {
  background: var(--color-bg);
  padding: var(--space-10);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-normal);
  border: 1px solid var(--color-border);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-200);
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  color: white;
  border-radius: var(--radius-2xl);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-6);
  transition: transform var(--transition-normal);
}

.service-card:hover .service-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.service-card__description {
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.feature-item {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-8);
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-100);
  color: var(--color-primary);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-2xl);
}

.feature-item__content h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.feature-item__content p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   Statistics Section
   ========================================================================== */

.stats-section {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-500));
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
}

.stat-item {
  text-align: center;
  padding: var(--space-8);
}

.stat-item i {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.stat-number {
  display: block;
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-item p {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  opacity: 0.9;
  margin-bottom: 0;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
}

.testimonial-slider {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-track {
  display: flex;
  transition: transform var(--transition-slow);
}

.testimonial-card {
  min-width: 100%;
  background: var(--color-bg);
  padding: var(--space-12);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.quote-icon {
  font-size: var(--font-size-4xl);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  opacity: 0.3;
}

.testimonial-text {
  font-size: var(--font-size-lg);
  font-style: italic;
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

.client-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.client-avatar {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary-100);
}

.client-details {
  text-align: left;
}

.client-name {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.client-title {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.testimonial-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.testimonial-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.testimonial-nav-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

.testimonial-dots {
  display: flex;
  gap: var(--space-2);
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.testimonial-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

.testimonial-dot:hover {
  background: var(--color-primary);
  transform: scale(1.1);
}

/* ==========================================================================
   Marquee Section
   ========================================================================== */

.client-logos-marquee {
  padding: var(--space-20) 0;
  background: var(--color-bg);
  overflow: hidden;
}

.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.marquee-container {
  display: inline-flex;
  animation: marquee 30s linear infinite;
  will-change: transform;
}

.marquee-item {
  flex-shrink: 0;
  margin: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marquee-item img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.7);
  transition: all var(--transition-normal);
}

.marquee-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-info h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
  color: var(--color-text);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
}

.contact-info i {
  width: 20px;
  color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-lg);
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--color-primary-hover);
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.contact-form-container {
  background: var(--color-bg);
  padding: var(--space-10);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.contact-form-container h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
  color: var(--color-text);
}

.submit-btn {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.submit-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  position: relative;
  padding: var(--space-32) 0;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-500));
  color: white;
  text-align: center;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-6);
  color: white;
}

.cta-section p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-10);
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-20) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.footer-about img {
  height: 50px;
  margin-bottom: var(--space-6);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--line-height-relaxed);
}

.footer-social-links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.footer h3 {
  color: white;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-6);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: var(--space-3);
}

.footer ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer ul li a:hover {
  color: var(--color-primary);
}

.newsletter-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--font-size-sm);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.newsletter-form button:hover {
  background: var(--color-primary-hover);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
}

/* ==========================================================================
   Fixed Elements
   ========================================================================== */

.whatsapp-button {
  position: fixed;
  bottom: 80px;
  left: var(--space-5);
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-fixed);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.whatsapp-button:hover {
  background: #128C7E;
  transform: scale(1.1) translateY(-3px);
  box-shadow: var(--shadow-2xl);
  color: white;
}

.back-to-top {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-xl);
  color: white;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.animate-fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: calc(var(--delay, 0) * 0.2s);
}

.animate-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.animate-element.animated {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-bottom {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.slide-in-bottom.animated {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.slide-in-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.slide-in-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.scale-in.animated {
  opacity: 1;
  transform: scale(1);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
  transition-delay: calc(var(--delay, 0) * 0.1s);
}

.fade-in.animated {
  opacity: 1;
}

/* ==========================================================================
   Particles Animation
   ========================================================================== */

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  animation: float 15s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes float {
  0%, 100% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  50% {
    transform: translateY(0) translateX(100px) scale(1);
  }
}

/* ==========================================================================
   Message Components
   ========================================================================== */

.newsletter-message,
.form-message {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

.newsletter-message.success,
.form-message.success {
  background: var(--success-500);
  color: white;
  opacity: 1;
  transform: translateY(0);
}

.newsletter-message.error,
.form-message.error {
  background: var(--error-500);
  color: white;
  opacity: 1;
  transform: translateY(0);
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-500);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Preloader
   ========================================================================== */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Spacing */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mr-0 { margin-right: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }

.m-4 { margin: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mr-4 { margin-right: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.ml-4 { margin-left: var(--space-4); }

.m-8 { margin: var(--space-8); }
.mt-8 { margin-top: var(--space-8); }
.mr-8 { margin-right: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-8 { margin-left: var(--space-8); }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pr-0 { padding-right: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }

.p-4 { padding: var(--space-4); }
.pt-4 { padding-top: var(--space-4); }
.pr-4 { padding-right: var(--space-4); }
.pb-4 { padding-bottom: var(--space-4); }
.pl-4 { padding-left: var(--space-4); }

.p-8 { padding: var(--space-8); }
.pt-8 { padding-top: var(--space-8); }
.pr-8 { padding-right: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }
.pl-8 { padding-left: var(--space-8); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }

/* Background Colors */
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-light { background-color: var(--color-bg-alt); }
.bg-dark { background-color: var(--color-bg-dark); }
.bg-white { background-color: var(--color-bg); }

/* Text Colors */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-dark { color: var(--color-text); }
.text-white { color: white; }

/* Border Radius */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large screens (1024px and up) */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:text-left { text-align: left; }
  .lg\:block { display: block; }
  .lg\:hidden { display: none; }
}

/* Medium screens (768px to 1023px) */
@media (max-width: 1023px) {
  .section {
    padding: var(--space-20) 0;
  }
  
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Small screens (768px and down) */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
    --container-padding: var(--space-4);
  }
  
  .navbar__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-6);
    box-shadow: var(--shadow-2xl);
    transition: right var(--transition-slow);
    z-index: var(--z-modal);
  }
  
  .navbar__nav.active {
    right: 0;
  }
  
  .navbar__toggle {
    display: flex;
  }
  
  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero__description {
    font-size: var(--font-size-base);
  }
  
  .service-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonial-card {
    padding: var(--space-8);
  }
  
  .client-info {
    flex-direction: column;
    text-align: center;
  }
  
  .client-details {
    text-align: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .whatsapp-button {
    bottom: var(--space-20);
    left: var(--space-4);
    width: 50px;
    height: 50px;
    font-size: var(--font-size-xl);
  }
  
  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 45px;
    height: 45px;
  }
}

/* Extra small screens (480px and down) */
@media (max-width: 480px) {
  .hero__actions {
    width: 100%;
  }
  
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .service-card,
  .contact-form-container {
    padding: var(--space-6);
  }
  
  .testimonial-card {
    padding: var(--space-6);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .particles,
  .marquee-container {
    animation: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #0000ff;
    --color-text: #000000;
    --color-bg: #ffffff;
    --color-border: #000000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-dark: #ffffff;
    --color-text: #f8fafc;
    --color-text-muted: #cbd5e1;
    --color-text-light: #94a3b8;
    --color-border: #334155;
  }
  
  .navbar {
    background: rgba(15, 23, 42, 0.95);
  }
  
  .service-card,
  .testimonial-card,
  .contact-form-container,
  .card {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
  }
}

/* Print styles */
@media print {
  .navbar,
  .whatsapp-button,
  .back-to-top,
  .particles,
  .hero__video {
    display: none !important;
  }
  
  .hero {
    background: var(--color-primary) !important;
    color: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  * {
    box-shadow: none !important;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

/* Selection styles */
::selection {
  background: var(--color-primary);
  color: white;
}

::-moz-selection {
  background: var(--color-primary);
  color: white;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* GPU acceleration for animations */
.hero__video,
.marquee-container,
.particles,
.testimonial-track {
  will-change: transform;
}

/* Contain layout shifts */
.service-card,
.testimonial-card,
.feature-item {
  contain: layout style paint;
}

/* Optimize font loading */
@font-face {
  font-family: 'Poppins';
  font-display: swap;
}

/* ==========================================================================
   Component States
   ========================================================================== */

/* Loading states */
.loading {
  background: linear-gradient(
    90deg,
    var(--gray-200) 25%,
    var(--gray-100) 50%,
    var(--gray-200) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error states */
/* Error states */
.error {
  border-color: var(--error-500) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-text {
  color: var(--error-500);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

/* Success states */
.success {
  border-color: var(--success-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.success-text {
  color: var(--success-500);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

/* Disabled states */
.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Advanced Animations
   ========================================================================== */

/* Stagger animation delays */
.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover animations */
.hover-lift {
  transition: transform var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale {
  transition: transform var(--transition-fast);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform var(--transition-fast);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Pulse animation */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Bounce animation */
.bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -30px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

/* Shake animation */
.shake {
  animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }
  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* ==========================================================================
   Layout Improvements
   ========================================================================== */

/* Aspect ratio utilities */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-photo {
  aspect-ratio: 4 / 3;
}

/* Object fit utilities */
.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

.object-fill {
  object-fit: fill;
}

/* Overflow utilities */
.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-scroll {
  overflow: scroll;
}

/* ==========================================================================
   Modern CSS Features
   ========================================================================== */

/* Container queries support */
@supports (container-type: inline-size) {
  .service-card {
    container-type: inline-size;
  }
  
  @container (min-width: 300px) {
    .service-card__icon {
      font-size: var(--font-size-4xl);
    }
  }
}

/* CSS Grid subgrid support */
@supports (grid-template-rows: subgrid) {
  .service-cards-grid {
    grid-template-rows: subgrid;
  }
}

/* Backdrop filter support */
@supports (backdrop-filter: blur(10px)) {
  .navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* ==========================================================================
   Browser-specific Fixes
   ========================================================================== */

/* Safari fixes */
@supports (-webkit-appearance: none) {
  .hero {
    height: -webkit-fill-available;
  }
}

/* Firefox fixes */
@-moz-document url-prefix() {
  .form-control {
    appearance: none;
  }
}

/* Edge fixes */
@supports (-ms-ime-align: auto) {
  .grid {
    display: -ms-grid;
  }
}

/* ==========================================================================
   Final Optimizations
   ========================================================================== */

/* Prevent layout shift */
img[width][height] {
  height: auto;
}

/* Smooth font rendering */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Optimize animations */
@media (prefers-reduced-motion: no-preference) {
  .animate-element {
    animation-fill-mode: both;
  }
}

/* Ensure proper stacking */
.hero,
.navbar,
.footer {
  isolation: isolate;
}

/* Final responsive breakpoint */
@media (max-width: 320px) {
  :root {
    --container-padding: var(--space-3);
  }
  
  .hero__title {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
  }
  
  .service-card,
  .contact-form-container {
    padding: var(--space-5);
  }
}

/* ==========================================================================
   End of Stylesheet
   ========================================================================== */

/* Ensure all custom properties are properly closed */
:root {
  /* Ensure proper fallbacks */
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
}

/* Safe area support for mobile devices */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(var(--container-padding), var(--safe-area-inset-left));
    padding-right: max(var(--container-padding), var(--safe-area-inset-right));
  }
  
  .navbar__container {
    padding-left: max(var(--container-padding), var(--safe-area-inset-left));
    padding-right: max(var(--container-padding), var(--safe-area-inset-right));
  }
}

/* Ensure proper rendering on all devices */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Final performance optimization */
.hero__video,
.particles,
.marquee-container {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

 /* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed, 1030);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-normal, 0.3s ease);
  padding: 0;
}

/* Navbar states */
.navbar--scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--color-border, #e5e7eb);
}

.navbar--hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* Navbar container */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width, 1280px);
  margin: 0 auto;
  padding: var(--space-4, 1rem) var(--container-padding, 1.25rem);
  transition: padding var(--transition-fast, 0.15s ease);
}

.navbar--scrolled .nav-container {
  padding-top: var(--space-3, 0.75rem);
  padding-bottom: var(--space-3, 0.75rem);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo a {
  display: block;
  transition: transform var(--transition-fast, 0.15s ease);
}

.logo a:hover {
  transform: scale(1.05);
}

.logo img,
.logo-alt {
  height: 45px;
  width: auto;
  object-fit: contain;
  transition: all var(--transition-fast, 0.15s ease);
}

.navbar--scrolled .logo img,
.navbar--scrolled .logo-alt {
  height: 40px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  position: relative;
  display: block;
  padding: var(--space-3, 0.75rem) var(--space-2, 0.5rem);
  color: var(--color-text, #1f2937);
  font-weight: var(--font-weight-medium, 500);
  font-size: var(--font-size-base, 1rem);
  text-decoration: none;
  transition: all var(--transition-fast, 0.15s ease);
  border-radius: var(--radius-lg, 0.75rem);
}

/* Active and hover states */
.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary, #2563eb), var(--color-secondary, #06b6d4));
  border-radius: 1px;
  transition: all var(--transition-fast, 0.15s ease);
  transform: translateX(-50%);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 80%;
}

.nav-links a:hover {
  color: var(--color-primary, #2563eb);
  background: rgba(37, 99, 235, 0.05);
}

.nav-links a.active {
  color: var(--color-primary, #2563eb);
  font-weight: var(--font-weight-semibold, 600);
}

/* Mobile menu toggle */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  transition: transform var(--transition-fast, 0.15s ease);
}

.burger:hover {
  transform: scale(1.1);
}

.burger div,
.line1,
.line2,
.line3 {
  width: 100%;
  height: 3px;
  background: var(--color-primary, #2563eb);
  border-radius: 2px;
  transition: all var(--transition-normal, 0.3s ease);
  transform-origin: center;
}

/* Burger animation */
.burger.toggle .line1 {
  transform: rotate(45deg) translate(6px, 6px);
}

.burger.toggle .line2 {
  opacity: 0;
  transform: scale(0);
}

.burger.toggle .line3 {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, 
    var(--primary-600, #2563eb) 0%, 
    var(--secondary-500, #06b6d4) 50%,
    var(--primary-800, #1e40af) 100%
  );
}

/* Video background */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.4;
  z-index: 1;
}

/* Hero overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 var(--container-padding, 1.25rem);
  margin: 0 auto;
}

/* Hero title */
.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: var(--font-weight-bold, 700);
  line-height: var(--line-height-tight, 1.25);
  margin-bottom: var(--space-6, 1.5rem);
  color: white;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  color: var(--accent-500, #f97316);
  background: linear-gradient(135deg, #f97316, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.5));
  }
  to {
    filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.8));
  }
}

/* Hero description */
.hero-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  line-height: var(--line-height-relaxed, 1.75);
  margin-bottom: var(--space-10, 2.5rem);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  gap: var(--space-5, 1.25rem);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-8, 2rem);
}

.hero-buttons .btn {
  min-width: 180px;
  padding: var(--space-4, 1rem) var(--space-8, 2rem);
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: var(--font-weight-semibold, 600);
  border-radius: var(--radius-full, 9999px);
  transition: all var(--transition-normal, 0.3s ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 0.5rem);
}

.hero-buttons .btn-primary {
  background: linear-gradient(135deg, var(--color-primary, #2563eb), var(--color-secondary, #06b6d4));
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.hero-buttons .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700, #1d4ed8), var(--secondary-600, #0891b2));
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.4);
  color: white;
}

.hero-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
  color: white;
}

/* Particles animation */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0) scale(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px) scale(1) rotate(360deg);
    opacity: 0;
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8, 2rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

.scroll-indicator::before {
  content: '';
  display: block;
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.6);
  margin: 0 auto 8px;
  border-radius: 1px;
}

.scroll-indicator::after {
  content: '↓';
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-xl, 1.25rem);
  text-align: center;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Large screens */
@media (min-width: 1024px) {
  .nav-links {
    gap: var(--space-10, 2.5rem);
  }
  
  .hero-content {
    max-width: 1000px;
  }
}

/* Medium screens */
@media (max-width: 1023px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Small screens */
@media (max-width: 768px) {
  .burger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-6, 1.5rem);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-slow, 0.5s ease);
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: var(--font-size-lg, 1.125rem);
    padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
    width: 200px;
    text-align: center;
    border-radius: var(--radius-xl, 1rem);
  }
  
  .nav-links a::before {
    bottom: 8px;
  }
  
  /* Mobile overlay */
  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal, 0.3s ease);
    z-index: 999;
  }
  
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Hero adjustments for mobile */
  .hero {
    min-height: 100vh;
    padding-top: 80px;
  }
  
  .hero-content {
    padding: 0 var(--space-4, 1rem);
  }
  
  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: var(--space-4, 1rem);
  }
  
  .hero-content p {
    font-size: var(--font-size-base, 1rem);
    margin-bottom: var(--space-8, 2rem);
  }
  
  .hero-buttons {
    gap: var(--space-4, 1rem);
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    min-width: auto;
    padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
    font-size: var(--font-size-base, 1rem);
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .nav-container {
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  }
  
  .logo img,
  .logo-alt {
    height: 35px;
  }
  
  .nav-links {
    width: 100%;
    right: -100%;
    padding: var(--space-8, 2rem) var(--space-4, 1rem);
  }
  
  .nav-links a {
    width: 100%;
    font-size: var(--font-size-base, 1rem);
  }
  
  .burger {
    width: 24px;
    height: 18px;
  }
  
  .hero-content h1 {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
    line-height: 1.2;
  }
  
  .hero-content p {
    font-size: var(--font-size-sm, 0.875rem);
    line-height: 1.6;
  }
  
  .hero-buttons .btn {
    padding: var(--space-3, 0.75rem) var(--space-5, 1.25rem);
    font-size: var(--font-size-sm, 0.875rem);
  }
  
  .scroll-indicator {
    bottom: var(--space-4, 1rem);
  }
}

/* ==========================================================================
   NAVBAR ANIMATIONS
   ========================================================================== */

/* Navbar slide in animation */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar {
  animation: slideDown 0.5s ease-out;
}

/* Link hover effects */
.nav-links a {
  position: relative;
  overflow: hidden;
}

.nav-links a::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--transition-slow, 0.5s ease);
}

.nav-links a:hover::after {
  left: 100%;
}

/* Mobile menu slide animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.nav-links.active {
  animation: slideInRight 0.3s ease-out;
}

/* Stagger animation for mobile menu items */
.nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
.nav-links.active li:nth-child(2) { animation-delay: 0.15s; }
.nav-links.active li:nth-child(3) { animation-delay: 0.2s; }
.nav-links.active li:nth-child(4) { animation-delay: 0.25s; }
.nav-links.active li:nth-child(5) { animation-delay: 0.3s; }
.nav-links.active li:nth-child(6) { animation-delay: 0.35s; }
.nav-links.active li:nth-child(7) { animation-delay: 0.4s; }

.nav-links.active li {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.4s ease-out forwards;
}

/* ==========================================================================
   HERO ANIMATIONS
   ========================================================================== */

/* Hero content entrance animations */
.hero-content > * {
  opacity: 0;
  transform: translateY(30px);
}

.hero-content h1 {
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero-content p {
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 1.1s forwards;
}

/* Typing effect for hero title */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero-title-typing {
  overflow: hidden;
  border-right: 3px solid rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  animation: 
    typing 3s steps(40, end),
    blink 0.75s step-end infinite;
}

/* Floating animation for hero elements */
.hero-floating {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Gradient animation for hero background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-gradient-animated {
  background: linear-gradient(
    -45deg,
    var(--primary-600, #2563eb),
    var(--secondary-500, #06b6d4),
    var(--primary-800, #1e40af),
    var(--secondary-600, #0891b2)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus styles */
.nav-links a:focus-visible,
.burger:focus-visible,
.hero-buttons .btn:focus-visible {
  outline: 2px solid var(--color-primary, #2563eb);
  outline-offset: 2px;
  border-radius: var(--radius-md, 0.5rem);
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary, #2563eb);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-md, 0.5rem);
  z-index: 1000;
  transition: top var(--transition-fast, 0.15s ease);
}

.skip-to-content:focus {
  top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .navbar {
    background: white;
    border-bottom: 2px solid black;
  }
  
  .nav-links a {
    color: black;
    border: 1px solid transparent;
  }
  
  .nav-links a:hover,
  .nav-links a:focus {
    border-color: black;
    background: yellow;
  }
  
  .hero {
    background: black;
    color: white;
  }
  
  .hero-buttons .btn {
    border: 2px solid white;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .navbar,
  .nav-links a,
  .burger div,
  .hero-content > *,
  .particle {
    animation: none;
    transition: none;
  }
  
  .hero-video {
    display: none;
  }
  
  .particles {
    display: none;
  }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* GPU acceleration */
.navbar,
.nav-links,
.hero,
.hero-video,
.particles {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize animations */
.nav-links a::before,
.nav-links a::after {
  will-change: width, left;
}

.burger div {
  will-change: transform, opacity;
}

/* ==========================================================================
   DARK MODE SUPPORT
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .navbar--scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .nav-links a {
    color: rgba(255, 255, 255, 0.9);
  }
  
  .nav-links a:hover {
    color: var(--color-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
  }
  
  .nav-links a.active {
    color: var(--color-primary, #3b82f6);
  }
  
  .burger div {
    background: rgba(255, 255, 255, 0.9);
  }
  
  .nav-links {
    background: rgba(15, 23, 42, 0.98);
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .navbar,
  .burger,
  .nav-overlay,
  .hero-video,
  .particles,
  .scroll-indicator {
    display: none !important;
  }
  
  .hero {
    background: var(--color-primary, #2563eb) !important;
    color: white !important;
    min-height: 50vh !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .hero-content h1,
  .hero-content p {
    color: white !important;
    text-shadow: none !important;
  }
  
  .hero-buttons {
    display: none !important;
  }
}

/* ==========================================================================
   BROWSER-SPECIFIC FIXES
   ========================================================================== */

/* Safari fixes */
@supports (-webkit-appearance: none) {
  .hero {
    height: -webkit-fill-available;
  }
  
  .nav-links {
    -webkit-overflow-scrolling: touch;
  }
}

/* Firefox fixes */
@-moz-document url-prefix() {
  .hero-video {
    object-fit: cover;
  }
}

/* Edge fixes */
@supports (-ms-ime-align: auto) {
  .navbar {
    backdrop-filter: none;
  }
}
