:root {
  --primary-color: #171f32;
  --primary-dark: #0d1219;
  --primary-light: #2a3548;
  --secondary-color: #ff5421;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-bg: #f8f9fa;
  --dark-text: #333333;
  --gray-text: #6c757d;
  --border-color: #dee2e6;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

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

/* Reset de SVG do Gutenberg/WordPress */
svg {
  fill: none !important;
  transition: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: #fff;
}

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

/* === SEÇÃO DE FILTROS === */
.filtros-section {
  background: transparent;
  color: var(--dark-text);
  padding: 40px 0 30px;
}

.titulo-principal {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.subtitulo {
  text-align: center;
  font-size: 1.1rem;
  color: var(--gray-text);
  margin-bottom: 40px;
}

.filtros-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.filtro-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid var(--border-color);
  color: var(--dark-text);
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.filtro-btn:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.filtro-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.filtro-btn .icon {
  width: 20px;
  height: 20px;
}

.filtro-btn .count {
  background: var(--light-bg);
  color: var(--gray-text);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.filtro-btn.active .count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.busca-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.busca-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: white;
  color: var(--dark-text);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.busca-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(23, 31, 50, 0.1);
}

.busca-input::placeholder {
  color: var(--gray-text);
}

.busca-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  color: var(--gray-text);
  pointer-events: none;
}

/* === SEÇÃO DE CURSOS === */
.cursos-section {
  padding: 60px 0;
  background-color: var(--light-bg);
}

.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* === CARD DE CURSO === */
.curso-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.curso-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.curso-card.hidden {
  display: none;
}

.card-imagem-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-imagem {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.curso-card:hover .card-imagem {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.7)
  );
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.card-titulo {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-ead {
  background: #e8eef5;
  color: var(--primary-color);
}

.badge-semipresencial {
  background: #ffe8e0;
  color: var(--secondary-color);
}

.badge-secondary {
  background: var(--light-bg);
  color: var(--gray-text);
}

.card-info {
  flex: 1;
  margin-bottom: 15px;
}

.card-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.card-info-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.btn-block {
  width: 100%;
}

/* === SEM RESULTADOS === */
.sem-resultados {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-text);
}

.sem-resultados svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.sem-resultados h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-container {
  position: relative;
  background: white;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  padding: 0;
}

.modal-close:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
  transform: scale(1.1);
}

.modal-close svg {
  width: 20px;
  height: 20px;
  stroke: var(--dark-text);
}

.modal-close:hover svg {
  stroke: white;
}

.modal-content {
  padding: 25px;
}

.modal-header {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.modal-imagem {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.modal-header-info {
  flex: 1;
}

.modal-header-info h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark-text);
}

.modal-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-body {
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--light-bg);
  border-radius: 8px;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-item h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--dark-text);
}

.info-item p {
  color: var(--gray-text);
  line-height: 1.6;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.info-grid .info-item {
  margin-bottom: 0;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* === MODAL DE FORMULÁRIO === */
.modal-form .modal-container {
  max-width: 500px;
}

.modal-header-form {
  text-align: center;
  padding: 0 15px;
}

.modal-header-form h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-header-form p {
  color: var(--gray-text);
  font-size: 1.1rem;
}

#curso-selecionado {
  font-weight: 600;
  color: var(--primary-color);
}

.form-exemplo {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-text);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input[readonly] {
  background-color: var(--light-bg);
  cursor: not-allowed;
}

/* === ESTILOS CONTACT FORM 7 === */
/* Resetar espaçamentos padrão do CF7 */
.wpcf7 {
  margin: 0;
}

.wpcf7 p {
  margin-bottom: 15px;
}

.wpcf7 br {
  display: none;
}

/* Container do formulário */
#formulario-inscricao .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 450px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Labels */
#formulario-inscricao .wpcf7-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--dark-text);
  font-size: 0.95rem;
}

/* Inputs e textareas */
#formulario-inscricao .wpcf7-form input[type="text"],
#formulario-inscricao .wpcf7-form input[type="email"],
#formulario-inscricao .wpcf7-form input[type="tel"],
#formulario-inscricao .wpcf7-form input[type="url"],
#formulario-inscricao .wpcf7-form input[type="number"],
#formulario-inscricao .wpcf7-form input[type="date"],
#formulario-inscricao .wpcf7-form textarea,
#formulario-inscricao .wpcf7-form select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  margin: 0;
}

/* Focus nos campos */
#formulario-inscricao .wpcf7-form input:focus,
#formulario-inscricao .wpcf7-form textarea:focus,
#formulario-inscricao .wpcf7-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Campos readonly (curso e modalidade) */
#formulario-inscricao .wpcf7-form input[readonly] {
  background-color: var(--light-bg);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Textarea com altura adequada */
#formulario-inscricao .wpcf7-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* Botão de envio */
#formulario-inscricao .wpcf7-form input[type="submit"] {
  width: 100%;
  padding: 14px 28px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

#formulario-inscricao .wpcf7-form input[type="submit"]:hover {
  background: #e64b1d;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#formulario-inscricao .wpcf7-form input[type="submit"]:active {
  transform: translateY(0);
}

/* Mensagens de validação */
.wpcf7-not-valid-tip {
  font-size: 0.85rem;
  color: var(--danger-color);
  margin-top: 4px;
  display: block;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ok {
  border: none !important;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 15px 0 0 0 !important;
  font-size: 0.95rem;
}

.wpcf7-validation-errors {
  background-color: #fee;
  color: var(--danger-color);
}

.wpcf7-mail-sent-ok {
  background-color: #e8f5e9;
  color: var(--success-color);
}

/* Spinner de carregamento */
.wpcf7-spinner {
  margin: 10px auto;
  display: block;
}

/* Remover espaços extras do CF7 */
.wpcf7-form-control-wrap {
  display: block;
  position: relative;
}

/* Ajuste para form-row se usado */
.form-row {
  margin-bottom: 0 !important;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
  .titulo-principal {
    font-size: 2rem;
  }

  .subtitulo {
    font-size: 1rem;
  }

  .filtros-container {
    flex-direction: column;
  }

  .filtro-btn {
    width: 100%;
    justify-content: center;
  }

  .cursos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-container {
    width: 95%;
    max-height: 90vh;
  }

  .modal-content {
    padding: 20px 15px;
  }

  .modal-header {
    flex-direction: column;
  }

  .modal-imagem {
    width: 100%;
    height: 180px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  #formulario-inscricao .wpcf7-form {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .card-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .filtros-section {
    padding: 40px 0 30px;
  }

  .cursos-section {
    padding: 40px 0;
  }
}

/* === SCROLLBAR CUSTOMIZADA === */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: var(--light-bg);
}

.modal-container::-webkit-scrollbar-thumb {
  background: var(--gray-text);
  border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: var(--dark-text);
}

/* === ESTILOS ADICIONAIS PARA VERSÃO API === */

/* Loading Overlay */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pagination */
.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding: 20px;
}

.btn-paginacao {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-paginacao:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-paginacao:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-paginacao svg {
  width: 16px;
  height: 16px;
}

#info-pagina {
  font-weight: 600;
  color: var(--dark-text);
}

/* Error Container */
.erro-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
}

.erro-container p {
  color: var(--danger-color);
  font-size: 18px;
  margin-bottom: 20px;
}
