/* Custom Styles for VRIMBL RV Landing Page */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Ensure minimum tap target size for mobile (44x44px) */
a, button {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Override for inline text links */
p a, li a {
  display: inline;
  min-height: auto;
  min-width: auto;
}

/* Better focus states for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #0EA5E9;
  outline-offset: 2px;
}

/* Lazy loading images - slight fade in effect */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

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

/* Form focus improvements */
input:focus, textarea:focus, select:focus {
  border-color: #0EA5E9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

/* Better select dropdown styling */
select {
  appearance: none;
  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='%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.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* Print styles for better printing */
@media print {
  header, footer, nav {
    display: none;
  }
  
  section {
    page-break-inside: avoid;
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animation for hero content */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Better image loading with aspect ratio */
img {
  max-width: 100%;
  height: auto;
}

/* Optimized font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Loading state for forms */
form.submitting {
  opacity: 0.6;
  pointer-events: none;
}

form.submitting button[type="submit"] {
  position: relative;
}

form.submitting button[type="submit"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

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

/* Success message styling */
.form-success {
  background-color: #10B981;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}

.form-success.show {
  display: block;
}

/* Error message styling */
.form-error {
  background-color: #EF4444;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}

.form-error.show {
  display: block;
}
