/* FEP - Custom Styles */

:root {
  --color-iniciante: #10B981;
  --color-tecnico: #3B82F6;
  --color-masterclass: #8B5CF6;
  --spacing-unit: 1rem;
  --border-radius: 0.75rem;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
}

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

/* Font Rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Level Cards Hover Effect */
.level-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.level-card:hover {
  box-shadow: var(--shadow-xl);
}

/* Module Cards */
.module-card {
  transition: all 0.3s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Button Animations */
button, a[class*="bg-"] {
  transition: all 0.2s ease-in-out;
}

button:active, a[class*="bg-"]:active {
  transform: scale(0.98);
}

/* Focus Visible (Accessibility) */
*:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip to main content (Accessibility) */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background-color: #3B82F6;
  color: white;
  text-decoration: none;
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 1rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6B7280;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: #3B82F6;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #2563EB;
}

.breadcrumb-separator {
  color: #9CA3AF;
}

/* Progress Indicator */
.progress-bar {
  height: 0.5rem;
  background-color: #E5E7EB;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6);
  transition: width 0.5s ease-out;
}

/* Content Access Buttons */
.content-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
}

.content-button-primary {
  background-color: #3B82F6;
  color: white;
  border: 2px solid #3B82F6;
}

.content-button-primary:hover {
  background-color: #2563EB;
  border-color: #2563EB;
}

.content-button-secondary {
  background-color: transparent;
  color: #3B82F6;
  border: 2px solid #3B82F6;
}

.content-button-secondary:hover {
  background-color: #EFF6FF;
}

/* Mobile Menu Transition */
#mobile-menu {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

#mobile-menu:not(.hidden) {
  opacity: 1;
  max-height: 500px;
}

/* Dropdown Menu */
.group:hover .group-hover\:block {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

/* Reduced Motion (Accessibility) */
@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;
  }
}

/* Print Styles */
@media print {
  nav, footer {
    display: none;
  }

  .no-print {
    display: none;
  }

  * {
    background: white !important;
    color: black !important;
  }
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* Loading State */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3B82F6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast Notification (for future use) */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
}

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

/* Module Badge Colors */
.badge-iniciante {
  background-color: var(--color-iniciante);
  color: white;
}

.badge-tecnico {
  background-color: var(--color-tecnico);
  color: white;
}

.badge-masterclass {
  background-color: var(--color-masterclass);
  color: white;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Link Styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Selection Color */
::selection {
  background-color: #3B82F6;
  color: white;
}

::-moz-selection {
  background-color: #3B82F6;
  color: white;
}

/* Category Filter Buttons */
.category-filter {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid #E5E7EB;
  background-color: white;
  color: #6B7280;
  cursor: pointer;
}

.category-filter:hover {
  border-color: #6366F1;
  color: #6366F1;
  background-color: #EEF2FF;
}

.category-filter.active {
  border-color: #6366F1;
  background-color: #6366F1;
  color: white;
}

.category-filter.active:hover {
  background-color: #4F46E5;
  border-color: #4F46E5;
}
