/* ---------- FONT PRINCIPALE ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

html, body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #222;
  background-color: #fafafa;
  line-height: 1.6;
}

/* ============================================================
   ITER IAPONICUM — Stile minimal ed elegante
   Versione con interazioni leggere
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@500;600&display=swap');

/* ------------------------------
   Impostazioni generali
------------------------------ */
:root {
  --bg: #f8f8f7;
  --text: #222;
  --accent: #334155;
  --accent-light: #64748b;
  --border: #e2e2e2;
  --highlight: #4b5563;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------
   Header e navigazione
------------------------------ */
header {
  position: sticky;
  top: 0;
  background-color: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  z-index: 100;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin: 0 0.8rem;
  transition: color 0.3s, border-color 0.3s;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  color: var(--highlight);
  border-bottom: 2px solid var(--highlight);
}

/* ------------------------------
   Titoli e testo
------------------------------ */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--accent);
  margin-bottom: 0.6em;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.4rem;
  font-weight: 500;
}

p {
  margin-bottom: 1em;
}

em {
  font-style: italic;
}

strong {
  font-weight: 600;
}

smallcaps {
  font-variant: small-caps;
}

/* ------------------------------
   Sezioni e layout
------------------------------ */
main {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

section {
  margin-bottom: 2.5rem;
}

.card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ------------------------------
   Footer
------------------------------ */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--accent-light);
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ------------------------------
   Immagini e schede
------------------------------ */
img.cover {
  max-width: 180px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ------------------------------
   Link e bottoni
------------------------------ */
a.button {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}

a.button:hover {
  background: var(--highlight);
  transform: translateY(-2px);
}

/* ------------------------------
   Mobile responsive
------------------------------ */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    margin: 0.4rem 0.6rem;
  }

  main {
    margin: 1.5rem auto;
  }
}
/* ---------- IMMAGINE DI COPERTINA DELLE SCHEDE ---------- */

.cover {
  width: 200px;           /* larghezza fissa */
  height: auto;           /* mantiene le proporzioni */
  border-radius: 8px;     /* angoli arrotondati */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);  /* ombra leggera */
  border: 1px solid #ddd; /* bordo grigio chiaro */
  margin-bottom: 1rem;    /* spazio sotto l'immagine */
}

@media (max-width: 768px) {
  .cover {
    width: 100%;
  }
}
/* ---------- STILE MIGLIORATO PER LE SCHEDE ---------- */

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin: 2rem 0;
  line-height: 1.6;
}

.card p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #333;
}

.card strong {
  color: #666;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.card em {
  color: #111;
  font-style: italic;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #222;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
}

.back-link:hover {
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}
