/* ================================
   PREMIUM $200K+ DESIGN SYSTEM
   Boise Restoration Experts
   ================================ */

/* ===== GOOGLE FONTS & TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES - DESIGN TOKENS ===== */
:root {
  /* Premium Color Palette */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-900: #1e3a8a;
  
  --emergency-400: #f87171;
  --emergency-500: #ef4444;
  --emergency-600: #dc2626;
  --emergency-700: #b91c1c;
  
  --success-500: #10b981;
  --success-600: #059669;
  
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  
  /* Premium Neutrals */
  --gray-25: #fcfcfd;
  --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;
  --gray-950: #030712;
  
  /* Premium Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-premium: 0 32px 64px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
  
  /* Typography Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  --text-7xl: 4.5rem;    /* 72px */
  
  /* Spacing System */
  --space-px: 1px;
  --space-0-5: 0.125rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Animation Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;
  
  /* Premium Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  --gradient-emergency: linear-gradient(135deg, var(--emergency-500) 0%, var(--emergency-700) 100%);
  --gradient-success: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  --gradient-premium: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--gray-900);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== PREMIUM TYPOGRAPHY ===== */
.font-display {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Headings with Premium Typography */
h1, .h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

h2, .h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--gray-900);
}

h3, .h3 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}

h4, .h4 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.4;
  color: var(--gray-800);
}

h5, .h5 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray-800);
}

h6, .h6 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--gray-700);
}

/* Premium Text Styles */
.text-premium {
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.text-gradient-primary {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ===== PREMIUM BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1.5;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-200) cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--duration-500) ease;
  z-index: 1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(59, 130, 246, 0.3);
  position: relative;
  z-index: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.btn-emergency {
  background: var(--gradient-emergency);
  color: white;
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(239, 68, 68, 0.3);
  animation: pulse-glow 3s infinite;
}

.btn-emergency:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(239, 68, 68, 0.2);
  animation: none;
}

.btn-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  border-radius: var(--radius-2xl);
}

/* ===== PREMIUM CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
  opacity: 0;
  transition: opacity var(--duration-300) ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-premium);
  border-color: var(--primary-200);
}

.card:hover::before {
  opacity: 1;
}

.card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.card-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: var(--gradient-primary);
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: -1;
}

.card-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ===== PREMIUM ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(239, 68, 68, 0.3);
  }
  50% {
    box-shadow: var(--shadow-xl), 0 0 0 8px rgba(239, 68, 68, 0.1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Animation Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in-scale {
  animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-left {
  animation: slideInFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-right {
  animation: slideInFromRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 3s infinite;
}

/* Staggered Animation Delays */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* ===== PREMIUM GRADIENTS & BACKGROUNDS ===== */
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-emergency {
  background: var(--gradient-emergency);
}

.bg-gradient-premium {
  background: var(--gradient-premium);
}

.bg-gradient-radial {
  background: radial-gradient(circle at center, var(--primary-500) 0%, var(--primary-700) 70%);
}

.bg-mesh-gradient {
  background: 
    radial-gradient(at 40% 20%, hsla(228, 100%, 74%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 50%, hsla(355, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 50%, hsla(340, 100%, 76%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(22, 100%, 77%, 1) 0px, transparent 50%),
    radial-gradient(at 80% 100%, hsla(242, 100%, 70%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 0%, hsla(343, 100%, 76%, 1) 0px, transparent 50%);
}

.bg-dotted-pattern {
  background-image: radial-gradient(circle, var(--gray-300) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ===== PREMIUM HOVER EFFECTS ===== */
.hover-lift {
  transition: transform var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
}

.hover-scale {
  transition: transform var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-glow {
  transition: box-shadow var(--duration-300) ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ===== PREMIUM FORMS ===== */
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background-color: white;
  transition: all var(--duration-200) ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

/* ===== PREMIUM NAVIGATION ===== */
.nav-link {
  position: relative;
  padding: var(--space-2) var(--space-4);
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: all var(--duration-200) ease;
  border-radius: var(--radius-md);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--duration-300) ease;
}

.nav-link:hover {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

.nav-link:hover::before {
  width: 100%;
}

/* ===== PREMIUM BADGES & TAGS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.badge-primary {
  background-color: var(--primary-100);
  color: var(--primary-800);
  border-color: var(--primary-200);
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}

.badge-emergency {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

/* ===== PREMIUM LOADING STATES ===== */
.skeleton {
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-md);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-top: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== PREMIUM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
  transition: background var(--duration-200) ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  :root {
    --text-6xl: 3rem;    /* 48px */
    --text-5xl: 2.5rem;  /* 40px */
    --text-4xl: 2rem;    /* 32px */
  }
  
  .btn {
    padding: var(--space-3) var(--space-5);
  }
  
  .card {
    border-radius: var(--radius-xl);
  }
}

/* ===== ACCESSIBILITY ===== */
@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;
  }
}

@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
}

/* Focus visible for keyboard navigation */
.focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ===== CINEMATIC HERO SYSTEM ===== */
.cinematic-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 25%, #0369a1 50%, #0284c7 75%, #0ea5e9 100%);
}

.cinematic-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
  animation: meshGradient 20s ease-in-out infinite;
  z-index: 1;
}

@keyframes meshGradient {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  33% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  66% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.cinematic-hero .hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* Video Background System */
.video-hero {
  position: relative;
  overflow: hidden;
}

.video-hero video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 1;
  object-fit: cover;
}

.video-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.video-fallback {
  background-image: 
    linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%),
    url('/static/images/hero-fallback.jpg');
  background-size: cover;
  background-position: center;
}

/* Particle Hero Container */
.particle-hero {
  position: relative;
  overflow: hidden;
}

.particle-hero canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

/* Floating Elements */
.floating-element {
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 5;
}

.floating-element:nth-child(2n) {
  animation-direction: reverse;
}

.floating-element:nth-child(3n) {
  animation-delay: -2s;
}

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  border-right: 0.15em solid var(--primary-500);
  white-space: nowrap;
  margin: 0 auto;
  animation: blink-caret 1s infinite;
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-500);
  }
}

/* Parallax Elements */
[data-parallax] {
  will-change: transform;
}

/* Premium Hero Stats */
.hero-stats {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3rem;
  z-index: 10;
}

.stat-item {
  text-align: center;
  color: white;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.5s; }
.stat-item:nth-child(2) { animation-delay: 0.7s; }
.stat-item:nth-child(3) { animation-delay: 0.9s; }
.stat-item:nth-child(4) { animation-delay: 1.1s; }

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero CTA Enhancement */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .hero-cta-group {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

.hero-cta-primary {
  position: relative;
  overflow: hidden;
  background: var(--gradient-emergency);
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.hero-cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--duration-500) ease;
  z-index: -1;
}

.hero-cta-primary:hover::before {
  left: 100%;
}

.hero-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero-cta-secondary {
  padding: 1rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--duration-300) ease;
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Hero Badge Enhancements */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  animation: pulse-glow 3s infinite;
  margin-bottom: 1.5rem;
}

/* Hero Text Animations */
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: slideInFromBottom 0.8s ease-out 0.3s forwards;
}

.hero-description {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 2rem;
  opacity: 0;
  animation: slideInFromBottom 0.8s ease-out 0.5s forwards;
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Interactive Elements */
.interactive-element {
  cursor: pointer;
  transition: all var(--duration-200) ease;
}

.interactive-element:hover {
  transform: scale(1.05);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  color: white;
  opacity: 0.7;
  animation: bounce 2s infinite;
  z-index: 10;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Mobile Hero Optimizations */
@media (max-width: 768px) {
  .cinematic-hero {
    min-height: 100vh;
    padding: 1rem;
  }
  
  .hero-stats {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .hero-cta-group {
    width: 100%;
  }
  
  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ===== ENHANCED FORM STYLES ===== */
.premium-form {
  position: relative;
}

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

.form-group.focused .form-label {
  color: var(--primary-600);
  transform: translateY(-0.5rem) scale(0.9);
}

.form-group.success .form-input {
  border-color: var(--success-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group.error .form-input {
  border-color: var(--emergency-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  opacity: 0;
  animation: fadeInUp 0.3s ease-out forwards;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-900: #f9fafb;
    --gray-800: #f3f4f6;
    --gray-700: #e5e7eb;
    --gray-600: #d1d5db;
    --gray-500: #9ca3af;
    --gray-400: #6b7280;
    --gray-300: #4b5563;
    --gray-200: #374151;
    --gray-100: #1f2937;
    --gray-50: #111827;
    --gray-25: #030712;
  }
  
  body {
    background-color: var(--gray-50);
    color: var(--gray-900);
  }
  
  .card {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
  }
}

/* ===== PHASE 3: PREMIUM TESTIMONIAL CAROUSEL ===== */

.premium-testimonial-carousel {
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  padding: 4rem 0;
  margin: 4rem 0;
}

.testimonial-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.testimonial-carousel-header {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.testimonial-carousel-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .testimonial-carousel-header h2 {
    font-size: 2rem;
  }
}

.testimonial-carousel-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.testimonial-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
}

@media (max-width: 768px) {
  .testimonial-viewport {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
}

.testimonial-slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: grab;
}

.testimonial-slides:active {
  cursor: grabbing;
}

.testimonial-slide {
  min-width: 100%;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .testimonial-card {
    padding: 2rem;
  }
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.testimonial-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .testimonial-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

.testimonial-avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) {
  .avatar-image {
    width: 60px;
    height: 60px;
  }
}

.avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.testimonial-info {
  flex-grow: 1;
}

.testimonial-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .testimonial-name {
    font-size: 1.25rem;
  }
}

.testimonial-location,
.testimonial-service {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.testimonial-location i,
.testimonial-service i {
  color: var(--primary-500);
  width: 14px;
}

.testimonial-rating {
  display: flex;
  gap: 0.25rem;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .testimonial-rating {
    justify-content: center;
  }
}

.testimonial-rating i {
  color: #fbbf24;
  font-size: 1.25rem;
  animation: sparkle 3s infinite;
}

.testimonial-rating i:nth-child(1) { animation-delay: 0s; }
.testimonial-rating i:nth-child(2) { animation-delay: 0.2s; }
.testimonial-rating i:nth-child(3) { animation-delay: 0.4s; }
.testimonial-rating i:nth-child(4) { animation-delay: 0.6s; }
.testimonial-rating i:nth-child(5) { animation-delay: 0.8s; }

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.testimonial-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 2rem;
  font-style: italic;
  position: relative;
  padding-left: 2rem;
}

@media (max-width: 768px) {
  .testimonial-text {
    font-size: 1rem;
    padding-left: 1.5rem;
  }
}

.testimonial-text::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 0;
  font-size: 4rem;
  color: var(--primary-500);
  opacity: 0.3;
  font-family: serif;
  line-height: 1;
}

.testimonial-footer {
  display: flex;
  justify-content: center;
}

.testimonial-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.testimonial-badge i {
  color: #fbbf24;
}

/* Carousel Navigation */
.carousel-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .carousel-navigation {
    gap: 1rem;
  }
}

.carousel-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--primary-600);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .carousel-button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

.carousel-button:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.carousel-button:active {
  transform: translateY(0);
}

.carousel-indicators {
  display: flex;
  gap: 0.75rem;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

@media (max-width: 640px) {
  .carousel-indicator {
    width: 10px;
    height: 10px;
  }
}

.carousel-indicator.active {
  background: white;
  border-color: var(--primary-500);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

/* ===== PHASE 3: ADVANCED MULTI-STEP CONTACT FORM ===== */

.advanced-contact-form {
  background: white;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 600px;
  margin: 2rem auto;
}

.form-header {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem;
  text-align: center;
}

.form-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-header p {
  opacity: 0.9;
  font-size: 0.875rem;
}

.progress-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  background: white;
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.progress-text {
  font-size: 0.75rem;
  text-align: center;
  opacity: 0.9;
  font-weight: 600;
}

.form-container {
  padding: 2rem;
}

@media (max-width: 640px) {
  .form-container {
    padding: 1.5rem;
  }
  
  .form-header {
    padding: 1.5rem;
  }
  
  .progress-container {
    padding: 0.75rem 1.5rem;
  }
}

.form-steps-container {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.form-step {
  min-width: 100%;
  opacity: 0.5;
  transform: scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
  opacity: 1;
  transform: scale(1);
}

.form-step.completed {
  opacity: 0.7;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-title i {
  color: var(--primary-500);
  font-size: 1rem;
}

.form-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-grid.two-column {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .form-grid.two-column {
    grid-template-columns: 1fr;
  }
}

.form-group {
  position: relative;
  transition: all 0.3s ease;
}

.form-group.error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-label .required {
  color: var(--emergency-500);
  margin-left: 0.25rem;
}

.form-input-advanced {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.form-input-advanced:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-group.error .form-input-advanced {
  border-color: var(--emergency-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: var(--emergency-500);
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.error-message::before {
  content: '⚠';
  font-size: 0.875rem;
}

.service-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .service-type-grid {
    grid-template-columns: 1fr;
  }
}

.service-type-option {
  position: relative;
}

.service-type-option input[type="radio"] {
  display: none;
}

.service-type-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  text-align: center;
}

@media (max-width: 640px) {
  .service-type-label {
    padding: 1.25rem 0.75rem;
  }
}

.service-type-label:hover {
  border-color: var(--primary-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-type-option input:checked + .service-type-label {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: var(--shadow-lg);
}

.service-type-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary-500);
}

@media (max-width: 640px) {
  .service-type-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
}

.service-type-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.875rem;
  line-height: 1.2;
}

.urgency-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .urgency-selector {
    grid-template-columns: 1fr;
  }
}

.urgency-option input[type="radio"] {
  display: none;
}

.urgency-label {
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  background: white;
}

.urgency-label:hover {
  border-color: var(--primary-300);
}

.urgency-option input:checked + .urgency-label {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.urgency-option input:checked + .urgency-label.emergency {
  border-color: var(--emergency-500);
  background: var(--emergency-50);
}

.urgency-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.urgency-time {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }
}

.nav-button {
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .nav-button {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
  }
}

.nav-button-prev {
  background: var(--gray-100);
  color: var(--gray-700);
}

.nav-button-prev:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.nav-button-next,
.nav-button-submit {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.nav-button-next:hover,
.nav-button-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.nav-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.success-state {
  text-align: center;
  padding: 3rem 2rem;
}

@media (max-width: 640px) {
  .success-state {
    padding: 2rem 1rem;
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  animation: successBounce 0.6s ease-out;
}

@media (max-width: 640px) {
  .success-icon {
    width: 60px;
    height: 60px;
  }
}

@keyframes successBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon i {
  font-size: 2.5rem;
  color: white;
}

@media (max-width: 640px) {
  .success-icon i {
    font-size: 1.75rem;
  }
}

.success-state h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .success-state h3 {
    font-size: 1.5rem;
  }
}

.success-state p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .success-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Animation keyframes */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== MOBILE-OPTIMIZED QUICK CONTACT FORM ===== */

.quick-contact-form-mobile {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
  .quick-contact-form-mobile {
    padding: 1.5rem;
    border-radius: 1rem;
    margin: 0 1rem;
  }
}

@media (max-width: 480px) {
  .quick-contact-form-mobile {
    padding: 1.25rem;
    margin: 0 0.5rem;
  }
}

.form-header-mobile {
  text-align: center;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .form-header-mobile {
    margin-bottom: 1.5rem;
  }
}

.form-header-mobile h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .form-header-mobile h3 {
    font-size: 1.25rem;
  }
}

.form-header-mobile .emergency-badge-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-emergency);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: pulse-glow 3s infinite;
}

@media (max-width: 768px) {
  .form-header-mobile .emergency-badge-mobile {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

.form-grid-mobile {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .form-grid-mobile {
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }
}

.form-group-mobile {
  position: relative;
  width: 100%;
}

.form-label-mobile {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .form-label-mobile {
    font-size: 0.8125rem;
  }
}

.form-label-mobile .required {
  color: var(--emergency-500);
  margin-left: 0.25rem;
}

.form-input-mobile,
.form-textarea-mobile,
.form-select-mobile {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  font-family: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  /* iOS-specific optimizations */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  
  /* Prevent zoom on iOS */
  font-size: 16px;
}

@media (max-width: 768px) {
  .form-input-mobile,
  .form-textarea-mobile,
  .form-select-mobile {
    padding: 0.875rem;
    border-radius: 0.625rem;
    /* Ensure 16px minimum font size to prevent iOS zoom */
    font-size: 16px;
  }
}

.form-input-mobile:focus,
.form-textarea-mobile:focus,
.form-select-mobile:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-input-mobile::placeholder,
.form-textarea-mobile::placeholder {
  color: var(--gray-400);
  opacity: 1;
}

.form-textarea-mobile {
  resize: vertical;
  min-height: 100px;
}

@media (max-width: 768px) {
  .form-textarea-mobile {
    min-height: 80px;
  }
}

.form-select-mobile {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 3rem;
}

.form-actions-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.submit-button-mobile {
  position: relative;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-emergency);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  
  /* Touch-friendly sizing */
  min-height: 48px;
  
  /* iOS button styling */
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .submit-button-mobile {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
    min-height: 44px;
  }
}

.submit-button-mobile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.submit-button-mobile:active {
  transform: translateY(0);
}

.button-content-mobile {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button-shimmer-mobile {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.submit-button-mobile:hover .button-shimmer-mobile {
  left: 100%;
}

.emergency-call-mobile {
  text-align: center;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.75rem;
  width: 100%;
}

@media (max-width: 768px) {
  .emergency-call-mobile {
    padding: 0.875rem;
  }
}

.call-text-mobile {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .call-text-mobile {
    font-size: 0.8125rem;
  }
}

.call-button-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--emergency-500);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.2s ease;
  
  /* Touch-friendly sizing */
  min-height: 44px;
  padding: 0.5rem;
  border-radius: 0.375rem;
  
  /* iOS link styling */
  -webkit-tap-highlight-color: rgba(239, 68, 68, 0.1);
}

@media (max-width: 768px) {
  .call-button-mobile {
    font-size: 1rem;
  }
}

.call-button-mobile:hover {
  color: var(--emergency-600);
  transform: scale(1.05);
}

.call-button-mobile:active {
  transform: scale(0.98);
}

/* Form validation states */
.form-group-mobile.error .form-input-mobile,
.form-group-mobile.error .form-textarea-mobile,
.form-group-mobile.error .form-select-mobile {
  border-color: var(--emergency-500);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group-mobile.success .form-input-mobile,
.form-group-mobile.success .form-textarea-mobile,
.form-group-mobile.success .form-select-mobile {
  border-color: var(--success-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.error-message-mobile {
  color: var(--emergency-500);
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  animation: fadeInUp 0.3s ease-out forwards;
}

.error-message-mobile::before {
  content: '⚠';
  font-size: 0.875rem;
}

/* Loading state */
.submit-button-mobile.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.submit-button-mobile.loading .button-content-mobile::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .submit-button-mobile,
  .form-input-mobile,
  .form-textarea-mobile,
  .form-select-mobile,
  .call-button-mobile {
    transition: none;
  }
  
  .emergency-badge-mobile {
    animation: none;
  }
  
  .button-shimmer-mobile {
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .quick-contact-form-mobile {
    border-width: 2px;
    border-color: var(--gray-700);
  }
  
  .form-input-mobile,
  .form-textarea-mobile,
  .form-select-mobile {
    border-width: 2px;
  }
  
  .submit-button-mobile {
    border: 2px solid var(--gray-900);
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .quick-contact-form-mobile {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.3);
  }
  
  .form-header-mobile h3,
  .form-label-mobile {
    color: var(--gray-100);
  }
  
  .form-input-mobile,
  .form-textarea-mobile,
  .form-select-mobile {
    background: rgba(55, 65, 81, 0.8);
    border-color: var(--gray-600);
    color: var(--gray-100);
  }
  
  .form-input-mobile::placeholder,
  .form-textarea-mobile::placeholder {
    color: var(--gray-500);
  }
  
  .emergency-call-mobile {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
  }
  
  .call-text-mobile {
    color: var(--gray-400);
  }
}

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

/* ===== PHASE 3: INTERACTIVE SERVICE CARDS ===== */

.interactive-services-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.interactive-services-header {
  text-align: center;
  margin-bottom: 4rem;
}

.interactive-services-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .interactive-services-header h2 {
    font-size: 2rem;
  }
}

.interactive-services-subtitle {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.service-card-interactive {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all var(--duration-500) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(0);
  opacity: 0;
}

@media (max-width: 768px) {
  .service-card-interactive {
    padding: 1.5rem;
  }
}

.service-card-interactive.animate-in-view {
  opacity: 1;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-card-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-300) ease;
}

.service-card-interactive:hover::before,
.service-card-interactive.card-active::before {
  transform: scaleX(1);
}

.service-card-interactive:hover,
.service-card-interactive.card-active {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  background: white;
  border-color: var(--primary-200);
}

@media (max-width: 768px) {
  .service-card-interactive:hover,
  .service-card-interactive.card-active {
    transform: translateY(-4px);
  }
}

.service-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 640px) {
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 1rem;
  }
}

.service-card-interactive:hover .service-icon,
.service-card-interactive.card-active .service-icon {
  transform: rotate(5deg) scale(1.1);
  box-shadow: var(--shadow-xl);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  transition: color var(--duration-300) ease;
}

@media (max-width: 640px) {
  .service-title {
    font-size: 1.25rem;
  }
}

.service-card-interactive:hover .service-title,
.service-card-interactive.card-active .service-title {
  color: var(--primary-600);
}

.service-description {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.service-features li i {
  color: var(--primary-500);
  font-size: 0.75rem;
}

.service-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all var(--duration-500) cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--gray-50);
  border-radius: 1rem;
  padding: 0 1.5rem;
  margin: 1.5rem -0.5rem;
}

.service-card-interactive:hover .service-details,
.service-card-interactive.card-active .service-details {
  max-height: 300px;
  opacity: 1;
  padding: 1.5rem;
}

.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-300) cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(10px);
  opacity: 0;
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .service-cta {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

.service-card-interactive:hover .service-cta,
.service-card-interactive.card-active .service-cta {
  transform: translateY(0);
  opacity: 1;
}

.service-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.service-emergency-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-emergency);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: pulse-glow 2s infinite;
}

@media (max-width: 640px) {
  .service-emergency-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* Responsive Grid Enhancements */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Touch Enhancements for Mobile */
@media (max-width: 768px) {
  .service-card-interactive {
    -webkit-tap-highlight-color: transparent;
  }
  
  .service-card-interactive.card-active {
    background: #f8fafc;
  }
  
  .testimonial-slides {
    cursor: default;
  }
  
  .testimonial-viewport {
    -webkit-overflow-scrolling: touch;
  }
}

/* ===== MOBILE-OPTIMIZED QUICK CONTACT FORM ===== */

.quick-contact-form-mobile {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .quick-contact-form-mobile {
    padding: 2rem;
    max-width: 450px;
  }
}

.form-header-mobile {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.form-title-mobile {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .form-title-mobile {
    font-size: 1.5rem;
  }
}

.form-title-mobile i {
  color: #fbbf24;
  animation: pulse 2s infinite;
}

.form-subtitle-mobile {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .form-subtitle-mobile {
    font-size: 1rem;
  }
}

.mobile-form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-fields-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-fields-mobile {
    gap: 1.25rem;
  }
}

.form-group-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label-mobile {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

@media (min-width: 768px) {
  .form-label-mobile {
    font-size: 1rem;
  }
}

.form-input-mobile,
.form-select-mobile,
.form-textarea-mobile {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  color: white;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 768px) {
  .form-input-mobile,
  .form-select-mobile,
  .form-textarea-mobile {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
  }
}

.form-input-mobile:focus,
.form-select-mobile:focus,
.form-textarea-mobile:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.form-input-mobile::placeholder,
.form-textarea-mobile::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .form-input-mobile::placeholder,
  .form-textarea-mobile::placeholder {
    font-size: 1rem;
  }
}

.form-select-mobile {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 3rem;
}

.form-select-mobile option {
  background: var(--gray-800);
  color: white;
  padding: 0.5rem;
}

.form-textarea-mobile {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .form-textarea-mobile {
    min-height: 100px;
  }
}

.form-actions-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.5rem;
}

.submit-button-mobile {
  position: relative;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--gradient-emergency);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .submit-button-mobile {
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
  }
}

.submit-button-mobile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.submit-button-mobile:active {
  transform: translateY(-1px);
}

.button-content-mobile {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button-shimmer-mobile {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.submit-button-mobile:hover .button-shimmer-mobile {
  left: 100%;
}

.emergency-call-mobile {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.call-text-mobile {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .call-text-mobile {
    font-size: 0.875rem;
  }
}

.call-button-mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fbbf24;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

@media (min-width: 768px) {
  .call-button-mobile {
    font-size: 1.125rem;
    padding: 0.75rem 1.25rem;
  }
}

.call-button-mobile:hover {
  color: #f59e0b;
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-1px);
}

.call-button-mobile i {
  animation: pulse 2s infinite;
}

/* Touch-friendly enhancements for mobile */
@media (max-width: 767px) {
  .form-input-mobile,
  .form-select-mobile,
  .form-textarea-mobile {
    font-size: 16px; /* Prevents iOS zoom */
    min-height: 44px; /* iOS touch target minimum */
  }
  
  .submit-button-mobile {
    min-height: 48px; /* Touch-friendly button height */
  }
  
  .call-button-mobile {
    min-height: 44px;
  }
}

/* Loading state for form submission */
.submit-button-mobile:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-button-mobile:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
}

/* Focus improvements for accessibility */
.form-input-mobile:focus,
.form-select-mobile:focus,
.form-textarea-mobile:focus,
.submit-button-mobile:focus,
.call-button-mobile:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .service-card-interactive,
  .testimonial-slide,
  .carousel-button,
  .carousel-indicator {
    animation: none;
    transition: none;
  }
  
  .avatar-ring {
    animation: none;
  }
  
  .testimonial-rating i {
    animation: none;
  }
  
  .form-title-mobile i,
  .call-button-mobile i {
    animation: none;
  }
  
  .button-shimmer-mobile {
    display: none;
  }
}