@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500&display=swap');

/* =============================
   LEA LIBRERÍA Y EDITORIAL 2026
   VERSIÓN MEJORADA CON LOGO GRANDE Y ALINEADO
============================= */

:root {
  --color-beige: #ddcbab;
  --color-beige-light: #e8dcc6;
  --color-beige-dark: #c9b894;
  --color-brown: #2e2b28;
  --color-brown-light: #5a5347;
  --color-gold: #8b6f43;
  --color-white: #ffffff;
  --color-offwhite: #f9f7f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  background: #f5f1e8 url('../img/fondolibros.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--color-brown);
  overflow-x: hidden;
}

/* === HEADER === */
header {
  background: rgba(221, 203, 171, 0.98);
  padding: 0.8em 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1em;
  gap: 10px;
}

nav .logo {
  height: 50px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu li {
  margin: 0 8px;
}

.nav-menu li a {
  text-decoration: none;
  color: var(--color-brown);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.2;
}

.nav-menu li a:hover {
  color: var(--color-gold);
}

.nav-menu li input {
  padding: 6px;
  border-radius: 5px;
  border: 1px solid #bbb;
  font-size: 0.85rem;
  width: 120px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5em;
  color: var(--color-brown);
  cursor: pointer;
  padding: 5px;
}

/* === HERO === */
.hero {
  position: relative;
  text-align: left;
  color: var(--color-brown);
  padding: 8em 1em;
  min-height: 600px;
  overflow: hidden;
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
}

.hero-container {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  width: 100%;
  margin-left: 5%;
  text-align: left;
}

.hero-logo-container {
  margin-bottom: 20px;
  padding: 30px 40px;
  background: rgba(221, 203, 171, 0.75);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  display: inline-block;
  border: 2px solid rgba(221, 203, 171, 0.9);
  backdrop-filter: blur(5px);
}

.marca-de-agua {
  max-width: 300px;
  width: 100%;
  height: auto;
  filter: 
    brightness(0.15)
    contrast(1.8)
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.hero-texto {
  margin-top: 20px;
  background: rgba(46, 43, 40, 0.7);
  padding: 25px 35px;
  border-radius: 10px;
  display: inline-block;
  text-align: left;
  max-width: 90%;
}

.hero-texto h1 {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-white);
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-subtitulo {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--color-beige-light);
  font-style: italic;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  font-weight: 400;
  line-height: 1.3;
}

.boton-hero {
  display: inline-block;
  background: var(--color-gold);
  color: white;
  padding: 14px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(139, 111, 67, 0.3);
  font-size: 1.1rem;
}

.boton-hero:hover {
  background: var(--color-beige-dark);
  color: var(--color-brown);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(139, 111, 67, 0.4);
}

/* === SLIDER === */
.slider {
  position: relative;
  max-width: 100%;
  height: 300px;
  overflow: hidden;
  margin-top: 30px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.3s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  filter: brightness(90%);
}

.slider-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 3;
  padding: 0 10px;
  box-sizing: border-box;
}

.slider-nav a {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 8px 12px;
  font-size: 18px;
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.3s ease;
}

.slider-nav a:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* === SECCIONES GENERALES === */
section {
  padding: 40px 5%;
  text-align: center;
}

section:not(.hero):not(.slider) {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  max-width: 1200px;
  margin: 30px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Títulos */
.seccion-titulo {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--color-brown);
  margin-bottom: 30px;
  line-height: 1.2;
}

.seccion-titulo::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-beige);
  margin: 10px auto 0;
  border-radius: 3px;
}

/* === TARJETAS === */
.grid-libros {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.tarjeta {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
  max-width: 300px;
}

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

.tarjeta img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.tarjeta-contenido {
  padding: 15px;
}

.tarjeta-contenido h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--color-brown);
  line-height: 1.3;
}

.tarjeta-contenido p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
}

.boton {
  display: inline-block;
  margin-top: 10px;
  background: var(--color-gold);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
  font-size: 0.9rem;
}

.boton:hover {
  background: var(--color-beige);
  color: var(--color-brown);
}

/* === BLOG === */
.grid-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.post {
  background: var(--color-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
  max-width: 350px;
}

.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.1);
}

.post img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post h3 {
  padding: 12px;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  line-height: 1.3;
}

.post p {
  padding: 0 12px 12px;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* === EVENTOS === */
.eventos-lista {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.evento {
  background: var(--color-white);
  border-left: 4px solid var(--color-beige);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.evento h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.evento p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* === FOOTER === */
footer {
  background: rgba(46, 43, 40, 0.95);
  color: var(--color-beige);
  text-align: center;
  padding: 20px 10px;
  font-size: 0.85rem;
  line-height: 1.4;
}

footer a {
  color: var(--color-beige);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* === MEDIA QUERIES PARA TABLET === */
@media (min-width: 768px) {
  nav {
    padding: 0 2em;
  }
  nav .logo {
    height: 60px;
  }
  .nav-menu li {
    margin: 0 10px;
  }
  .nav-menu li a {
    font-size: 0.9rem;
  }
  .hero {
    padding: 8em 1em;
  }
  .hero-texto h1 {
    font-size: 3rem;
  }
  .hero-subtitulo {
    font-size: 1.3rem;
  }
  .marca-de-agua {
    max-width: 260px;
  }
  .slider {
    height: 400px;
  }
  .slide img {
    height: 400px;
  }
  section {
    padding: 50px 6%;
  }
  .seccion-titulo {
    font-size: 2rem;
  }
  .grid-libros, .grid-blog {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .tarjeta, .post {
    max-width: 100%;
  }
}

/* === MEDIA QUERIES PARA DESKTOP === */
@media (min-width: 1024px) {
  .hero-texto h1 {
    font-size: 3.5rem;
  }
  .hero-subtitulo {
    font-size: 1.5rem;
  }
  .marca-de-agua {
    max-width: 300px;
  }
  .slider {
    height: 500px;
  }
  .slide img {
    height: 500px;
  }
  .grid-libros {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
  }
  .grid-blog {
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
  }
  .tarjeta img {
    height: 300px;
  }
}

/* === MEDIA QUERY PARA MÓVILES PEQUEÑOS === */
@media (max-width: 480px) {
  .hero {
    padding: 5em 1em;
    justify-content: center;
    text-align: center;
  }
  .hero-container {
    margin-left: 0;
    text-align: center;
  }
  .hero-logo-container {
    padding: 20px;
  }
  .marca-de-agua {
    max-width: 200px;
  }
  .hero-texto {
    padding: 20px;
    text-align: center;
  }
  .hero-texto h1 {
    font-size: 2rem;
  }
  .hero-subtitulo {
    font-size: 1.1rem;
    margin-bottom: 20px;
  }
  .boton-hero {
    padding: 12px 25px;
    font-size: 1rem;
  }
  .slider {
    height: 250px;
  }
  .slide img {
    height: 250px;
  }
  .seccion-titulo {
    font-size: 1.6rem;
  }
}

/* === MENÚ MÓVIL === */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(221, 203, 171, 0.98);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 15px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-menu li {
    margin: 8px 0;
    width: 100%;
    text-align: center;
  }
  .nav-menu li a {
    display: block;
    padding: 8px 0;
    font-size: 1rem;
  }
  .nav-menu li input {
    width: 80%;
    margin: 0 auto;
  }
}