

/* ===========================
   HEADER - NAVBAR
   =========================== */

header {
  background-color: #fff;

  display: flex;
  justify-content: space-around;
  align-items: center;

  position: sticky;
  top: 0;
  z-index: 1000;

  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 1rem;
  transition: width 0.5s ease, height 0.5s ease;

}

header img {
  width: 100px;
  height: 100px;
  gap: 0.5rem;
  transition: width 0.5s ease, height 0.5s ease;
}

nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-left: 1rem;

  box-sizing: border-box;  /* tiene conto dei padding nei calcoli */

  max-width: 100%;        /* non oltrepassa i limiti del contenitore */

  overflow-y: visible;
  overflow-x: auto;

  position: relative;

  white-space: nowrap;     /* evita che vada a capo */

}

nav a, .dropdown-content a {
  text-decoration: none;
  flex: 0 0 auto;
  scroll-snap-align: center;
  
  color: #000000;
  border-bottom: 2px solid transparent;

  font-weight: 500;
  font-size: 1.4rem; /* Check here !!! */
  text-align: center;

  padding: 0.5rem 0.5rem;
  transform: scale(0.8);
  transition: color 0.3s ease, border-bottom 0.3s ease;

	cursor: pointer;
}

nav a:hover, .dropdown-content a:hover {
  color: #0066cc;
  border-bottom: 2px solid #00bfff;
}

/* TODO make tab active when relative page is surfed */
nav a.active {
  color: #00bfff;
  border-bottom: 2px solid #00bfff;
}

/* ===========================
   REDUCING LOGO
   =========================== */
header.scrolled {
  /* padding: 0.5rem 2rem; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.scrolled img {
  width: 60px;
  height: 60px;
}

.dropdown-toggle::after {
  content: "▼";
  font-size: 0.7em;
  margin-left: 0.5rem;
}

.dropdown-content {
  display: flex;
  flex-direction: column;

  background: white;
  
  border-radius: 0px 0px 5px 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #9b9a9a;
  border-top: none;
  /* min-width: 180px; */
  padding: 8px 0;
  
  opacity: 0;
  visibility: hidden;
  /* transform: translateY(-10px); */
  /* transition: all 0.3s ease; */
  
  position: fixed;
  z-index: 1001;
}

.dropdown-content.show {
  opacity: 1;
  visibility: visible;
  /* transform: translateY(0); */
}