/* Main CSS - Additional styles beyond Tailwind */

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

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

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

/* Form input transitions */
input:focus,
textarea:focus {
  outline: none;
}

input.error,
textarea.error {
  border-color: #dc2626;
}

input.success,
textarea.success {
  border-color: #16a34a;
}

/* Prose text styling */
.prose p {
  line-height: 1.75;
}

.prose p + p {
  margin-top: 1rem;
}

/* Mobile menu animation */
#mobile-menu .absolute.inset-y-0 {
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

#mobile-menu.open .absolute.inset-y-0 {
  transform: translateX(0);
}

#mobile-menu .absolute.inset-0 {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#mobile-menu.open .absolute.inset-0 {
  opacity: 1;
}

/* Card hover enhancements */
.group:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* FAQ accordion styles */
.faq-item {
  transition: all 0.3s ease;
}

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

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 0.75rem;
}

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

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Selection color */
::selection {
  background-color: #c7d2fe;
  color: #1e1b4b;
}

/* Responsive image handling */
img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    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;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #818cf8;
}

/* Ensure minimum tap targets for mobile */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  nav a {
    display: flex;
    align-items: center;
  }
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
}

/* Link underline animation */
a.animated-link {
  position: relative;
  text-decoration: none;
}

a.animated-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #4f46e5;
  transition: width 0.3s ease;
}

a.animated-link:hover::after {
  width: 100%;
}