:root {
  --accent: #FF4D00;
}

html { scroll-behavior: smooth; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Fallback for Tailwind accent color */
.bg-accent { background-color: var(--accent) !important; }
.text-accent { color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }
.hover\:text-accent:hover { color: var(--accent) !important; }
.hover\:bg-accent:hover { background-color: var(--accent) !important; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #d1d5db; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== LOW PRIORITY: Loading Animation ===== */
/* Page loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade in animation for content */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

/* Stagger animation for lists */
.stagger-in > * {
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.stagger-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== LOW PRIORITY: Micro-interactions ===== */
/* Button press effect */
button, .btn {
  transition: all 0.2s ease;
}

button:active, .btn:active {
  transform: scale(0.97);
}

/* Link underline animation */
.link-animate {
  position: relative;
  text-decoration: none;
}

.link-animate::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.link-animate:hover::after {
  width: 100%;
}

/* Card lift effect */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* Image zoom on hover */
.img-zoom {
  overflow: hidden;
}

.img-zoom img, .img-zoom > div {
  transition: transform 0.5s ease;
}

.img-zoom:hover img, .img-zoom:hover > div {
  transform: scale(1.05);
}

/* Pulse animation for badges */
.pulse-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Ripple effect for buttons */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Shake animation for error states */
.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Success checkmark animation */
.checkmark {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw 0.5s ease forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Tooltip animation */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 6px 12px;
  background: #000;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Number counter animation */
.count-up {
  transition: all 0.5s ease;
}

/* Icon rotation on hover */
.icon-rotate:hover .material-symbols-outlined {
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

/* Border glow effect */
.glow-border {
  transition: box-shadow 0.3s ease;
}

.glow-border:hover {
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
}

/* Smooth input focus */
input, textarea, select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ===== LOW PRIORITY: Mobile Responsive Fixes ===== */
@media (max-width: 768px) {
  /* Better touch targets */
  button, a, input, select {
    min-height: 44px;
  }

  /* Improve text readability */
  body {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }

  /* Fix horizontal scroll */
  html, body {
    overflow-x: hidden;
  }

  /* Better spacing on mobile */
  .mobile-p-4 {
    padding: 1rem;
  }

  /* Stack elements on mobile */
  .mobile-stack {
    flex-direction: column;
  }

  /* Full width on mobile */
  .mobile-full {
    width: 100%;
  }

  /* Hide on mobile */
  .mobile-hidden {
    display: none;
  }

  /* Smaller fonts on mobile */
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  /* Tighter padding on small screens */
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Smooth scroll behavior for all */
* {
  scroll-behavior: smooth;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
