/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* impede scroll horizontal mas deixa vertical */
  display: flex;
  flex-direction: column;
}


.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding-top: 10px; /* espaço para o header + margem do logo */
}

body {
  min-height: 100vh;
  font-family: serif;
  color: #000;
  background-image: url('fundosite.jpg');
  background-size: auto;
  background-repeat: repeat;
  background-position: center;
  background-attachment: fixed;
  line-height: 1.5;
  text-align: center;
}

main {
  flex-grow: 1;
}

.header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.2); /* fundo para evitar sobreposição ilegível */
  padding: 10px 0;
  text-align: center;
}

.header img {
  max-width: 800px;
  height: auto;
  display: inline-block;
  margin: 20px auto;
}

/* === MENU DA HOME === */
.nav-menu {
  position: relative;
  width: 100%;
  height: 360px;
}

.nav-menu .item {
  position: absolute;
  color: #5a1d1d;
  font-style: italic;
  font-size: 2em;
  text-decoration: none;
  font-weight: bold;
}

.nav-menu .item:hover {
  text-decoration: underline;
}

.nav-menu .biografia   { top: 20px;  left: 15%; }
.nav-menu .jornalismo  { top: 40px;  left: 45%; }
.nav-menu .antologia   { top: 20px;  left: 75%; }
.nav-menu .publicados  { top: 180px; left: 20%; }
.nav-menu .colectivos  { top: 140px; left: 35%; }
.nav-menu .critica1    { top: 80px;  left: 20%; }
.nav-menu .critica2    { top: 100px; left: 65%; }
.nav-menu .contactos   { top: 200px; left: 60%; }
.nav-menu .cronicas    {
  top: 260px;
  left: 30%;
  font-size: 3em;
}

.menu-topo {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 10px 0;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #5a1d1d;
}

.menu-topo ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-topo li {
  display: inline-block;
  margin: 0 15px;
}

.menu-topo a {
  text-decoration: none;
  color: #5a1d1d;
  font-weight: bold;
}

.menu-topo a:hover {
  text-decoration: underline;
}

/* === CONTEÚDO === */
.poem-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
  gap: 40px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
}

.poem {
  flex: 1 1 60%;
  text-align: left;
}

.poem p {
  font-style: italic;
  margin-bottom: 10px;
}

.poem .source {
  display: block;
  margin-top: 10px;
  text-align: left;
}

.author-photo {
  flex: 0 0 350px;
}

.author-photo img {
  width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
}

.page-title {
  color: #5a1d1d;
  font-style: italic;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  margin: 40px 0 20px;
}

.content-area p {
  font-size: 1em;
  max-width: 800px;
  margin: 0 auto 1em;
  text-align: justify;
  padding: 0 5px;
}

.livros-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 20px;
}

.livro-card {
  background-color: rgba(255, 255, 255, 0.9);
  width: 300px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.livro-card img {
  width: 120px;
  height: auto;
  border-radius: 5px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.livro-info h3 {
  margin: 0;
  font-size: 1.1em;
  color: #5a1d1d;
}

.livro-info p {
  margin: 5px 0;
  font-size: 0.95em;
  font-style: italic;
  text-align: center;
}

.btn-livro {
  display: inline-block;
  margin-top: 5px;
  background-color: #5a1d1d;
  color: white;
  padding: 4px 8px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
}

.btn-livro:hover {
  background-color: #7a2e2e;
}

.livro-info {
  flex: 1;
  text-align: center;
  max-width: 220px;
}

.poem-block {
  margin: 2em auto;
  max-width: 600px;
  text-align: center;
}

.poem-block .poem-title {
  line-height: 0.8;
  font-size: 1.4em;
  text-align: center;
  padding: 0;
  margin: 0 auto 1em;
  max-width: 100%;
  font-weight: bold;
  color: #5a1d1d;
}

.poem-block .poem-text {
  line-height: 0.8;
  font-size: 1.2em;
  font-style: italic;
  white-space: pre-line;
  text-align: center;
  padding: 0;
  margin: 0 auto 1em;
  max-width: 100%;
}

.back-link {
  margin-top: 2em;
  text-align: center;
}

.back-link a {
  color: #5a1d1d;
  font-weight: bold;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.prose-block {
  margin: 2em auto;
  max-width: 700px;
  text-align: justify;
  padding: 0 20px;
}

.prose-block .prose-title {
  font-weight: bold;
  font-size: 1.2em;
  color: #5a1d1d;
  margin-bottom: 0.5em;
  text-align: center;
}

.prose-block .prose-text {
  font-size: 0.95em;
  line-height: 1.6;
  font-style: normal;
  color: #000;
}

.small-cover {
  max-width: 200px;
  height: auto;
  border-radius: 5px;
}

.book-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}

.book-item {
  width: 220px;
  text-align: center;
}

.book-item img {
  width: 100%;
  height: auto;
  border: 2px solid #5a1d1d;
}

.book-info {
  font-size: 0.95em;
  font-style: italic;
  margin-top: 10px;
  color: #5a1d1d;
}

.book-divider {
  font-size: 1.5em;
  margin: 20px 0;
  color: #5a1d1d;
}

@media (max-width: 600px) {
  .livro-card {
    width: 90%;
  }

  .livro-card img {
    width: 60%;
  }

  .header img {
    max-width: 80%;
  }

  .poem-container {
    flex-direction: column-reverse;
    gap: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
  }

  .author-photo {
    flex: none;
    width: 100%;
    margin-bottom: 20px;
  }

  .author-photo img {
    max-width: 80%;
    margin: 0 auto;
  }

  .menu-topo {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .nav-menu {
    position: static;
    height: auto;
    padding: 10px 0;
    background: none;
  }

  .nav-menu .item {
    position: static;
    display: block;
    margin: 8px 0;
    left: auto;
    top: auto;
    font-size: 1.2em;
    color: #5a1d1d;
    font-weight: bold;
  }

  .nav-menu .cronicas {
    font-size: 2em;
  }
	
/* Botão escondido no desktop */
.menu-toggle {
  display: none;
}

/* Mobile: colapsa o menu e mostra o botão */
@media (max-width: 768px) {
  .menu-topo {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    text-align: left; /* alinha botão à esquerda */
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    font-weight: bold;
    color: #5a1d1d;
    background: transparent;
    border: 2px solid #5a1d1d;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
  }

  .menu-topo ul {
    display: none;              /* escondido por omissão */
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
  }

  .menu-topo.open ul {
    display: flex;              /* mostra quando nav tem .open */
  }

  .menu-topo li {
    display: block
	}
}
}