/*!
 * Mis Lecturas
 * https://codeberg.org/plr/mislecturas
 * 
 * Copyright (C) 2025 [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: 1.5rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

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

header h2 a {
  text-decoration: none;
  color: #0066cc;
  font-weight: normal;
}

header h2 a:hover {
  text-decoration: underline;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
}

.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.85rem;
  color: #555;
  margin-bottom: 1rem;
}

.worldcat a {
    text-decoration: none;
    color: #0077cc;
    border-bottom: 1px solid #CCC;
    padding: 5px 3px 2px 3px;
    border-radius: 2px;
    font-size: 0.9em;
}

.worldcat a:hover {
    cursor: pointer;
    background-color: #9af46d;
}

footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #bbb;
    font-size: 0.9em;
    color: #333;
    max-width: 720px;
    margin: 30px auto 0 auto;
}

footer a {
  text-decoration: none;
  color: #0066cc;
  font-weight: normal;
}

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

.apunte_genero {
    font-size: 0.8em;
    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;
  }
}

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

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

  .libro {
    padding: 0.8rem;
  }

  .worldcat a {
    font-size: 0.9em;
  }

  footer {
    font-size: 0.85em;
    padding: 10px;
  }
}