/* Custom styles extending 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 #1a9e8f;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form input transitions */
input,
textarea {
  font-size: 16px;
}

input:focus,
textarea:focus {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

input.input-success,
textarea.input-success {
  border-color: #1a9e8f;
  box-shadow: 0 0 0 2px rgba(26, 158, 143, 0.15);
}

/* Fade-in animation for sections */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

#mobile-menu.open #mobile-overlay {
  opacity: 1;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

/* Cookie consent animation */
#cookie-consent {
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#cookie-consent.show {
  transform: translateY(0);
  opacity: 1;
}

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

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(16, 42, 67, 0.12);
}

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

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

/* Button press effect */
button:active,
a[role="button"]:active {
  transform: scale(0.98);
}

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

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

  a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Selection color */
::selection {
  background-color: rgba(26, 158, 143, 0.2);
  color: #102a43;
}

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

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

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

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