/* Main CSS - Microlearning 2026 */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Body scroll lock for mobile menu */
body.menu-open {
  overflow: hidden;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background-color: #ccfbf1;
  color: #134e4a;
}

/* Smooth transitions for interactive elements */
a,
button,
input,
textarea {
  transition: all 0.2s ease-in-out;
}

/* Form input focus states */
input:focus,
textarea:focus {
  outline: none;
}

/* Form validation states */
input.error,
textarea.error {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

input.success,
textarea.success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Mobile menu animation */
#mobile-menu {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

#mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu > div:last-child {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#cookie-consent.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hero subtle animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

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

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

.faq-question {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1e293b;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #0f766e;
}

.faq-question .faq-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-question.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding-bottom: 0;
}

.faq-answer.open {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

/* Scroll margin for anchor links */
[id] {
  scroll-margin-top: 100px;
}

/* Image fallback styling */
img[src=""] {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0e7ff 50%, #fef3c7 100%);
  min-height: 240px;
  display: block;
}

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

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

  a {
    text-decoration: underline;
  }
}

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

/* Typography fine-tuning */
.font-serif {
  letter-spacing: -0.01em;
}

p {
  orphans: 3;
  widows: 3;
}

/* Custom scrollbar */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }

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

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

  ::-webkit-scrollbar-thumb:hover {
    background: #78716c;
  }
}
