/* Base Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

main {
  flex: 1;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #b45309;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
  background: #a8a29e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #78716c;
}

/* Form input autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff;
  transition: background-color 5000s ease-in-out 0s;
}

/* Light background form autofill */
.bg-white input:-webkit-autofill,
.bg-white input:-webkit-autofill:hover,
.bg-white input:-webkit-autofill:focus,
.bg-stone-50 input:-webkit-autofill,
.bg-stone-50 input:-webkit-autofill:hover,
.bg-stone-50 input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1c1917;
}

/* Animation utilities */
.animate-fade-in {
  animation: fadeIn 0.5s ease-in;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Mobile menu transitions */
#mobile-menu {
  transition: visibility 0.3s;
}

#mobile-menu > div:first-child {
  transition: opacity 0.3s ease;
}

#mobile-menu > div:last-child {
  transition: transform 0.3s ease;
}

#mobile-menu.hidden > div:first-child {
  opacity: 0;
}

#mobile-menu.hidden > div:last-child {
  transform: translateX(100%);
}

/* Cookie consent animation */
#cookie-consent {
  animation: slideUp 0.4s ease-out;
}

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

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

/* FAQ accordion styles */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-toggle .faq-icon {
  transition: transform 0.3s ease;
}

.faq-toggle.active .faq-icon {
  transform: rotate(180deg);
}

/* Selection color */
::selection {
  background-color: #fbbf24;
  color: #1c1917;
}

/* Print styles */
@media print {
  header, footer, #cookie-consent, #mobile-menu {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* Image fallback */
img {
  background-color: #e7e5e4;
}

/* Ensure images within containers are responsive */
img {
  max-width: 100%;
  height: auto;
}
