/* 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,
select:focus-visible {
  outline: 2px solid #4263eb;
  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.error,
textarea.error {
  border-color: #e03131;
  box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.1);
}

input.success,
textarea.success {
  border-color: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.1);
}

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

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

/* Card hover lift */
.card-hover:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

#mobile-menu.open {
  display: block;
  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 {
  animation: slideUpCookie 0.4s ease-out;
}

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

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

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

.faq-question {
  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-chevron {
  transition: transform 0.3s ease;
}

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

/* Session cards staggered animation */
.session-card:nth-child(1) { animation-delay: 0.1s; }
.session-card:nth-child(2) { animation-delay: 0.2s; }
.session-card:nth-child(3) { animation-delay: 0.3s; }

/* Responsive image handling */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 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 for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Selection styling */
::selection {
  background-color: #bac8ff;
  color: #212529;
}

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

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

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

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