/* Variáveis de cores */
:root {
  --primary-color: #5624d0;
  --primary-light: #6b3dff;
  --secondary-color: #f7f9fa;
  --text-color: #1c1d1f;
  --text-light: #6a6f73;
  --border-color: #d1d7dc;
  --success-color: #1e6055;
  --white: #ffffff;
  --shadow: 0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.08);
}

/* Reset e estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: var(--text-color);
  line-height: 1.5;
}

/* Header */
header {
  background-color: #5624d0;
  color: white;
  padding: 20px 0;
  text-align: center;
  width: 100%;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.5px;
}

header .slogan {
  margin: 15px 0 0;
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  font-family: 'Poppins', sans-serif;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Filtros */
.filtros {
  padding: 20px 0;
}

.filtros form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.filtros input,
.filtros select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  min-width: 200px;
}

/* Cursos */
.slider-container {
  padding: 20px 0;
}

.slider {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.curso-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.curso {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.curso:hover {
  transform: translateY(-5px);
}

.curso-info {
  padding: 1.5rem;
}

.curso-info h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.curso-info p strong {
  color: #333;
}

.curso-info p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.curso-info img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin: 1rem 0;
}

.curso-buttons {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.btn-visitar {
  background-color: #5624d0;
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-visitar:hover {
  background-color: #4a1db8;
}

.btn-detalhes {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-detalhes:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Comentários */
.curso .comentarios {
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.curso .comentarios h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1em;
}

.curso .comentario-item {
  margin-bottom: 15px;
  padding: 10px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.curso .comentario-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #666;
}

.curso .comentario-autor {
  font-weight: 600;
  color: #333;
}

.curso .comentario-data {
  color: #888;
}

.curso .comentario-texto {
  margin: 0;
  line-height: 1.4;
  color: #444;
}

.curso .sem-comentarios {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 10px;
}

/* Botão Carregar Mais */
.load-more-container {
  text-align: center;
  margin: 20px 0;
}

#load-more {
  padding: 10px 20px;
  background: #333;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#load-more:hover {
  background: #444;
}

/* Toast */
#toast {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #333;
  color: #fff;
  padding: 15px;
  border-radius: 10px;
  z-index: 1000;
}

/* Popup */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
}

/* Informações do Curso no Popup */
.curso-popup-info {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.curso-popup-info h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.curso-popup-info img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  margin: 0;
}

.btn-visitar {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.btn-visitar:hover {
  background-color: var(--primary-light);
}

/* Lista de Comentários */
.comentarios-lista {
  margin-bottom: 2rem;
}

.comentarios-lista h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.comentario-item {
  background: var(--secondary-color);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.comentario-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.comentario-autor {
  font-weight: 600;
  color: var(--primary-color);
}

.comentario-data {
  color: var(--text-light);
}

.comentario-texto {
  color: var(--text-color);
  line-height: 1.5;
}

.sem-comentarios, .erro-carregamento {
  text-align: center;
  color: var(--text-light);
  padding: 1rem;
  background: var(--secondary-color);
  border-radius: 4px;
}

/* Formulário de Comentário */
.form-comentario {
  margin-top: 20px;
}

.form-comentario h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.aviso-anonimo {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.form-group {
  margin-bottom: 15px;
}

.form-group > label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-enviar {
  background: #333;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn-enviar:hover {
  background: #444;
}

.radio-inline {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 8px;
}

.radio-inline label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  margin-bottom: 0;
  margin-right: 10px;
}

/* Responsividade do Popup */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .filtros form {
    flex-direction: column;
    align-items: stretch;
  }

  .filtros input,
  .filtros select {
    width: 100%;
    margin-bottom: 10px;
  }

  .curso-card {
    width: 100%;
    margin: 10px 0;
  }

  .popup-content {
    width: 95%;
    max-height: 90vh;
  }

  .form-comentario {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  .curso-popup-info {
    flex-direction: column;
    align-items: center;
  }

  .curso-popup-info img {
    width: 100%;
    max-width: 300px;
  }
}

/* Estilos do Painel Administrativo */
.admin-section {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-form {
  max-width: 600px;
  margin: 0 auto;
}

.admin-form .form-group {
  margin-bottom: 20px;
}

.admin-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.admin-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
}

.cursos-lista {
  width: 100%;
  margin-top: 20px;
}

.lista-cursos {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.curso-item {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.curso-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.curso-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.curso-nome {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.curso-categoria {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

.curso-detalhes {
  display: flex;
  gap: 20px;
  margin: 10px 0;
}

.curso-detalhes p {
  margin: 0;
  color: #555;
}

.curso-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn-visitar {
  background: #4CAF50;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-visitar:hover {
  background: #45a049;
}

.btn-comentarios {
  background: #2196F3;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-comentarios:hover {
  background: #0b7dda;
}

.comentarios {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.comentarios h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 10px;
}

.comentario-item {
  background: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.comentario-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.comentario-autor {
  font-weight: 500;
  color: #333;
}

.comentario-data {
  color: #666;
  font-size: 0.9rem;
}

.comentario-texto {
  color: #444;
  margin: 0;
}

.sem-comentarios {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 10px;
}

/* Estilos Gerais */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Estilos do Painel Administrativo */
.admin-login {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-login h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Estilos da Lista de Comentários */
.admin-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filtros {
    margin-bottom: 20px;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.comentarios-lista {
    display: grid;
    gap: 20px;
}

.comentario-admin {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.comentario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comentario-header h4 {
    margin: 0;
    color: #333;
}

.data {
    color: #666;
    font-size: 0.9em;
}

.comentario-admin p {
    margin: 10px 0;
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 768px) {
    .admin-login {
        margin: 20px;
        padding: 20px;
    }
    
    .comentario-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .data {
        margin-top: 5px;
    }
}

/* Estilos gerais */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Formulários */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Botões */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

/* Seção de login */
#login-section {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Painel administrativo */
#admin-panel {
    margin-top: 20px;
}

.filters {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Lista de comentários */
.comments-section {
    margin-top: 20px;
}

.comment {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.comment-header .curso {
    font-weight: bold;
    color: #333;
}

.comment-header .data {
    color: #666;
    font-size: 0.9em;
}

.comment-body {
    margin-bottom: 10px;
}

.comment-body p {
    margin: 0;
    line-height: 1.5;
}

.delete-comment {
    margin-top: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .comment-header {
        flex-direction: column;
    }
    
    .comment-header .data {
        margin-top: 5px;
    }
}

.ver-mais-comentarios {
  margin-top: 15px;
  text-align: center;
}

.btn-comentarios {
  background-color: transparent;
  color: #5624d0;
  border: 1px solid #5624d0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-comentarios:hover {
  background-color: #5624d0;
  color: white;
}
