/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #F1F1F1;
  color: #4C5C42;
}

header {
  background-color: #4C5C42;
  color: #F1F1F1;
  padding: 1rem;
  text-align: center;
}

header input[type="text"] {
  margin-top: 1rem;
  padding: 0.5rem;
  width: 90%;
  max-width: 400px;
  font-size: 1rem;
}

/* Menu */
.menu {
  background-color: #4C5C42;
  padding: 1rem 0;
}

.menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.menu a {
  text-decoration: none;
  color: #F1F1F1;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #DDE8C0;
  font-size: 1.2rem;
  font-weight: bold;
}

.menu .current {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Conteúdo principal */
.conteudo {
  padding: 3rem 2rem;
  text-align: center;
}

.conteudo h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.conteudo p {
  font-size: 1.2rem;
  line-height: 1.6;
  text-align: justify;
  margin-left: 10%;
  padding-right: 10%;


}

/* Grid de livros */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.livro-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;
  padding: 1rem;
  transition: transform 0.2s;
  cursor: pointer;
}

.livro-card:hover {
  transform: scale(1.02);
}

.livro-card img {
  width: 200px;
  height: 280px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 0.5rem;
}

.livro-card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: #4C5C42;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 90%;
  position: relative;
}

.modal-content img {
  max-width: 200px;
  margin-bottom: 1rem;
  position: center;
}

#fechar-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #c62828;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 10;
}

#referencia-detalhe {
  font-weight: bold;
}

#detalhes-livro img {
  display: block;
  margin: 0 auto;
  max-width: 250px;
  height: auto;
}

.publicacao-frame {
  display: none;
  margin-top: 2rem;
  width: 100%;
  height: 600px;
  border: none;
}