/* Custom styles extending Tailwind */

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

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

input.error,
textarea.error {
  border-color: #de6a52;
  box-shadow: 0 0 0 2px rgba(222, 106, 82, 0.15);
}

input.success,
textarea.success {
  border-color: #768b5e;
  box-shadow: 0 0 0 2px rgba(118, 139, 94, 0.15);
}

/* Smooth transitions for mobile menu */
#mobile-menu {
  transition: opacity 0.3s ease;
}

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

#mobile-menu > div:last-child {
  transition: transform 0.3s ease;
}

#mobile-menu.open > div:last-child {
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Cookie banner animation */
#cookie-banner {
  animation: slideUp 0.4s ease-out;
}

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

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

/* Prose styling adjustments */
.prose p {
  margin-bottom: 1rem;
}

.prose em {
  font-style: italic;
  color: #5c6f49;
}

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

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

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

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

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Session card gradient borders */
.session-card {
  position: relative;
  overflow: hidden;
}

.session-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.session-card.session-1::before {
  background: linear-gradient(to bottom, #93a67d, #5c6f49);
}

.session-card.session-2::before {
  background: linear-gradient(to bottom, #f3b5a8, #de6a52);
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }
  h2 {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-banner,
  #mobile-menu {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
}

/* Reduced motion preferences */
@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;
  }
}
