body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.layout {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
}

.formulario {
  flex: 2;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.preview {
  flex: 1;
  position: sticky;
  top: 80px; /* ajuste conforme a altura do header */

  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);

  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-top: 20px;
}

h2 {
  color: #34495e;
  margin-top: 25px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 4px;
  width: 100%;
  font-size: 16px;
}

input, textarea, select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  margin: 5px;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

button:hover {
  background-color: #2980b9;
}

/* Botão Remover Foto */
.btn-remover {
  background-color: #e74c3c;
}
.btn-remover:hover {
  background-color: #c0392b;
}

/* Botões de exclusão dinâmicos */
.btn-excluir {
  background-color: #e67e22;
}
.btn-excluir:hover {
  background-color: #d35400;
}

#contadorPaginas {
  display: block;
  margin-top: 10px;
  font-style: italic;
  color: #555;
}

.preview h2 {
  font-size: 13px;
  margin-top: 12px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 2px;
}

.preview p {
  font-size: 12px;
  line-height: 1.3;
  margin: 3px 0;
}

.preview h3 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 12px;
}

/* Cabeçalho da pré-visualização com foto + nome */
.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center;
}
.preview-header h3 {
  font-size: 20px;
  margin: 0;
  text-align: center; /* centraliza o nome */
}

.preview-header h4 {
  font-size: 14px;
  font-style: italic;
  color: #555;
  margin: 2px 0 0 0;
  text-align: center; /* centraliza o subtítulo */
}

.preview-header img {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

input:focus, textarea:focus, select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52,152,219,0.5);
}

input, textarea, select, button {
  transition: all 0.3s ease;
}

/* Aviso Palavras-Chaves */
.aviso-palavras {
  font-size: 12px;
  color: #e74c3c;
  font-style: italic;
  margin-top: 8px;
}