@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
   ========================= */

.waitingrooms, .cf,
.miracles {
  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;

  width: 100%;
  gap: 10px;
}

.gallery-item {
  flex: 0 0 auto;
  width: auto;
  text-align: center;
}

.gallery-item a {
  display: block;
}

.gallery-item img {
  display: block;
  width: auto;
  height: 300px;
}

.cf .gallery {
  column-gap: 10px;
  row-gap: 10px;
}

.cf .gallery-item {
  flex: 0 0 calc(20% - 8px);
}

.cf .gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: contain;
}

/* THE MIRACLES */

.miracles .gallery {
  column-gap: 10px;
  row-gap: 0;
}

.miracles .gallery-item {
  flex: 0 0 calc(25% - 8px);
}

.miracles .gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: contain;
}

.miracles .desc {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

/* =========================
   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;
  }

  .waitingrooms, .cf,
  .miracles {
    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: 0;
    margin: 0;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }

  .gallery-item {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 0;
  }

  .gallery-item a {
    display: block;
  }

  .gallery-item img {
    display: block;
    width: auto;
    height: 250px;
  }

  .desc {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.2;
  }

  .miracles .gallery-item {
    flex: 0 0 auto;
    width: auto;
  }

  .miracles .gallery-item img {
    width: auto;
    height: 250px;
    object-fit: initial;
  }

  .cf .gallery-item {
  flex: 0 0 auto;
  width: auto;
}

.cf .gallery-item img {
  width: auto;
  height: 250px;
  object-fit: initial;
}
}

