/* libros.css - Estilos específicos para página de libros */

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
  color: #561d25;
  background-color: #d4e79e;
}

/* CABECERA (Consistente con otras páginas) */
header {
  background-color: #264653;
  width: 100%;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-title a {
  color: #d4e79e;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* MENÚ EN UNA LÍNEA */
.nav-container {
  width: 100%;
  margin-top: 1rem;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: #d4e79e;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: #561d25;
}

/* CONTENIDO PRINCIPAL */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.content-section {
  padding: 4rem 0;
}

.section-light {
  background-color: #d4e79e;
  color: #561d25;
}

.section-dark {
  background-color: #561d25;
  color: #d4e79e;
}

.text-center {
  text-align: center;
}

.intro-text {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* GALERÍA DE LIBROS */
.book-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.25);
}

.book-cover {
  width: 200px;
  height: 300px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
}

.book-info {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.book-title {
  font-family: 'Roboto', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: inherit;
}

.book-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.book-link {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background-color: #264653;
  color: #d4e79e;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  transition: all 0.3s ease;
  margin-top: auto;
}

.book-link:hover {
  background-color: #d4e79e;
  color: #264653;
  transform: scale(1.05);
}

/* Estilo especial para el poemario (libro 4) */
.book-card.poemario {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid #d4e79e;
}

.book-card.poemario:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-5px) scale(1.02);
}

/* FOOTER */
footer {
  background-color: #264653;
  color: #d4e79e;
  padding: 1.5rem 0;
  text-align: center;
}

/* RESPONSIVE */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #d4e79e;
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: -3.5rem;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #264653;
    padding: 1rem;
    gap: 0.5rem;
  }
  
  .main-nav ul.active {
    display: flex;
  }
  
  .book-gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .book-cover {
    width: 160px;
    height: 240px;
  }
  
  /* Ajuste para el poemario en móviles */
  .book-card.poemario {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .book-gallery {
    grid-template-columns: 1fr;
  }
  
  .book-card {
    padding: 1rem;
  }
  
  /* Ajuste para el poemario en móviles pequeños */
  .book-card.poemario {
    max-width: 100%;
  }
}