html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

header {
  display: flex;
  align-items: center;
  padding: 5px 15px;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  background-color: white;

  &.visible {
    transform: translateY(0);
  }

  nav a {
    margin-left: 5px;
  }
}

section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 15px;

  .bg {
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 0;
  }

  .content {
    position: relative;
  }
}

#home {
  /* set height on js */

  color: white;

  .bg {
    background-image: url("./images/1.jpg");
  }

  .content {
    max-width: 100%;
    padding: 30px;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.logo-container {
  text-align: center;

  .logo {
    width: 50vw;
    max-width: 200px;
    height: auto;
    border-radius: 100%;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
    transform: scale(1);
    animation: logo-pulse 2s infinite;
    margin-top: 20px;
  }

  p {
    overflow: hidden; /* Ensures the content is not revealed until the animation */
    border-right: 0.15em solid orange; /* The typwriter cursor */
    white-space: nowrap; /* Keeps the content on a single line */
    margin: 0 auto; /* Gives that scrolling effect as the typing happens */
    letter-spacing: 0.15em; /* Adjust as needed */
    animation: title-typing 5s steps(40, end), title-blink-caret 0.75s;
    margin-top: 60px;
    margin-bottom: 30px;
    z-index: 1;
    position: relative;
  }
}

.logo-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 0%;
  border: 2px solid white;
  z-index: 0;
  animation: frameIn 2.5s ease forwards;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.4);
}

@keyframes frameIn {
  0% {
    width: 0%;
    height: 0%;
  }
  50% {
    width: 100%;
    height: 0%;
  }
  100% {
    width: 100%;
    height: 100%;
  }
}

#philosophy {
  min-height: 50vh;

  .bg {
    background-image: url("./images/4.jpeg");
  }

  .content {
    background-color: rgba(255, 255, 255, 0.8);
    width: 90%;
  }
}

#gallery {
  height: 30vh;
  .bg {
    background-image: url("./images/3.jpeg");
  }
}

h1,
h2 {
  font-weight: 700;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

footer p {
  font-size: 0.9rem;
  text-align: center;
}

/* Freccia animata per lo scroll */
.scroll-arrow {
  font-size: 30px; /* Dimensione della freccia */
  color: white;
  animation: row-bounce 1.5s infinite;
}

/* Animazione di rimbalzo per la freccia */
@keyframes row-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@keyframes logo-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* The typing effect */
@keyframes title-typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* The typewriter cursor effect */
@keyframes title-blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: orange;
  }
}

p {
  text-align: justify;
}
