/* Reset base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Struttura pagina */
html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  color: #333;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  background-color: #003366;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Contenuto principale */
.hero {
  background: linear-gradient(to right, #0056b3, #0099cc);
  color: white;
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background-color: #ffffff;
  color: #0056b3;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn:hover {
  background-color: #e6f0ff;
}

/* SEZIONI CENTRALI */
.about,
.services {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* Questo spinge il footer in basso */
.about {
  flex: 1;
}

.services {
  flex: 1;
}

.about h2,
.services h2 {
  font-size: 2em;
  color: #003366;
  margin-bottom: 20px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card {
  flex: 1 1 250px;
  background-color: #f8f8f8;
  padding: 20px;
  border-left: 5px solid #0099cc;
  border-radius: 5px;
}

.card h3 {
  margin-bottom: 10px;
  color: #0056b3;
}

/* Footer sempre in basso */
footer {
  margin-top: auto;
  background: #111;
  color: white;
  text-align: center;
  padding: 15px;
}

/* Form contatti */
form {
  max-width: 500px;
  margin-top: 20px;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

form input[type="email"],
form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

form input[type="email"]:focus,
form textarea:focus {
  border-color: #0d6efd;
  outline: none;
  box-shadow: 0 0 4px #0d6efd;
}

form button[type="submit"] {
  background-color: #0d6efd;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

form button[type="submit"]:hover {
  background-color: #084cdf;
}

/* Puntino animato */
#dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: #3498db;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.trail-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: #3498db;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9998;
}

@keyframes explode {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.5) rotate(20deg);
  }

  100% {
    opacity: 0;
    transform: scale(3) rotate(90deg);
  }
}

.link-explode {
  animation: explode 0.5s forwards;
  pointer-events: none;
  position: relative;
  z-index: 10;
}