/* 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, section {
  flex-shrink: 0;
}

footer {
  margin-top: auto;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6366f1;
  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 states */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #ef4444;
}

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

input.success,
textarea.success {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

/* 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 rgba(0, 0, 0, 0.08);
}

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

#mobile-menu.active {
  visibility: visible;
  transition: visibility 0s linear 0s;
}

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

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

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

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

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

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

/* FAQ accordion styling */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-toggle {
  cursor: pointer;
  user-select: none;
}

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

.faq-answer.open {
  max-height: 500px;
}

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

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

/* Hero decorative gradient */
.hero-gradient {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 40%, #eff6ff 100%);
}

/* Subtle text selection */
::selection {
  background-color: #c7d2fe;
  color: #312e81;
}

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

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

/* Responsive image fallback */
img[src=""] {
  background: linear-gradient(135deg, #e0e7ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #a5b4fc;
}
