* {
  margin: 0;
  box-sizing: border-box;
}

@font-face {
    font-family: 'rainyhearts'; 
    src: url('resources/rainyhearts.ttf');
}
@font-face {
  font-family: 'pacifico';
  src: url('resources/Pacifico.ttf');
}

* {
  cursor: url("resources/cursor.gif"), auto !important;
}

html, body {
  min-height: 100vh;
}

body {

  cursor: url("resources/cursor.gif"), auto;

  background-image: url("resources/sfondo\ ani.gif"); 
  background-color: rgb(165, 222, 225);
  font-family: "rainyhearts", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  margin: 0;
  padding: 0;
}

/* container per incapsulare l'intero sito */
.container {
  margin-left: auto;
  margin-right: auto;
  padding-top: 3px;
  padding-bottom: 3px;
  max-width: 70%;
  display: grid;
  grid-gap: 3px;
  grid-template: 
    "header header header" 
    "nav nav nav"
    "sidebar main sidebar2"
    "footer footer footer";
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  text-align: center;
  min-height: 100vh;
}

main {
  grid-area: main;
  background-image: url(resources/glitter.gif);
  background-color: rgb(255, 166, 209);
  border: #db3dc3 solid 1px;
  display: flex;
  flex-direction: column;
}

#maincontent {
  flex: 1;
  margin: 5px;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#maincontent > iframe {
  width: 100%;
  flex: 1;
  border: #e08ad3 inset 3px;
  box-sizing: border-box;
}

header{
  grid-area: header;
  text-align: center;
  max-width: auto;
  max-height: auto;
}

header img {
  width: 100%;
  height: auto;
  display: block;
}

nav {
  grid-area: nav;
  background-color:#b389f7;
  /*background-color: #f464b5;*/
  text-align: center;
  padding: 0px;
  font-family: Pacifico, sans-serif;
  font-size: 32px;
  color: #ffecf5;
  margin: 0;
  padding: 0;
}

a:link, a:visited {
  color: #ffecfe;
  text-decoration: none;
  -webkit-transition: color 0.2s ease-out;
  -moz-transition: color 0.2s ease-out;
  -o-transition: color 0.2s ease-out;
  -ms-transition: color 0.2s ease-out;
  transition: color 0.2s ease-out;
}
a:hover {
  color: #e1d2ff;
 
}

h1 {
  color: rgb(255, 255, 255);
  text-align: center;
}

h2 {
  margin: 0;
}

p {
  color: rgb(255, 255, 255);
  font-size: 20px;
}


#side1 { 
  grid-area: sidebar;
  background-image: url('resources/pixelback.png');
  background-color: rgb(222, 221, 223); 
  padding: 10px;
  border-style: dotted;
  border-color: #db3dc3;
  border-radius: 10px;
}

#titles {
  display: flex; 
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

#side1 > img {
  margin: 0;
  padding: 0; 
}

#side2 { 
  grid-area: sidebar2;
  background-image: url('resources/pixelback.png');
  background-color: rgb(222, 221, 223); 
  padding: 10px;
  border: #db3dc3 dotted;
  border-radius: 10px;
}

#update {
  overflow-y: scroll;
  overflow-x: hidden;
  height: 80px;
  background-color: white;
  width: 180px;      /* or any fixed width you prefer */
  max-width: 90%;    /* makes it responsive */
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  border: #e08ad3 inset 3px;
  padding: 0;
}

#update > iframe {
  width: 100%;
  flex: 1;
  box-sizing: border-box;
  border: 0;
  padding: 0;
  overflow: hidden;
}

#navlist {
  display: flex;
  justify-content: space-between; /* or use space-around/space-evenly for different spacing */
  align-items: center;
  padding-left: 70px;
  padding-right: 70px;
  margin-bottom: 3px;
  list-style-type: none;
}

#navlist > li {
  margin: 0; /* Remove left/right margins */
  display: block; /* or inline-block if you prefer */
}

footer {
  
  background-color: #b389f7;
  grid-area: footer;
  overflow: hidden;
  width: 100%;
  padding-left: 5px;
  padding-right: 5px;
}

/* script copiato */

  .scroll-container {
    width: 100%;
    overflow: hidden;
  }

  .scroll-content {
    display: flex;
    will-change: transform;
  }

.scroll-content img {
  max-height: 41px;
  width: auto;
  margin-right: 5px;
  flex-shrink: 0;
  object-fit: contain;
}

  @keyframes scroll-left {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-50%);
    }
  }


/* Mobile styles - place this AFTER desktop styles */

@media only screen and (max-width: 1200px) {

  html, body {
    min-height: 93vh;
  }

  .container {
    margin-left: auto;
    margin-right: auto;
    padding-top: 1%;
    padding-bottom: 1%;
    max-width: 90%;
    display: grid;
    grid-gap: 3px;
    grid-template: 
      "header"
      "nav"
      "main"
      "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
    text-align: center;
    min-height: 93vh;
  }
  #side1, #side2 {
    display: none;
  } 

  #navlist {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 18px;
    padding-left: 30px;
    padding-right: 30px;
  }
  #navlist > li {
    margin: 0;
    font-size: 24px;
  }
}

@media only screen and (max-width: 600px) {
  #navlist > li {
    margin: 0;
    font-size: 16px;
  }
}