/* Custom styles extending Tailwind */

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,
select:focus-visible {
  outline: 2px solid #0fa85b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form input states */
input.error,
textarea.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input.success,
textarea.success {
  border-color: #0fa85b !important;
  box-shadow: 0 0 0 3px rgba(15, 168, 91, 0.1);
}

/* Smooth transitions for interactive elements */
a,
button {
  transition: all 0.2s ease;
}

/* Mobile menu animation */
#mobile-menu {
  transition: opacity 0.3s ease;
}

#mobile-menu.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

#mobile-menu .absolute.right-0 {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

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

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

/* Hero SVG background subtle animation */
.hero-bg-animate {
  animation: floatBg 20s ease-in-out infinite;
}

@keyframes floatBg {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

/* 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 12px 24px rgba(16, 42, 67, 0.1);
}

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

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

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

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

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

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #mobile-menu {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* 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;
  }
}

/* Selection styling */
::selection {
  background-color: rgba(15, 168, 91, 0.15);
  color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #829ab1;
}

/* Image placeholder styling */
img[src=""] {
  background: linear-gradient(135deg, #d9e2ec 0%, #bcccdc 100%);
  min-height: 200px;
  display: block;
}

/* Responsive typography fine-tuning */
@media (max-width: 640px) {
  .font-serif {
    word-break: break-word;
    hyphens: auto;
  }
}
