:root {
  --bg: #fcfcfb;
  --text: #1f2430;
  --muted: #596273;
  --line: #d9dee7;
  --accent: #0f4c81;
  --maxw: 760px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

body::before {
  content: "";
  display: block;
  height: 180px;
  background: url("/assets/images/Canestra_di_frutta_(Caravaggio).jpg") center center / cover no-repeat;
}

.container {
  width: min(var(--maxw), 92vw);
  margin: 0 auto;
}

.site-footer .container {
  width: min(1120px, 95vw);
}

.site-header,
.site-footer {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  margin-top: 3rem;
}

.nav-wrap {
  padding: 0.9rem 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-wrap .nav-main {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
  overflow-x: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  color: var(--muted);
}

.lang-switch strong {
  color: var(--text);
  font-weight: 700;
}

.brand {
  text-align: center;
  font-weight: 700;
}

nav a,
.brand,
a {
  color: var(--accent);
  text-decoration: none;
}

.button {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 600;
}

nav a:hover,
a:hover {
  text-decoration: underline;
}

main {
  padding: 2rem 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
}

h1 {
  margin-top: 0;
}

.meta,
.lead,
.tags,
.note {
  color: var(--muted);
}

.content img {
  max-width: 100%;
  height: auto;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  margin: 1rem 0;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.search-box {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

.search-results {
  margin-top: 1rem;
}

.search-item {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  body::before {
    height: 120px;
  }

  body {
    font-size: 17px;
  }

  .nav-wrap {
    justify-content: center;
  }

  .nav-wrap .nav-main {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}
