/* Base */
body {
  font-family: "Times New Roman", serif;
  background-color: #ffffff;
  color: #000000;
  margin: 0;
  padding: 0;
}

.wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Logo */
.logo {
  font-size: 3em;
  font-weight: bold;
  color: #990000;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 1px 1px 0 #cccccc;
}

.logo a,
.logo a:visited,
.logo a:hover,
.logo a:active {
  color: #990000;
  text-decoration: none;
}

/* Slogan */
.slogan {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 25px;
}

/* Tool box */
.tool {
  background-color: #ffffcc;
  border: 1px solid #999;
  padding: 20px;
  font-size: 1.1em;
  box-sizing: border-box;
}

/* Form */
form {
  margin-top: 10px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="submit"] {
  font-size: 16px; /* evita zoom su iOS */
  padding: 8px;
  font-family: "Times New Roman", serif;
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
}

input[type="submit"] {
  background-color: #e0e0e0;
  border: 1px solid #999;
  cursor: pointer;
  color: #000000; 
}

/* Risultati */
.result {
  margin-top: 20px;
  padding: 10px;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  font-size: 1.1em;
}

/* Separatore */
hr {
  margin: 30px 0 15px;
  border: none;
  border-top: 1px solid #cccccc;
}

/* Categorie */
.categories {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.category-column {
  flex: 1;
  min-width: 300px;
}

.category-column h2 {
  margin-top: 20px;
  font-size: 1.2em;
}

.category-column ul {
  list-style-type: none;
  padding-left: 0;
}

.category-column li {
  margin-bottom: 8px;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.9em;
  margin-bottom: 30px;
  line-height: 1.6em;
}

.footer a {
  margin: 0 10px;
  color: #0000cc;
  text-decoration: underline;
}

/* Mobile optimization */
@media (max-width: 600px) {
  .logo {
    font-size: 2.2em;
  }

  .slogan {
    font-size: 1em;
  }

  input[type="submit"] {
    margin: 10px 0 0;
  }

  .tool {
    padding: 15px;
    font-size: 1em;
  }

  .result {
    font-size: 1em;
  }

  .categories {
    flex-direction: column;
    gap: 20px;
  }
}

/* Fix dropdowns on mobile */
select {
  font-size: 16px; /* prevent iOS zoom */
  padding: 8px;
  width: 100%;
  box-sizing: border-box;
  font-family: "Times New Roman", serif;
  margin-top: 10px;
  border: 1px solid #999;
  border-radius: 4px;
  background-color: #fff;
  appearance: none; /* modernize appearance */
}

/* Optional: Custom caret for dropdown */
select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200l5%206%205-6z%22%20fill%3D%22%23000%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}

/* Improve buttons further */
input[type="submit"],
button {
  min-height: 44px; /* recommended tap target height */
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

input[type="submit"]:active,
button:active {
  background-color: #cccccc;
}

input[type="submit"]:focus-visible,
button:focus-visible {
  outline: 2px solid #0000cc;
  outline-offset: 2px;
}

