/* Main CSS - Supplementary styles beyond Tailwind */

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

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
}

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

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

/* Base typography */
body {
  font-size: 16px;
  line-height: 1.6;
}

/* Serif headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', Georgia, serif;
}

/* Link transitions */
a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

/* Form error state */
input.input-error,
textarea.input-error {
  border-color: #e03131;
  box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.15);
}

/* Form success state */
input.input-success,
textarea.input-success {
  border-color: #2f9e44;
  box-shadow: 0 0 0 2px rgba(47, 158, 68, 0.15);
}

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

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

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

#mobile-menu.active {
  visibility: visible;
  transition: visibility 0s linear 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 ease;
}

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

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

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

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

.faq-item:hover {
  background-color: #f8f9fa;
}

.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-icon {
  transition: transform 0.3s ease;
}

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

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

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

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

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

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

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

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

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

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

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

/* Ensure minimum touch target size */
@media (pointer: coarse) {
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
  }
}
