/* ============================================================
   DEFESAEXPRESS ACADEMY - CSS
   ============================================================ */

:root {
  --onyx-950: #09090B;
  --onyx-900: #0F0F12;
  --onyx-850: #13131A;
  --onyx-800: #1A1A22;
  --onyx-700: #252530;
  --onyx-600: #3A3A4A;
  --gold: #D4AF37;
  --gold-light: #E8C65C;
  --gold-dark: #B8941F;
  --gold-glow: rgba(212,175,55,.15);
  --text: #F5F5F7;
  --text-dim: #A1A1AA;
  --text-mute: #71717A;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(212,175,55,0.25);
  --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  --gradient-dark: linear-gradient(180deg, var(--onyx-850), var(--onyx-900));
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 8px 32px rgba(212,175,55,.25);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--onyx-950);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .section-header h2, .stat-number {
  font-family: var(--font-display);
}

i, svg { display: inline-flex; align-items: center; justify-content: center; }
.nav-link i, .nav-link svg, .btn i, .btn svg, .icon-btn i, .icon-btn svg { width: 20px; height: 20px; margin: 0; padding: 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.academy-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(9,9,11,0.92);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform, backdrop-filter;
}
.academy-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 68px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #09090B;
  flex-shrink: 0;
}
.logo-icon i,
.logo-icon svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; overflow: hidden; }
.logo-main { font-weight: 800; font-size: 15px; letter-spacing: -0.3px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.logo-sub { font-weight: 500; font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--onyx-800); }
.nav-link.active { color: var(--gold-light); background: rgba(212,175,55,0.10); }
.nav-link i, .nav-link svg { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }

.nav-mobile-toggle {
  display: none;
  background: none; border: none; color: var(--text-primary);
  font-size: 20px; cursor: pointer; padding: 8px;
}
.nav-mobile-toggle i, .nav-mobile-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.academy-hero {
  position: relative;
  padding: 140px 32px 80px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 80vh;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  top: -20%; right: -10%;
  max-width: 600px; width: 100%; min-height: 600px;
  background: radial-gradient(circle, rgba(212,175,55,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.20);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 13px; font-weight: 600;
  margin-bottom: 24px;
}
.hero-badge i, .hero-badge svg { width: 14px; height: 14px; }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-stats {
  display: flex; gap: 40px;
  margin-bottom: 36px;
}
.stat-item { display: flex; flex-direction: column; }
.stat-number {
  font-size: 2rem; font-weight: 800;
  background: var(--gradient-gold);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 13px; color: var(--text-mute); font-weight: 500; }

.hero-search {
  position: relative;
  max-width: 480px;
}
.hero-search i {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 16px;
}
.hero-search input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--onyx-800);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.hero-search input::placeholder { color: var(--text-mute); }
.hero-search input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.15);
}
.search-shortcut {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  padding: 4px 10px;
  background: var(--onyx-900);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px; color: var(--text-mute);
  font-family: inherit;
}

/* Hero Visual */
.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 16px;
  align-content: center;
  justify-items: center;
  padding: 20px;
}
.floating-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px; font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
  width: 100%;
  max-width: 200px;
}
.floating-card i, .floating-card svg { width: 20px; height: 20px; flex-shrink: 0; }
.card-1 { animation-delay: 0s; }
.card-1 i, .card-1 svg { color: var(--success); }
.card-2 { animation-delay: 1s; }
.card-2 i, .card-2 svg { color: var(--gold); }
.card-3 { animation-delay: 2s; }
.card-3 i, .card-3 svg { color: var(--gold-light); }
.card-4 { animation-delay: 3s; }
.card-4 i, .card-4 svg { color: var(--danger); }
.card-5 { animation-delay: 4s; grid-column: 1 / -1; justify-self: center; }
.card-5 i, .card-5 svg { color: var(--info); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   MAIN / CURSOS
   ============================================================ */
.academy-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 32px 100px;
}

/* Fade-in animation for cards */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: 1.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 12px;
}
.section-header h2 i, .section-header h2 svg { color: var(--gold); width: 24px; height: 24px; }
.section-header p { color: var(--text-dim); font-size: 1.05rem; }

.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

/* Curso Card */
.curso-card {
  background: linear-gradient(180deg, var(--onyx-850), var(--onyx-900));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.curso-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cor, var(--gold));
  opacity: 0;
  transition: var(--transition);
}
.curso-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}
.curso-card:hover::before { opacity: 1; }

.curso-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.curso-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--cor, var(--gold));
  border: 1px solid rgba(255,255,255,0.08);
}
.curso-icon i, .curso-icon svg { width: 24px; height: 24px; }
.curso-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.curso-tag {
  padding: 4px 12px;
  min-width: 90px;
  text-align: center;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.20);
  border-radius: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.5px;
}
.curso-count {
  font-size: 12px; color: var(--text-mute);
  display: flex; align-items: center; gap: 5px;
}
.curso-count i, .curso-count svg { width: 10px; height: 10px; }

.curso-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.curso-desc {
  font-size: 14px; color: var(--text-dim);
  line-height: 1.6; margin-bottom: 20px;
  min-height: 44px;
}

.curso-progress { margin-bottom: 22px; }
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 100px;
  transition: width 0.5s ease;
}
.progress-text { font-size: 12px; color: var(--text-mute); }

.curso-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}

.btn-primary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: var(--radius-sm);
  color: #09090B;
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,175,55,0.35);
}
.btn-ghost {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: rgba(212,175,55,0.30);
  color: var(--text);
  background: rgba(212,175,55,0.05);
}

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.active { display: flex; }

.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%; max-width: 1100px;
  max-height: 90vh;
  background: linear-gradient(180deg, var(--onyx-850), var(--onyx-900));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.3s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}
.modal-title-group { display: flex; flex-direction: column; gap: 4px; }
.modal-title-group h3 { font-size: 1.15rem; font-weight: 700; }
.modal-subtitle { font-size: 13px; color: var(--text-muted); }
.modal-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--onyx-800);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover {
  background: var(--danger); color: white; border-color: var(--danger);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  overflow: hidden;
  flex: 1;
}

.player-area {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
}
.video-player {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.video-player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: none;
}
.video-player iframe.active { display: block; }

.player-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}
.player-placeholder i, .player-placeholder svg { width: 64px; height: 64px; opacity: 0.3; }
.player-placeholder p { font-size: 15px; }
.player-placeholder.hidden { display: none; }

.video-info {
  padding: 20px 28px;
  flex: 1;
  overflow-y: auto;
}
.video-info h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.video-info p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

.playlist-area {
  display: flex; flex-direction: column;
  background: var(--onyx-950);
}
.playlist-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.playlist-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.playlist-title i { margin-right: 6px; color: var(--gold); }
.playlist-count { font-size: 12px; color: var(--text-muted); }

.playlist-search {
  position: relative;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.playlist-search i {
  position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 12px;
}
.playlist-search input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  background: var(--onyx-800);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px; font-family: inherit;
  outline: none;
}
.playlist-search input::placeholder { color: var(--text-mute); }
.playlist-search input:focus { border-color: var(--gold); }

.playlist-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.playlist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
}
.playlist-item:hover { background: var(--onyx-800); }
.playlist-item.active {
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.20);
}
.playlist-item.watched .item-status { color: var(--success); }

.item-thumb {
  width: 80px; height: 50px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb i, .item-thumb svg {
  width: 20px; height: 20px; color: var(--text-muted);
  transition: var(--transition);
}
.playlist-item:hover .item-thumb i, .playlist-item:hover .item-thumb svg { color: var(--gold-light); }
.item-duration {
  position: absolute; bottom: 4px; right: 4px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.8);
  border-radius: 4px;
  font-size: 10px; font-weight: 600; color: white;
}

.item-info { flex: 1; min-width: 0; }
.item-title {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.item-meta {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.item-status { font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.item-status i, .item-status svg { width: 12px; height: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.academy-footer {
  border-top: 1px solid var(--border);
  padding: 50px 32px;
  text-align: center;
  background: linear-gradient(180deg, var(--onyx-950), var(--onyx-900));
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 16px;
}
.footer-brand i, .footer-brand svg { color: var(--gold); width: 22px; height: 22px; }
.footer-text { color: var(--text-mute); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.academy-footer .social { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: var(--text-dim); border: 1px solid var(--border); transition: var(--transition); text-decoration: none; flex-shrink: 0; }
.social a:hover { color: var(--gold); border-color: var(--gold); background: rgba(212, 175, 55, 0.08); transform: translateY(-2px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .academy-hero { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-desc, .hero-search { margin-left: auto; margin-right: auto; }
  .hero-visual { display: none; }
  .hero-stats { justify-content: center; }
  .modal-body { grid-template-columns: 1fr; }
  .playlist-area { border-top: 1px solid var(--border); max-height: 300px; }
  .player-area { border-right: none; }
}

@media (max-width: 768px) {
  .academy-nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(9,9,11,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    gap: 16px;
    z-index: 999;
  }
  .nav-mobile-toggle { display: block; }
  .academy-hero { padding: 100px 20px 60px; }
  .academy-main { padding: 40px 20px 60px; }
  .cursos-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .hero-stats { gap: 24px; }
  .stat-number { font-size: 1.5rem; }
  .search-shortcut { display: none; }
  .video-modal { padding: 0; }
  .modal-content { max-height: 100vh; border-radius: 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--onyx-950); }
::-webkit-scrollbar-thumb { background: var(--onyx-700); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--onyx-600); }

/* Selection */
::selection { background: rgba(212,175,55,0.3); color: white; }

.curso-card[data-status="em-breve"] .curso-tag {
  background: rgba(148, 163, 184, 0.15);
  color: rgba(255, 255, 255, 0.55);
}
.curso-card[data-status="ativo"] .curso-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}
