/* Custom styles extending Tailwind */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0fa970;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth transitions for interactive elements */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.card-hover:hover {
  transform: translateY(-2px);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}

.faq-answer.open {
  opacity: 1;
}

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

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

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

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

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

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

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

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

/* Cookie consent slide in */
@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#cookie-consent.show {
  display: block;
  animation: slideInRight 0.4s ease-out;
}

/* Success message animation */
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-animate {
  animation: scaleIn 0.3s ease-out;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  h1 {
    word-break: break-word;
    hyphens: auto;
  }
}

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

/* Selection color */
::selection {
  background-color: #b3e5d8;
  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;
}

/* Skip to content for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: #102a43;
  color: #fff;
  z-index: 100;
  font-size: 0.875rem;
}

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