/* Main CSS - Additional styles beyond Tailwind */

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

/* Base body styles */
body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Focus visible styles for keyboard accessibility */
*:focus-visible {
  outline: 2px solid #4c6ef5;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Links transition */
a {
  transition: color 0.2s ease;
}

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

/* Input error state */
input.error,
textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* Input success state */
input.success,
textarea.success {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

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

#mobile-menu.active {
  visibility: visible;
  transition-delay: 0s;
}

#mobile-menu #menu-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#mobile-menu.active #menu-backdrop {
  opacity: 1;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.active > div:last-child {
  transform: translateX(0);
}

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

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

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

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Image fade in on load */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Hero gradient animation */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* FAQ accordion styles */
.faq-item {
  transition: background-color 0.2s ease;
}

.faq-item:hover {
  background-color: rgba(240, 244, 255, 0.5);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

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

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

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

/* Selection color */
::selection {
  background-color: #dbe4ff;
  color: #364fc7;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

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

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
    color: #000;
  }
}

/* Reduced motion preference */
@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;
  }
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 999;
  padding: 0.75rem 1.5rem;
  background: #4263eb;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}
