@font-face {
  font-family: tomserif;
  src: url("tomserif.woff");
}


/* =========================
   BASE
   ========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
}


/* =========================
   TOPBAR
   ========================= */

.topbar {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  z-index: 10;

  background-image: url("media/topbar.png");
  background-position: bottom;
  background-repeat: repeat-x;
}

.menu {
  padding: 20px;
  font-family: tomserif;
}

.menu a {
  display: inline-block;
  padding: 10px 50px 10px 0;
}

.language {
  position: absolute;
  top: 20px;
  right: 20px;

  font-family: tomserif;
  font-size: 15px;
}

t {
  position: absolute;
  top: 20px;
  left: 50%;

  transform: translateX(-50%);

  font-family: tomserif;
  font-size: 20px;
  white-space: nowrap;
}


/* =========================
   CONTENITORE
   ========================= */

.items {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 100px 20px 40px;
}


/* =========================
   PROGETTI
   ========================= */

.rite,
.osm,
.ifi {
  width: 100%;
  margin: 0 auto;
  padding: 40px 0;
}


/* =========================
   TESTO
   ========================= */

.testo {
  width: min(700px, 100%);
  margin: 0 auto 25px;
  text-align: center;
}

h1 {
  margin: 0 0 12px;
  font-family: tomserif;
  font-size: 28px;
  font-weight: normal;
}

h2 {
  margin: 0 0 12px;
  font-family: tomserif;
  font-size: 14px;
  font-weight: normal;
}

b1 {
  display: block;
  font-family: "Times New Roman", Times, serif;
  text-align: center;
  line-height: 1.35;
}


/* =========================
   GALLERIA DESKTOP
   ========================= */

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;

  width: 100%;
}

.gallery-item {
  flex: 0 0 auto;
  width: auto;
}

.gallery-item a {
  display: block;
}

.gallery-item img {
  display: block;
  width: auto;
  height: 250px;
}


/* =========================
   LINK
   ========================= */

a:link,
a:visited {
  text-decoration: none;
  color: black;
}

a:hover {
  color: maroon;
}

a:active {
  color: black;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {

  .menu {
    padding: 15px;
  }

  .menu a {
    padding: 10px 30px 10px 0;
  }

  .language {
    top: 15px;
    right: 15px;
    font-size: 13px;
  }

  t {
    top: 15px;
    font-size: 17px;
  }

  .items {
    width: 100%;
    padding: 80px 15px 30px;
  }

  .rite,
  .osm,
  .ifi {
    width: 100%;
    padding: 30px 0;
  }

  .testo {
    width: 100%;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  b1 {
    font-size: 14px;
    line-height: 1.4;
  }


  /* Galleria orizzontale */

  .gallery {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;

  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  gap: 6px;
  padding-bottom: 5px;

  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 auto;
  width: auto;
}

.gallery-item a {
  display: block;
}

.gallery-item img {
  display: block;
  width: auto;
  height: 250px;
}
}
