
@font-face {
  font-family: "Titan";
  src: url("/fonts/titan_one/TitanOne-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NuclearThrone";
  src: url("/fonts/PrStart.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat/MontserratAlternates-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat/MontserratAlternates-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Josefin";
  src: url("/fonts/josefin/static/JosefinSans-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Josefin";
  src: url("/fonts/josefin/static/JosefinSans-Thin.ttf") format("truetype");
  font-weight: normal;
  font-style: thin;
  font-display: swap;
}
/* ---------- Página ---------- */

body {
  font-family: Georgia, "Times New Roman", serif;
  background: #f2efe9;
  color: #211;
  margin: 0 auto;
  background-image: url(../assets/fondo.svg);
  background-repeat: repeat;
  background-size: 200px;
}

article {
  font-family: "Montserrat", serif;
  font-style: normal;
}

header {
  width: 50vw;
  inset: 0;
  margin: auto;
  position: relative;
  padding-top: 40px;
}

header h1 {
  font-family: "Titan", serif;
  font-size: clamp(2.0rem, 4vw, 5rem);
  background-color: #b4aaaa;
  border: 10px solid #e6d2b4;
  border-radius: 29px 29px 2px 2px;
  text-align: center;
  margin: 0; 
}
 header h2 {
  font-family: "Josefin", sans-serif;
  font-style: thin;
  font-size: clamp(1.4rem, 2vw, 5rem);
  color: #666;
  text-align: center;
  margin: 0;
 }

 a {
  text-decoration-line: underline;
  text-decoration-style:dotted;
  color: #000;
 }

 a:visited {
  color: #000;
 }

 .grid-container {
  display: grid;
  gap: 20px;
  width: 70vw;
  margin: 30px auto;
  padding: 10px;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  grid-template-rows: auto auto 30px;
  grid-template-areas:
    "welcome recetario recetario now"
    "welcome chorima chorima now"
    "welcome footer footer footer";
}

.footer, .recetario, .chorima, .now {
  display: flex;
  justify-content: center;   /* centra horizontalmente */
  align-items: center;       /* centra verticalmente */
  text-align: center;        /* centra texto multilínea */
  box-sizing: border-box;
  padding: 0;
}

enf {
  color: salmon;
}

.welcome{
  font-family: "Josefin";
  font-size: 50px;
  background-color: #fa8072;
  text-align: center;
  border-radius: 16px 16px 16px 16px;
  grid-area: welcome;
}

 .footer {
  font-family: "Josefin";
  background-color: #e6d2b4;
  border-radius: 16px 16px 16px 16px;
  grid-area: footer;
 }

 .recetario, 
 .chorima,
 .now {
  font-family: "Titan";
  font-size: 30px;
  background-color: #b4aaaa;
  border: 10px solid #e6d2b4;
  border-radius: 16px 16px 16px 16px;
 }

 .recetario {
  grid-area: recetario;
 }

 .chorima {
  grid-area: chorima;
 }

 .now {
  grid-area: now;
 }

 .recetario:hover,
 .chorima:hover,
 .now:hover
 {
  outline: 2px dotted black;  /* borde fino, rayado */
  outline-offset: -6px;       /* lo acerca al borde de la celda */
}

.pic-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 400px;           /* ancho del div */
  height: auto;           /* altura según el contenido */
  text-align: center;     /* centra el contenido inline horizontalmente */
  background-color: #b4aaaa;
  margin: 20px auto;      /* centra el div mismo si quieres en la página */
  font-family: "Josefin";
  font-size: 30px;
}

/* ---------- Lista ---------- */

.book-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;   /* centra filas incompletas */
}


/* ---------- Caja de cada libro ---------- */

.book {
  width: 220px;           
  display: flex;
  flex-direction: column;
  align-items: center;    
  text-align: center;

  border: 10px solid #ddd;
  padding: 1rem;
  border-radius: 26px 6px 26px 6px;   
  background: #f8f8f8;
}


/* ---------- Título ---------- */

.book-title {
  margin: 0 0 14px 0;
  font-size: 1.6em;
  font-weight: 700;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.book-subtitle {
  font-size: 0.95rem;
  font-weight: normal;
  font-style: italic;
  margin: 0.25rem 0 0;
  color: #555;
}

.book-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}
/* ---------- Imagen + texto ---------- */

.book-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}


/* Imagen */
.book-cover {
  margin-top: 0.75rem;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.book-cover-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;    
  overflow: hidden;
  border-radius: 6px;
}

/* ---------- Texto ---------- */

.book-text {
  flex: 1;
}

.meta {
  margin: 0;
  color: #444;
  font-size: 19px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.comment {
  margin-top: 10px;
  color: #666;
  font-style: italic;
  line-height: 1.4;
  font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif
}


/* ---------- Rating ---------- */

.rating {
  margin-top: 12px;
  font-size: 32px;
  letter-spacing: 2px;
}

/* #tooltip {
  position: fixed;
  pointer-events: none;

  background: #fff;
  border: 1px solid #ccc;
  padding: 6px 8px;

  font-size: 0.85em;
  font-style: italic;
  color: #333;

  display: none;
  white-space: nowrap;
  z-index: 1000;
} */

@media screen and (max-width: 700px) {
  .grid-container,
  .grid-container-mother {
    display: flex;
    flex-direction: column; /* columna vertical */
    gap: 10px;
  }
  .welcome {
    background-color: teal;
    font-size:20px;
  }
}

.book-tooltip {
  position: absolute;
  bottom: 100%;              /* aparece encima de la portada */
  left: 50%;
  transform: translateX(-50%) translateY(-0.5rem);

  max-width: 220px;
  padding: 0.5rem 0.75rem;

  background: rgba(0, 0, 0, 0.85);
  color: white;
  font-size: 0.8rem;
  line-height: 1.3;

  border-radius: 6px;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.book-cover-wrapper:hover .book-tooltip {
  opacity: 1;
}

.book-tooltip {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.book-cover-wrapper:hover .book-tooltip {
  transform: translateX(-50%) translateY(-0.75rem);
}

.book-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  border-width: 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.85) transparent transparent transparent;
}