html{scroll-behavior:smooth}
#autor,#libro,#contacto{scroll-margin-top:90px}

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Literata:wght@400;700&display=swap');

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;   /* evita scroll horizontal */
}
img { max-width: 100%; height: auto; }

/* ================= NAV (igual que antes) ================= */

nav.Menu {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: #000;
  z-index: 10;
}

nav.Menu ul {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(24px, 6vw, 64px);
  list-style: none;
}

nav.Menu li button {
  background: none;
  border: none;
  color: #EDE9E3;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .85;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
  padding: 6px 0;
}

nav.Menu li button:hover {
  opacity: 1;
  transform: translateY(-1px);
}

nav.Menu li button.is-active {
  opacity: 1;
  position: relative;
}

nav.Menu li button.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 28px;
  height: 2px;
  background: #EDE9E3;
  border-radius: 2px;
}

@media (max-width: 900px) {
  nav.Menu ul {
    justify-content: center;
    gap: 28px;
  }
}

nav.Menu li button:focus {
  outline: 2px dashed #E6DCC9;
  outline-offset: 4px;
}


/* ================= HEADER LIBRO ================= */
header.Libro {
  position: relative; /* Importante para que el elemento hijo con position: absolute se posicione respecto a este */
  width: 100%;
  background-color: #000;
  color: #EDE9E3;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: clamp(60px, 10vw, 120px) 24px;
  margin: 0 auto;
  box-sizing: border-box;
}

header.Libro .Presentacionlibro {
  position: absolute; /* Para posicionar la imagen en la esquina */
  bottom: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  min-width: 0;
}

header.Libro h2 {
  color: #C8BFB3;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .15em;
  font-family: 'Work Sans', sans-serif;
}

header.Libro h1 {
  font-family: "Literata", "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: clamp(48px, 9vw, 110px);
  line-height: .95;
  color: #F5EFE6;
}

header.Libro h3 {
  font-family: 'Work Sans', sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 400;
  color: #D7D2CA;
  opacity: .9;
}

/* Botón */
header button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E6DCC9;
  color: #1A1A1A;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(230, 220, 201, 0.2);
  transition: transform .15s ease, box-shadow .2s ease;
}
header button::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
  transform: translateY(-1px);
}
header button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(230, 220, 201, 0.3);
}


header.Libro .Presentacionlibro {
  justify-self: end;
  display: flex;
  align-items: flex-end;
  min-width: 0;
}

header.Libro .Presentacionlibro img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 60px rgba(0,0,0,.7));
}


@media (max-width: 900px) {
  header.Libro {
    grid-template-columns: 1fr;
    text-align: left;
  }
  header.Libro .Presentacionlibro {
    justify-self: center;
    margin-top: 30px;
  }
  header.Libro .Presentacionlibro img {
    width: clamp(240px, 70vw, 420px);
  }
}

/* ================= SECCIÓN AUTOR ================= */
section.autor {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Imagen y texto en columnas separadas */
  background-color: #fff;
  color: #000;
  padding: 40px;
  min-height: 300px;
}

section.autor .Foto-autor {
  grid-column: 1; /* Coloca la imagen en la primera columna */
  display: flex;
  justify-content: center;
  align-items: center;
}

section.autor .Foto-autor img {
  max-width: 80%; /* Asegura que la imagen no exceda el tamaño del contenedor */
  height: auto;
  border-radius: 8px; /* Bordes redondeados para un toque elegante */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

section.autor .texto {
  grid-column: 2;
  padding-left: 20px;
  width: 80% ;
}

section.autor h2, section.autor h1, section.autor h3 {
  margin: 20px 0;
}

@media (max-width: 768px) {
  section.autor {
    grid-template-columns: 1fr; /* Cambia a una sola columna */
    text-align: center; /* Centra el texto */
  }

  section.autor .texto {
    grid-column: 1; /* Texto y foto en la misma columna */
    padding-left: 0; /* Elimina el padding izquierdo */
    padding-top: 20px; /* Añade espacio entre la imagen y el texto */
  }
}


/* ====== SECTION NOVEDADES ====== */
section.Novedades { background-color: #000; /* fondo negro */
  color: #EDE9E3; /* texto claro */
  display: grid; 
  grid-template-columns: 1fr auto; /* texto | imagen */ 
  align-items: center; gap: 40px;
  padding: clamp(60px, 10vw, 120px) 24px;
  max-width: auto; 
  margin: 0 auto;
  box-sizing: border-box; }

/* Títulos */
section.Novedades h2 {
  color: #C8BFB3;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .15em;
  margin-bottom: 12px;
}
section.Novedades h1 {
  font-family: "Libre Baskerville", "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1;
  color: #F5EFE6;
  margin-bottom: 16px;
}
section.Novedades h3 {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: #D7D2CA;
  opacity: .9;
  margin-bottom: 28px;
  max-width: 600px;
}

/* Botón (igual que el de Saber más) */ 
section.Novedades button { 
  align-self: flex-start; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  background: #E6DCC9; 
  color: #1A1A1A; 
  border: none; 
  border-radius: 999px; 
  padding: 12px 20px; 
  font-weight: 600; 
  font-size: 15px; 
  cursor: pointer; 
  box-shadow: 0 6px 18px rgba(230, 220, 201, 0.2); 
  transition: transform .15s ease, box-shadow .2s ease;
 } 
 section.Novedades button::after { 
  content: "›"; 
  font-size: 18px; 
  line-height: 1; 
  transform: translateY(-1px); 
} 

section.Novedades button:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 24px rgba(230, 220, 201, 0.3); }

/* Texto */
section.Novedades .Texto {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin-left: 50px;   /* margen solo en desktop */
}

/* Imagen */
section.Novedades .Imagen {
  margin-right: 50px;  /* margen solo en desktop */
}
section.Novedades .Imagen img {
  width: clamp(220px, 35vw, 400px);
  height: auto;
  display: block;
  filter: drop-shadow(0 28px 60px rgba(0,0,0,.7));
}

/* ====== Responsivo ====== */
@media (max-width: 900px) {
  section.Novedades {
    grid-template-columns: 1fr;   /* apila texto e imagen */
    text-align: center;           /* centra títulos en móvil */
  }

  section.Novedades .Texto {
    margin-left: 0;               /* quita margen en móvil */
    max-width: 100%;
    align-items: center;
  }

  section.Novedades .Imagen {
    margin-right: 0;              /* quita margen en móvil */
    justify-self: center;
    margin-top: 30px;
  }

  section.Novedades .Imagen img {
    width: clamp(240px, 70vw, 420px);
  }

  section.Novedades button {
    align-self: center;
  }
}

footer {
  background-color: #f8f8f8; 
  padding: 20px;
  text-align: center; 
  color: #333; 
}

footer p, footer ul {
  margin: 10px 0; 
}

footer ul {
  list-style: none; 
  padding: 0;
  display: inline-block;
}

footer ul li {
  display: inline;
  margin: 0 10px;
}