/* Custom styles to complement Tailwind CSS */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #0066FF;
  border-radius: 6px;
  border: 3px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background: #0052CC;
}

/* Image loading optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Form input styling enhancement */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Checkbox styling */
input[type="checkbox"] {
  cursor: pointer;
}

/* Animation utilities */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

/* Button hover effects enhancement */
button,
a[class*="bg-"] {
  transition: all 0.3s ease;
}

/* Card hover effects */
.hover\:shadow-2xl:hover {
  transform: translateY(-4px);
}

/* Mobile menu transition */
#mobileMenu {
  transition: all 0.3s ease-in-out;
}

/* Cookie popup styles */
#cookiePopup {
  z-index: 9999;
}

/* Error state for form inputs */
.border-red-500 {
  border-color: #ef4444 !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
      font-size: 2rem;
  }
  
  h2 {
      font-size: 1.75rem;
  }
  
  h3 {
      font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookiePopup,
  #burgerMenu {
      display: none;
  }
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  button,
  a[class*="bg-"] {
      border: 2px solid currentColor;
  }
}

/* Added modern card hover effects matching reference design */
.feature-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
}

.route-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.route-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* FAQ accordion smooth transitions */
.faq-answer {
  transition: all 0.3s ease;
  overflow: hidden;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-question:hover {
  background-color: #f9fafb;
}

/* Image zoom effect on hover */
.route-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.route-card:hover img {
  transform: scale(1.1);
}

/* Button ripple effect */
button:active,
a[class*="bg-blue"]:active {
  transform: scale(0.98);
}

/* Enhanced focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #0066FF;
  outline-offset: 2px;
}

/* Smooth gradient backgrounds */
.bg-gradient-to-br {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Card entrance animation */
@keyframes cardEnter {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.animate-card-enter {
  animation: cardEnter 0.6s ease-out forwards;
}

/* Skeleton loading state */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}
