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

body {
  font-family: 'Lora', Georgia, serif;
}

h1, h2, h3, h4, h5, .site-title, .navbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ==== Schede libro: griglia (categoria/blog) ==== */
.com-content-category-blog__items.blog-items {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(140px, 170px)) !important;
  gap: 16px !important;
  justify-content: center;
}
.scheda-libro-card {
  background: #FFFDF8;
  border: 1px solid #D8CFB8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0;
  width: 100%;
}
.scheda-libro-copertina {
  display: block;
  aspect-ratio: 2 / 3;
  background: #EFE8D8;
  border-bottom: 1px solid #D8CFB8;
  overflow: hidden;
}
.scheda-libro-copertina img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scheda-libro-copertina-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}
.scheda-libro-info {
  padding: 12px 14px 16px;
}
.scheda-libro-titolo {
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  color: #2A2420;
  line-height: 1.3;
  margin-bottom: 4px;
  text-decoration: none;
}
.scheda-libro-titolo:hover {
  color: #7A2E2E;
}
.scheda-libro-autore {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  color: #7A2E2E;
  font-style: italic;
  margin-bottom: 8px;
}
.scheda-libro-etichetta {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .03em;
  color: #5C2020;
  background: #F0E4DC;
  border: 1px solid #D8B8A8;
  border-radius: 3px;
  padding: 2px 8px;
}

/* ==== Scheda libro: pagina di dettaglio ==== */
.scheda-libro-dettaglio {
  background: #FAF6EC;
  padding: 1.5rem;
  border-radius: 4px;
}
.scheda-libro-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  margin-bottom: 1.75rem;
}
.scheda-libro-copertina-grande {
  aspect-ratio: 2 / 3;
  background: #EFE8D8;
  border: 1px solid #D8CFB8;
  border-radius: 4px;
  overflow: hidden;
}
.scheda-libro-copertina-grande img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scheda-libro-titolo-grande {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #2A2420;
  line-height: 1.2;
  margin: 6px 0;
}
.scheda-libro-di {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  color: #7A2E2E;
  font-style: italic;
  margin-bottom: 4px;
}
.scheda-libro-categoria {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8A8072;
  margin-bottom: 16px;
}
.scheda-libro-meta {
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  color: #5A5145;
}
.scheda-libro-meta td {
  padding: 2px 12px 2px 0;
}
.scheda-libro-meta td:first-child {
  color: #8A8072;
}
.scheda-libro-bottone {
  display: inline-block;
  margin-top: 14px;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  color: #F5F0E1;
  background: #7A2E2E;
  border-radius: 4px;
  padding: 8px 18px;
  text-decoration: none;
}
.scheda-libro-bottone:hover {
  background: #5C2020;
  color: #F5F0E1;
}
.scheda-libro-sezione {
  border-top: 1px solid #D8CFB8;
  padding-top: 1.25rem;
  margin-bottom: 1.5rem;
}
.scheda-libro-sottotitolo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #2A2420;
  margin-bottom: 10px;
}
.scheda-libro-testo {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  line-height: 1.7;
  color: #3A342C;
}
.scheda-libro-autore-riga {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
}
.scheda-libro-foto-autore {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #EFE8D8;
  border: 1px solid #D8CFB8;
}
.scheda-libro-foto-autore img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.scheda-libro-bio {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  line-height: 1.7;
  color: #3A342C;
}
.scheda-libro-link-autore {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Lora', Georgia, serif;
  font-size: 13px;
  font-style: italic;
  color: #7A2E2E;
  text-decoration: none;
}
.scheda-libro-link-autore:hover {
  color: #5C2020;
  text-decoration: underline;
}

/* ==== Tag ==== */
.scheda-libro-tag .tag-list,
.scheda-libro-tag ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scheda-libro-tag a {
  display: inline-block;
  font-family: 'Lora', Georgia, serif;
  font-size: 12px;
  color: #5C2020;
  background: #F0E4DC;
  border: 1px solid #D8B8A8;
  border-radius: 3px;
  padding: 3px 10px;
  text-decoration: none;
}
.scheda-libro-tag a:hover {
  background: #D8B8A8;
}

/* ==== Articoli correlati ==== */
.scheda-libro-correlati h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #2A2420;
  margin-bottom: 10px;
}
.scheda-libro-correlati ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scheda-libro-correlati li {
  border-top: 1px solid #D8CFB8;
  padding: 8px 0;
}
.scheda-libro-correlati li:first-child {
  border-top: none;
}
.scheda-libro-correlati a {
  font-family: 'Lora', Georgia, serif;
  font-size: 14px;
  color: #7A2E2E;
  text-decoration: none;
}
.scheda-libro-correlati a:hover {
  color: #5C2020;
  text-decoration: underline;
}

/* ==== Pagina "Elementi taggati" (le voci del menu Generi) ==== */
.com-tags-tag.tag-category {
  font-family: 'Lora', Georgia, serif;
}
.com-tags-tags__filter .inputbox {
  font-family: 'Lora', Georgia, serif;
  border: 1px solid #D8CFB8;
  border-radius: 4px;
  padding: 6px 10px;
}
.com-tags-tags__filter .btn-primary {
  background: #7A2E2E;
  border-color: #7A2E2E;
  font-family: 'Lora', Georgia, serif;
}
.com-tags-tags__filter .btn-primary:hover {
  background: #5C2020;
  border-color: #5C2020;
}
.com-tags-tag__category.list-group {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}
.com-tags-tag__category .list-group-item {
  background: #FFFDF8;
  border: 1px solid #D8CFB8;
  border-radius: 4px;
  margin-bottom: 10px;
  padding: 14px 16px;
}
.com-tags-tag__category .list-group-item h3 {
  margin: 0;
  font-size: 15px !important;
  line-height: 1.4;
}
.com-tags-tag__category .list-group-item h3 a {
  font-family: 'Lora', Georgia, serif !important;
  font-weight: 600;
  font-size: 15px !important;
  color: #2A2420 !important;
  text-decoration: none !important;
}
.com-tags-tag__category .list-group-item h3 a:hover {
  color: #7A2E2E !important;
  text-decoration: underline !important;
}
.tag-tipo-etichetta {
  display: block;
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #5C2020;
  background: #F0E4DC;
  border: 1px solid #D8B8A8;
  border-radius: 3px;
  padding: 2px 8px;
  margin-top: 8px;
  width: fit-content;
}

.scheda-libro-header--senza-copertina {
  grid-template-columns: 1fr;
}

@media (max-width: 600px) {
  .scheda-libro-header,
  .scheda-libro-autore-riga {
    grid-template-columns: 1fr;
  }
}

/* ==== Home: testo introduttivo in alto, 4 riquadri sotto in 2x2 ==== */
body.itemid-101 .container-component {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
}
body.itemid-101 .container-component > .mod-breadcrumbs__wrapper,
body.itemid-101 .container-component > #system-message-container {
  grid-column: 1 / -1;
  order: 0;
}
body.itemid-101 .container-component > main {
  grid-column: 1 / -1;
  order: 1;
}
body.itemid-101 .container-component > .main-top.card {
  margin: 0;
  order: 2;
}
body.itemid-101 .mod-articles-image img {
  max-width: 90px;
  height: auto;
  border-radius: 4px;
}

@media (max-width: 600px) {
  body.itemid-101 .container-component {
    grid-template-columns: 1fr;
  }
}