/* Sezione contatti */
.contatti {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: #fafafa;
}

/* Mappa */
.mappa {
  background: #e8e8e8;
  position: relative;
}

.iframe-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.iframe {
  width: 100%;
  height: 100%;
  display: block;
  filter: grayscale(30%) contrast(1.1);
  transition: filter 0.4s ease;
}

.iframe:hover {
  filter: grayscale(0%) contrast(1);
}

/* Form contatti */
.form_contatti {
  padding: 4rem 3rem;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form_contatti h2 {
  color: #2a2a2a;
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 3rem;
  letter-spacing: -1px;
}

.form {
  margin-bottom: 3rem;
}

.riga_input {
  position: relative;
  margin-bottom: 0;
}

.riga_input label {
  position: absolute;
  top: -0.5rem;
  left: 0;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.3s ease;
  text-transform: lowercase;
  background: white;
  padding: 0 0.2rem;
  box-sizing: border-box;
  z-index: 1;
  font-variant: small-caps;
}

.riga_input label.active {
  color: #333;
  font-weight: 600;
}

.input_line {
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 1px solid #ddd;
  background: transparent;
  font-size: 1.1rem;
  color: #333;
  outline: none;
  font-family: inherit;
  margin-top: 3px;
}

.input_line:focus {
  border-bottom-color: #666;
}

textarea.input_line {
  resize: vertical;
  min-height: 120px;
  resize: none;
}

.form span {
  display: block;
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.submit_btn {
  background: #333;
  color: white;
  border: none;
  padding: 1.2rem 2.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 1px solid #333;
  font-variant: small-caps;
}

.submit_btn:hover {
  background: white;
  color: #333;
  transform: translateY(-1px);
}

/* Riferimenti */
.riferimenti {
  border-top: 1px solid #eee;
  padding-top: 2rem;
}

.riferimenti .riga_input {
  margin-bottom: 1rem;
}

.riferimenti a {
  color: #666;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 400;
  transition: color 0.3s ease;
  display: block;
}

.riferimenti a:hover {
  color: #333;
}

.riferimenti a:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #ccc;
  border-radius: 50%;
  margin-right: 1rem;
  transition: background 0.3s ease;
}

.riferimenti a:hover:before {
  background: #333;
}

/* Responsive */
@media (max-width: 1024px) {
  .contatti {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mappa {
    height: 80vh;
  }

  .form_contatti {
    padding: 3rem 2rem;
  }

  .form_contatti h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .mappa {
    height: 80vh;
  }

  .form_contatti {
    padding: 2rem 1.5rem;
  }

  .form_contatti h2 {
    font-size: 1.8rem;
  }

  .riga_input {
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .form_contatti {
    padding: 2rem 1rem;
  }

  .form_contatti h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .input_line {
    font-size: 1rem;
  }

  .submit_btn {
    width: 100%;
    padding: 1.2rem;
  }
}
