/* Main CSS - Supplementary styles beyond Tailwind */

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

/* Base body */
body {
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

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

input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #dc2626;
}

input.input-error,
textarea.input-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

input.input-success,
textarea.input-success {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

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

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

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

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

/* Mobile menu transitions */
#mobile-menu {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

#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: slideInUp 0.4s ease-out;
}

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

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

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

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

/* 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: #c7d2fe;
  color: #1e1b4b;
}

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

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

/* Image fallback styling */
img[src=""] {
  background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  .prose p {
    font-size: 1rem;
  }
}

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

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