/* Base styles */
body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #333;
}

/* Header with blue background */
header {
  background: #0a66c2;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

/* Sub-title styling */
header p {
  margin-top: 10px;
  font-size: 16px;
  color: #e5f2ff;
}

/* Main menu styled as tabs */
.main-menu {
  display: flex;
  justify-content: center;
  background: #e0e7ef;
  border-bottom: 2px solid #0a66c2;
}

.main-menu a {
  padding: 14px 20px;
  font-weight: bold;
  color: #0a66c2;
  font-size: 16px;
  text-decoration: none;
}

.main-menu a:hover {
  background: #f4f7fb;
}

/* Content container */
.container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Book page styles */
.book-page {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 24px;
  align-items: start;
}

.book-cover img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.book-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.book-details h2 {
  color: #0a66c2;
  margin-bottom: 16px;
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.book-action {
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a66c2;
  color: white;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.2s ease;
}

.button:hover {
  background: #084a9c;
  transform: translateY(-1px);
}

.poesias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.poesia-card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poesia-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.poesia-card a {
  color: inherit;
  text-decoration: none;
}

.poesia-summary {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.65;
  max-height: calc(1.65em * 5);
}

.poesia-card h2,
.poesia-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #102a43;
}

.poesia-card p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.poesias-footer {
  margin-top: 36px;
  text-align: center;
  color: #334e68;
  font-style: italic;
}

.poesias-index {
  margin-top: 40px;
  padding: 28px;
  background: #f8fafc;
  border-radius: 24px;
}

.poesias-index header {
  margin-bottom: 22px;
}

.poesias-index h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  color: #0f172a;
}

.poesias-index p {
  margin: 0;
  color: #334155;
  line-height: 1.75;
}

@media (max-width: 860px) {
  .book-page {
    grid-template-columns: 1fr;
  }
}


/* Card styling */
.card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

h2 {
  color: #0a66c2;
}

/* Links list styling */
.link-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list a {
  display: block;
  margin: 6px 0;
  color: #0a66c2;
  text-decoration: none;
}

/* Gallery of books styling */
.livros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.livro-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.livro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.livro-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.livro-card h3 {
  font-size: 1rem;
  margin: 10px 0 0;
  color: #0a66c2;
}

/* Footer styling */
footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #777;
}

/* Poem page styles - centered text */
.poem-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

.poem-header {
  text-align: center;
  margin-bottom: 48px;
  color: white;
}

.poem-header h1 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.poem-header .description {
  color: #e5f2ff;
  font-size: 1rem;
  margin: 0;
  font-style: italic;
}

.poem-content {
  text-align: center;
  line-height: 1.8;
  color: #374151;
  font-size: 1.05rem;
  margin-bottom: 48px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "Georgia", serif;
}

.poem-content p {
  margin: 0;
  white-space: pre-wrap;
}

.poem-content p + p {
  margin-top: 1.15em;
}

.post-nav,
footer .poem-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8rem;
  width: 100%;
  max-width: none;
  padding: 0 48px;
  box-sizing: border-box;
  text-align: left;
}

.post-nav {
  margin: 32px 0 12px;
}

footer .poem-footer-nav {
  margin: 0 0 12px;
}

.post-nav a,
footer .poem-footer-nav a {
  color: #0a66c2;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.post-nav a:last-child,
footer .poem-footer-nav a:last-child {
  margin-left: auto;
}

.post-nav a:hover,
footer .poem-footer-nav a:hover {
  color: #084a9c;
  text-decoration: underline;
}
