/* ============================================
   LibrasCIn — Design System
   Paleta: Roxo profundo + Âmbar + Branco puro
   Tipografia: Inter (display) + sistema (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Tokens ---- */
:root {
  --roxo:        #4A1E8C;
  --roxo-escuro: #2D1057;
  --roxo-claro:  #7C3AED;
  --ambar:       #F59E0B;
  --ambar-claro: #FDE68A;
  --branco:      #FFFFFF;
  --cinza-50:    #F9FAFB;
  --cinza-100:   #F3F4F6;
  --cinza-200:   #E5E7EB;
  --cinza-400:   #9CA3AF;
  --cinza-600:   #4B5563;
  --cinza-800:   #1F2937;
  --preto:       #0D0D0D;
  --verde-ok:    #10B981;
  --vermelho:    #EF4444;

  --fonte:       'Inter', -apple-system, sans-serif;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(74,30,140,0.10);
  --shadow-md:   0 8px 40px rgba(74,30,140,0.16);
  --trans:       0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cinza-800);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* ---- Utilitários ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cinza-200);
  padding: 0 24px;
}
.navbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--roxo-escuro);
}
.navbar-logo .logo-badge {
  background: var(--roxo);
  color: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-links a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--cinza-600);
  transition: background var(--trans), color var(--trans);
}
.navbar-links a:hover { background: var(--cinza-100); color: var(--roxo); }
.navbar-links .btn-nav {
  background: var(--roxo); color: #fff;
  padding: 8px 18px; border-radius: 8px;
}
.navbar-links .btn-nav:hover { background: var(--roxo-escuro); color: #fff; }

/* Menu hamburguer (só aparece em telas estreitas, ver @media abaixo) */
.navbar-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.navbar-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  cursor: pointer; border-radius: 8px;
}
.navbar-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--roxo-escuro); border-radius: 2px;
}
.navbar-toggle:hover { background: var(--cinza-100); }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px;
  font-size: 15px; font-weight: 600;
  border-radius: var(--radius); border: none; cursor: pointer;
  transition: all var(--trans); line-height: 1;
}
.btn-primary { background: var(--roxo); color: #fff; }
.btn-primary:hover { background: var(--roxo-escuro); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-amber { background: var(--ambar); color: #1a1000; }
.btn-amber:hover { background: #d97706; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--roxo); border: 2px solid var(--roxo); }
.btn-outline:hover { background: var(--roxo); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--cinza-600); }
.btn-ghost:hover { background: var(--cinza-100); color: var(--cinza-800); }
.btn-ghost.active { background: var(--roxo); color: #fff; }
.btn-full { width: 100%; }

/* ---- Chips de categoria (scroll horizontal) ---- */
.chips-scroll-wrap { position: relative; }
.chips-scroll {
  display: flex; flex-wrap: nowrap; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 2px 2px 10px;
  scrollbar-width: thin; scrollbar-color: var(--cinza-200) transparent;
}
.chips-scroll::-webkit-scrollbar { height: 6px; }
.chips-scroll::-webkit-scrollbar-track { background: transparent; }
.chips-scroll::-webkit-scrollbar-thumb { background: var(--cinza-200); border-radius: 6px; }
.chips-scroll .btn { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
.chips-scroll-wrap::before, .chips-scroll-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 10px; width: 28px;
  pointer-events: none; z-index: 1;
}
.chips-scroll-wrap::before { left: 0; background: linear-gradient(90deg, var(--branco), transparent); }
.chips-scroll-wrap::after { right: 0; background: linear-gradient(270deg, var(--branco), transparent); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--roxo-escuro) 0%, var(--roxo) 60%, var(--roxo-claro) 100%);
  color: #fff;
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 6px 16px;
  font-size: 13px; font-weight: 500; margin-bottom: 28px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 24px; letter-spacing: -1px;
}
.hero h1 em { font-style: normal; color: var(--ambar-claro); }
.hero p { font-size: 18px; opacity: 0.85; margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
  margin-top: 64px; padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hero-stat .num { font-size: 32px; font-weight: 800; }
.hero-stat .lab { font-size: 13px; opacity: 0.7; margin-top: 2px; }

/* ---- Seções ---- */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-dark { background: var(--roxo-escuro); color: #fff; }
.section-gray { background: var(--cinza-50); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; letter-spacing: -0.5px;
  color: var(--roxo-escuro); margin-bottom: 14px;
}
.section-header p { font-size: 17px; color: var(--cinza-600); max-width: 540px; margin: 0 auto; }
.section-dark .section-header h2 { color: #fff; }
.section-dark .section-header p { color: rgba(255,255,255,0.7); }

/* ---- Grid de módulos ---- */
.modulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ---- Grid de detalhe do módulo (conteúdo + card de compra) ---- */
.modulo-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}

/* ---- Grid da página de assinatura (benefícios + card de compra) ---- */
.assinar-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}
.assinar-card { position: sticky; top: 80px; }

/* ---- Grid da página de vídeo do dicionário (player + lista) ---- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ---- Card de módulo ---- */
.card-modulo {
  background: #fff;
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--trans);
  display: flex; flex-direction: column;
}
.card-modulo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124,58,237,0.2);
}
.card-capa {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--roxo) 0%, var(--roxo-claro) 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-capa-icon { font-size: 48px; opacity: 0.25; }
.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ambar); color: #1a1000;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-nivel {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--roxo-claro); margin-bottom: 8px;
}
.card-titulo { font-size: 18px; font-weight: 700; color: var(--roxo-escuro); margin-bottom: 8px; line-height: 1.3; }
.card-desc { font-size: 14px; color: var(--cinza-600); line-height: 1.6; flex: 1; }
.card-meta {
  display: flex; gap: 16px; margin: 16px 0;
  font-size: 13px; color: var(--cinza-400);
}
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--cinza-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-preco { display: flex; flex-direction: column; }
.card-preco .preco-de { font-size: 12px; color: var(--cinza-400); text-decoration: line-through; }
.card-preco .preco-por { font-size: 22px; font-weight: 800; color: var(--roxo-escuro); }
.card-preco .preco-por sup { font-size: 13px; font-weight: 600; vertical-align: super; margin-right: 2px; }

/* ---- Plano assinatura ---- */
.plano-card {
  background: linear-gradient(135deg, var(--roxo-escuro), var(--roxo));
  color: #fff; border-radius: var(--radius-lg);
  padding: 48px; max-width: 700px; margin: 0 auto;
  text-align: center; position: relative; overflow: hidden;
}
.plano-card::after {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.plano-preco { margin: 28px 0; }
.plano-preco .valor { font-size: 52px; font-weight: 800; }
.plano-preco .periodo { font-size: 16px; opacity: 0.7; }
.plano-lista { list-style: none; text-align: left; margin: 0 auto 32px; max-width: 360px; }
.plano-lista li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 15px;
}
.plano-lista li::before { content: '✓'; color: var(--ambar); font-weight: 700; }

/* ---- Formulários ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--cinza-800); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--cinza-200);
  border-radius: var(--radius); font-size: 15px;
  color: var(--cinza-800); background: #fff;
  transition: border-color var(--trans), box-shadow var(--trans);
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--roxo-claro);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}
.form-input::placeholder { color: var(--cinza-400); }
.form-erro { font-size: 13px; color: var(--vermelho); margin-top: 4px; }

/* ---- Auth card ---- */
.auth-wrap {
  min-height: 100vh; background: var(--cinza-50);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 48px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-md);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .logo-text { font-size: 22px; font-weight: 800; color: var(--roxo-escuro); }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; color: var(--roxo-escuro); }
.auth-sub { font-size: 14px; color: var(--cinza-600); margin-bottom: 32px; }
.auth-footer {
  text-align: center; margin-top: 24px;
  font-size: 14px; color: var(--cinza-600);
}
.auth-footer a { color: var(--roxo); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--cinza-400); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--cinza-200);
}

/* ---- Área do aluno ---- */
.aluno-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
}
.aluno-sidebar {
  background: var(--roxo-escuro);
  color: #fff;
  padding: 28px 20px;
  grid-row: 1 / -1;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.aluno-sidebar .logo {
  font-size: 16px; font-weight: 700;
  padding: 0 8px 28px; border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 4px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: background var(--trans), color var(--trans);
}
.sidebar-nav a:hover,
.sidebar-nav a.ativa {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.sidebar-nav a.ativa { background: rgba(124,58,237,0.4); }
.sidebar-user {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--roxo-claro);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user .nome { font-size: 13px; font-weight: 600; }
.sidebar-user .email { font-size: 11px; opacity: 0.6; }

.aluno-main { padding: 40px 48px; background: var(--cinza-50); overflow-y: auto; }
.aluno-header { margin-bottom: 40px; }
.aluno-header h1 { font-size: 28px; font-weight: 800; color: var(--roxo-escuro); }
.aluno-header p { color: var(--cinza-600); margin-top: 4px; }

/* ---- Cards de progresso ---- */
.progresso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card-progresso {
  background: #fff; border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--cinza-200);
  transition: all var(--trans);
}
.card-progresso:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-progresso h3 { font-size: 16px; font-weight: 700; color: var(--roxo-escuro); margin-bottom: 12px; }
.progress-bar-wrap { height: 6px; background: var(--cinza-200); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--roxo), var(--roxo-claro)); border-radius: 999px; transition: width 0.6s ease; }
.progress-label { font-size: 12px; color: var(--cinza-600); display: flex; justify-content: space-between; }

/* ---- Player de vídeo ---- */
.video-wrapper {
  position: relative; padding-top: 56.25%;
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
}
.video-wrapper iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}

/* ---- Lista de aulas ---- */
.aulas-lista { list-style: none; }
.aula-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius);
  cursor: pointer; transition: background var(--trans);
}
.aula-item:hover { background: var(--cinza-100); }
.aula-item.ativa { background: rgba(124,58,237,0.08); }
.aula-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cinza-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--cinza-600);
}
.aula-item.concluida .aula-num { background: var(--verde-ok); color: #fff; }
.aula-titulo { font-size: 14px; font-weight: 500; color: var(--cinza-800); flex: 1; }
.aula-duracao { font-size: 12px; color: var(--cinza-400); }

/* ---- Alertas ---- */
.alerta {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alerta-erro { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alerta-ok { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alerta-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Tags e badges ---- */
.tag {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tag-roxo { background: rgba(124,58,237,0.12); color: var(--roxo); }
.tag-ambar { background: rgba(245,158,11,0.15); color: #92400e; }
.tag-verde { background: rgba(16,185,129,0.12); color: #065f46; }
.tag-vermelho { background: rgba(239,68,68,0.12); color: var(--vermelho); }

/* ---- Footer ---- */
.footer {
  background: var(--roxo-escuro); color: rgba(255,255,255,0.6);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto;
  gap: 40px; align-items: start;
}
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-desc { font-size: 13px; max-width: 280px; line-height: 1.6; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; transition: color var(--trans); }
.footer-links a:hover { color: #fff; }
.footer-copy {
  max-width: 1180px; margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; text-align: center;
}

/* ---- Responsivo ---- */
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; height: auto; min-height: 64px; padding: 0; }
  .navbar-logo-texto { display: none; }
  .navbar-toggle { display: flex; }
  .navbar-links {
    display: none;
    flex-direction: column; align-items: stretch;
    width: 100%;
    padding: 8px 0 16px;
    gap: 4px;
    background: var(--branco);
    border-top: 1px solid var(--cinza-200);
  }
  .navbar-toggle-input:checked ~ .navbar-links { display: flex; }
  .navbar-links a { padding: 12px 14px; }
  .navbar-links .btn-nav { margin-top: 4px; text-align: center; }

  .modulo-grid { grid-template-columns: 1fr; gap: 32px; }
  .assinar-grid { grid-template-columns: 1fr; gap: 24px; }
  .assinar-card { position: static; top: auto; }
  .video-grid { grid-template-columns: 1fr; gap: 24px; }

  .aluno-layout { grid-template-columns: 1fr; }
  .aluno-sidebar {
    position: fixed; left: -260px; width: 260px; z-index: 200;
    transition: left 0.3s ease;
  }
  .aluno-sidebar.aberta { left: 0; }
  .aluno-main { padding: 24px 20px; }
  .hero-stats { gap: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .modulos-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
