/* ============================================================
   FlexiTraining – Custom CSS
   Usar apenas para o que Tailwind não cobre nativamente.
   O grosso do estilo deve usar classes Tailwind directamente.
   ============================================================ */

/* --- Variáveis de marca (Whitelabel) ----------------------- */
:root {
  --color-brand-primary:   var(--tw-brand-primary, #4f46e5);
  --color-brand-secondary: var(--tw-brand-secondary, #f59e0b);
  --color-brand-dark:      #1e1b4b;
  --color-brand-light:     #eef2ff;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --shadow-card: 0 2px 12px 0 rgba(79, 70, 229, 0.08);
  --shadow-card-hover: 0 8px 32px 0 rgba(79, 70, 229, 0.18);
  --radius-card: 1rem;
}

/* --- Tipografia base --------------------------------------- */
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1f2937;
}

/* --- Scroll suave ----------------------------------------- */
html {
  scroll-behavior: smooth;
}

/* --- Cards de formação ------------------------------------ */
.card-formacao {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card-formacao:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* --- Botões com gradiente de marca ------------------------ */
.btn-brand {
  background: linear-gradient(135deg, var(--color-brand-primary), #6366f1);
  color: #fff;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.btn-brand:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* --- Badge de nível --------------------------------------- */
.badge-iniciante  { background-color: #d1fae5; color: #065f46; }
.badge-intermedio { background-color: #fef3c7; color: #92400e; }
.badge-avancado   { background-color: #fee2e2; color: #991b1b; }

/* --- Rating por estrelas ---------------------------------- */
.stars-rating {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
}

/* --- Barra de progresso ----------------------------------- */
.progress-bar {
  height: 6px;
  border-radius: 999px;
  background-color: #e5e7eb;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-brand-primary), #818cf8);
  transition: width 0.5s ease;
}

/* --- Hero search ------------------------------------------ */
.hero-search-input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 1rem;
  color: #1f2937;
}
.hero-search-input::placeholder {
  color: #9ca3af;
}

/* --- Scroll horizontal de cards --------------------------- */
.scroll-x-cards {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.scroll-x-cards::-webkit-scrollbar {
  height: 4px;
}
.scroll-x-cards::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}
.scroll-x-cards::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 999px;
}
.scroll-x-cards > * {
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* --- Gradiente do hero ------------------------------------ */
.hero-gradient {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1d4ed8 100%);
}

/* --- Overlay de categoria --------------------------------- */
.category-overlay {
  background: linear-gradient(to top, rgba(17,24,39,0.85) 0%, transparent 60%);
}

/* --- Número animado (counter) ----------------------------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* --- Tag/chip de área ------------------------------------- */
.tag-area {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #eef2ff;
  color: #4f46e5;
  transition: background 0.15s ease;
}
.tag-area:hover {
  background: #e0e7ff;
}

/* --- Depoimentos ------------------------------------------ */
.depoimento-card {
  border-left: 4px solid var(--color-brand-primary);
}

/* --- Nav link activo -------------------------------------- */
.nav-link-active {
  color: #4f46e5;
  border-bottom: 2px solid #4f46e5;
}

/* --- Animações subtis ------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.5s ease forwards;
}

/* --- Mobile menu ------------------------------------------ */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
#mobile-menu.open {
  max-height: 600px;
  opacity: 1;
}

/* --- Filtros sidebar (página de formações) ---------------- */
.filter-checkbox:checked + label {
  color: #4f46e5;
  font-weight: 500;
}

/* --- Responsive adjustments ------------------------------- */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.25;
  }
}
