/* ===================================
   ATOMIC COMMUNITY - CURSOS & AULAS
   Sistema de cursos e player ao vivo
   =================================== */

/* === CURSOS LISTING === */
.section-cursos {
  padding: 3rem 0;
}

.cursos-grid-destaque {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* === CURSO CARD DESTAQUE === */
.curso-card-destaque {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  text-decoration: none;
  display: block;
}

.curso-card-destaque:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.curso-thumb {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--darker-bg);
  position: relative;
}

.curso-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
}

.curso-info {
  padding: 1.5rem;
}

.curso-titulo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.curso-descricao {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curso-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.meta-icon {
  font-size: 1rem;
}

.curso-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.rating-stars {
  color: #ffc107;
  font-weight: 600;
}

.rating-count {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* === CURSO CARD PEQUENO === */
.curso-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  text-decoration: none;
  display: block;
}

.curso-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.curso-thumb-small {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--darker-bg);
  position: relative;
}

.curso-badge-small {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
}

.curso-info-small {
  padding: 1.25rem;
}

.curso-titulo-small {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curso-descricao-small {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curso-meta-small {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.curso-rating-small {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === DETALHES DO CURSO === */
.curso-header {
  background: linear-gradient(135deg, rgba(229,9,20,0.1) 0%, transparent 100%);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}

.curso-header-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}

.breadcrumb-curso {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.breadcrumb-curso a {
  color: var(--primary-color);
  text-decoration: none;
}

.curso-header-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.curso-header-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.curso-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.meta-badge {
  background: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.curso-rating-header {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #ffc107;
}

.inscrito-badge {
  background: rgba(70, 211, 105, 0.15);
  border: 1px solid var(--success-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--success-color);
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.progresso-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progresso-bar {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.progresso-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.btn-inscrever {
  background: var(--gradient-primary);
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-inscrever:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.curso-header-image img,
.curso-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.curso-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--darker-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.placeholder-icon {
  font-size: 5rem;
  opacity: 0.3;
}

.curso-descricao-detalhada {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* === LISTA DE AULAS === */
.aulas-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aula-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: all var(--transition-normal);
}

.aula-item:hover {
  border-color: var(--primary-color);
  background: rgba(229,9,20,0.05);
}

.aula-inativa {
  opacity: 0.6;
}

.aula-icon {
  font-size: 1.5rem;
}

.live-badge {
  background: #ff0000;
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.aula-content {
  flex: 1;
}

.aula-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gratuita-badge {
  background: var(--success-color);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.aula-descricao {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

.aula-live-info {
  font-size: 0.85rem;
  color: var(--primary-color);
  margin: 0;
}

.aula-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aula-duracao {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn-assistir-small {
  background: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-assistir-small:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.locked-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

/* === PLAYER DE AULA === */
.player-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 100vh;
  background: var(--dark-bg);
  padding-top: 4rem;
}

.player-main {
  padding: 2rem;
  overflow-y: auto;
}

.player-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 2rem;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.player-placeholder span {
  font-size: 4rem;
  opacity: 0.3;
}

/* === LIVE WAITING === */
.live-waiting {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.live-waiting-content {
  text-align: center;
  padding: 2rem;
}

.live-waiting-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: #ff0000;
}

.live-waiting-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.live-countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.countdown-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.live-date {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 2rem;
}

/* === LIVE INDICATOR === */
.live-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ff0000;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.live-pulse {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === PLAYER INFO === */
.player-info {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.breadcrumb-player {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.breadcrumb-player a {
  color: var(--primary-color);
  text-decoration: none;
}

.player-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.live-badge-small {
  background: #ff0000;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-concluir {
  background: var(--success-color);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-concluir:hover {
  transform: scale(1.05);
}

.btn-concluido {
  background: rgba(70, 211, 105, 0.3);
  cursor: not-allowed;
}

.player-description {
  margin-bottom: 2rem;
}

.player-description h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.player-description p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.player-materials h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.btn-material {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-normal);
}

.btn-material:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--primary-color);
}

/* === PLAYER SIDEBAR (PLAYLIST) === */
.player-sidebar {
  background: var(--darker-bg);
  border-left: 1px solid var(--border-color);
  padding: 2rem 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.sidebar-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.sidebar-playlist {
  padding: 1rem 0;
}

.playlist-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.playlist-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.playlist-item-active {
  background: rgba(229,9,20,0.1);
  border-left-color: var(--primary-color);
  color: var(--text-primary);
}

.playlist-number {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.playlist-item-active .playlist-number {
  background: var(--primary-color);
}

.playlist-content {
  flex: 1;
}

.playlist-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.playlist-badge-live {
  background: #ff0000;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.playlist-playing {
  font-size: 1.25rem;
  color: var(--primary-color);
}

/* === MEUS CURSOS === */
.meus-cursos-header {
  padding: 2rem 0;
  text-align: center;
}

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.8;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meus-cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.meu-curso-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.meu-curso-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.curso-link {
  display: block;
  text-decoration: none;
}

.curso-info-meus {
  padding: 1.5rem;
}

.curso-titulo-meus {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.curso-titulo-meus a {
  color: var(--text-primary);
  text-decoration: none;
}

.curso-titulo-meus a:hover {
  color: var(--primary-color);
}

.curso-progresso-container {
  margin-bottom: 1.25rem;
}

.progresso-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progresso-percent {
  font-weight: 700;
  color: var(--text-primary);
}

.progresso-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progresso-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.btn-continuar,
.btn-revisar {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  display: block;
}

.btn-continuar {
  background: var(--primary-color);
  color: white;
}

.btn-continuar:hover {
  background: var(--primary-hover);
  transform: scale(1.02);
}

.btn-revisar {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-revisar:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--primary-color);
}

.curso-concluido {
  border-color: var(--success-color);
}

.concluido-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--success-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.conclusao-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(70, 211, 105, 0.1);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--success-color);
}

.conclusao-icon {
  font-size: 1.5rem;
}

/* === RESPONSIVE CURSOS === */
@media (max-width: 1200px) {
  .player-container {
    grid-template-columns: 1fr;
  }

  .player-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

@media (max-width: 992px) {
  .curso-header-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cursos-grid-destaque {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .player-main {
    padding: 1rem;
  }

  .player-info {
    padding: 1.5rem;
  }

  .player-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-concluir {
    width: 100%;
    justify-content: center;
  }

  .live-countdown {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .countdown-number {
    font-size: 2rem;
  }

  .stats-dashboard {
    grid-template-columns: 1fr 1fr;
  }

  .meus-cursos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cursos-grid {
    grid-template-columns: 1fr;
  }

  .stats-dashboard {
    grid-template-columns: 1fr;
  }

  .live-countdown {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .countdown-label {
    font-size: 0.75rem;
  }
}

