/*!
 * Mis Lecturas
 * https://codeberg.org/plr/mislecturas
 * 
 * Copyright (C) 2025 plr [Pedro Lázaro Rodríguez]
 * 
 * Licensed under the GNU Affero General Public License v3 or later.
 * You may obtain a copy of the License at https://www.gnu.org/licenses/agpl-3.0.html
 */

/* Yo cargo las letras Atkinson Hyperlegible que he metido en una carpeta /fonts. Pero luego está preparado para que si no está este tipo de letra, cargue la familia sans-serif que se tenga por defecto */

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('../fonts/Atkinson-Hyperlegible-Bold-102.otf') format('truetype');
	font-weight: bold;
	font-style: normal;
}

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('../fonts/Atkinson-Hyperlegible-Italic-102.otf') format('truetype');
	font-weight: normal;
	font-style: italic;
}

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('../fonts/Atkinson-Hyperlegible-Regular-102.otf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('../fonts/Atkinson-Hyperlegible-BoldItalic-102.otf') format('truetype');
	font-weight: bold;
	font-style: italic;
}

body {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  background: #f4f4f4;
  margin-top: 2rem;
  margin-bottom: 0;
}

header {
  text-align: center;
  margin-bottom: 1rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

header h2 {
  padding: 5px 0;
  text-align: center;
  font-size: 0.95rem;
  color: #333;
  max-width: 720px;
  margin: 0 auto;
  font-weight: normal;
  line-height: 1.5;
}

.biblioteca {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Modificar el 3 según las columnas que se quieran: con 1 y 2 también queda bien */
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.libro {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 1rem;
}

.titulo {
  font-size: 1rem;
  font-weight: bold;
}

.autoria {
  color: #333;
  margin-bottom: 0.5rem;
}

.fecha {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

.enlaces-libro a {
    text-decoration: none;
    color: #0051a2;
    font-size: 0.9rem;
}

.about a, header h2 a, footer a {
    text-decoration: none;
    color: #0051a2;
    font-size: 1rem;
}

.enlaces-libro a:hover, header h1 a:hover, .about a:hover, header h2 a:hover, footer a:hover {
    cursor: pointer;
    background-color: #9af46d;
    color: #000;
}

footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #bbb;
    color: #333;
    max-width: 720px;
    margin: 30px auto 0 auto;
    line-height: 1.5;
}

.apunte_genero {
    font-size: 0.8rem;
    color: #DD00FF;
}

.total_lecturas {
  max-width: 720px;
  margin: 2em auto 0 auto;
  text-align: center;
}

/* Tablets y móviles grandes */
@media (max-width: 900px) {
  .biblioteca {
    grid-template-columns: repeat(2, 1fr); /* Modificar el 2 según las columnas que se quieran: con 2 para tablets queda bien */
    gap: 1rem;
  }

  header h1 {
    font-size: 1.75rem;
  }
}

/* Móviles */
@media (max-width: 600px) {
  body {
    margin: 1rem;
  }

  .biblioteca {
    grid-template-columns: 1fr; /* en móviles es mejor una columna */
    gap: 1rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  .libro {
    padding: 0.8rem;
  }

  .worldcat a, .citas a {
    font-size: 0.9rem;
  }

  footer {
    padding: 10px;
  }
}

/* CSS para citas */
.menu-citas {
  text-align: center;
  margin: 1rem 0;
}

.menu-citas a {
  text-decoration: none;
  color: #0066cc;
  font-size: 0.95rem;
}

.menu-citas a:hover {
  background-color: #9af46d;
  color: #000;
  text-decoration: none;
}

main.citas {
  max-width: 720px;
  margin: 0 auto 2rem auto;
  padding: 0 1rem;
}

main.citas h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.cita {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.cita blockquote {
  margin: 0 0 0.5rem 0;
  font-style: normal;
  color: #222;
  line-height: 1.6;
}

.cita .referencia {
  text-align: right;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 600px) {
  .menu-citas a {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }

  main.citas {
    padding: 0 0.5rem;
  }

  .cita {
    padding: 0.8rem 1rem;
  }
}

/* CSS para el About */

main.about {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.5;
}
