﻿/* =========================================================
   contact.css — versione finale coerente
   testi #aaa e font uniformi
========================================================= */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #aaa;
  background: #fff;
}

/* =========================================================
   WRAPPER PRINCIPALE — ALLINEATO ALLE HERO
========================================================= */
.contact-wrapper {
  width: 92vw;
  height: calc(100vh - 155px);
  margin: 80px auto 5px auto;
  display: flex;
  align-items: center;
  flex-direction: column;
}

/* =========================================================
   LAYOUT DESKTOP — DUE COLONNE (BASE)
========================================================= */
.contact-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  gap: 2%;
}

.contact-left {
  flex: 0 0 60%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  filter: grayscale(100%) brightness(100%) contrast(100%);
}

.contact-right {
  flex: 0 0 38%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.contact-topbox {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #777;
   margin-top: 3%;
  margin-bottom: 8%;
}

.contact-title {
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-subtitle {
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.contact-address {
  font-size: 1rem;
  letter-spacing: 18px;
  margin-left: 17px;
}

/* SOCIAL */
.socials {
  display: flex;
  justify-content: center;
}

.socials a {
  margin: 2vh;
}

.socials img {
  width: 20px;
  transition: transform 0.3s ease;
}

.socials img:hover {
  transform: scale(1.1);
}

.contact-email {
  font-size: 0.8rem;
  color: #777;
  text-decoration: none;
    margin-bottom: 1vh;
}

/* =========================================================
   FORM
========================================================= */
.contact-formbox {
  display: flex;
  justify-content: center;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form button {
  width: 100%;
  border: 1px solid #aaa;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: #fff;
  color: #aaa;
  font-family: 'Montserrat', sans-serif;
}

.contact-form textarea {
  height: 2.5em;
  min-height: 2.5em;
  line-height: 1.5em;
  padding: 4px 10px;
  resize: none;
}

.contact-form button {
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background: #aaa;
  color: #fff;
}

/* =========================================================
   ROTATE MESSAGE — TUTTI I TABLET E MOBILE
========================================================= */
.rotate-message {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  color: #555;
  font-size: 6vw;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 300 !important;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  z-index: 999999;
}

@media screen and (max-width: 1280px) and (orientation: portrait) {
  .rotate-message {
    display: flex !important;
  }

  body > *:not(.rotate-message) {
    display: none !important;
  }
}

@media screen and (max-width: 1280px) and (orientation: landscape) {
  .rotate-message {
    display: none !important;
  }
}


/* =========================================================
   BOX INFERIORE — FORM
========================================================= */
.contact-formbox {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: auto;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #aaa;
  font-family: 'Montserrat', sans-serif;
}

/* Campi */
.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form button,
.contact-form label {
  width: 100%;
  border: 1px solid #aaa;
  padding: 8px 10px;
  font-size: 0.9rem;
  color: #aaa;
  font-family: 'Montserrat', sans-serif;
  background: #fff;
}

/* Placeholder */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
  opacity: 1;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Rende il campo message più compatto */
.contact-form textarea[name="message"] {
  min-height: 60px;        /* riduce l'altezza iniziale */
  max-height: 30px;       /* evita che cresca troppo */
  height: 80px;            /* altezza fissa se vuoi */
  line-height: 1.3em;      /* compatta le righe del testo */
  padding: 6px 10px;       /* padding più compatto */
  font-size: 0.9rem;       /* leggermente più piccolo */
  resize: vertical;        /* l'utente può ridimensionare solo verticalmente */
}


/* =========================================================
   CHECKBOX — ALLINEAMENTO CORRETTO
========================================================= */

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #aaa;
}

/* CHECKBOX — rimuove riquadro e mantiene allineamento */
.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #aaa;
  border: none;
  outline: none;
}


/* Bottone */
.contact-form button {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #aaa;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-form button:hover {
  background: #aaa;
  color: #fff;
}

/* Modale per la conferma di invio */
.contact-modal {
  display: none; /* Nascondi la modale di default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.contact-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  text-align: center;
}

.close-modal {
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
}

/* =========================================================
   RESPONSIVE — < 950px → layout verticale, mappa sotto
========================================================= */
@media (max-width: 949px) {
  .contact-wrapper {
    width: 94vw;
    height: auto;
    margin: 60px auto;
    padding-top: 12vh;
    flex-direction: column;
    align-items: center;
  }

  .contact-layout {
    flex-direction: column;  /* impila colonne verticalmente */
    align-items: center;
    height: auto !important;
    gap: 40px;
  }

  /* CONTENUTO SOPRA */
  .contact-right {
    width: 100%;
    order: 1;
    align-items: center;
  }

  /* MAPPA SOTTO */
  .contact-left {
    width: 88%;
    order: 2;
    height: auto; /* lascia che segua il contenitore */
  }

  #map {
    display: block;
    width: 100%;
    height: auto; /* lascia che segua l’altezza della colonna */
    min-height: 300px; /* altezza minima per visibilità */
    margin: 0 auto;
  }

  .contact-topbox,
  .contact-formbox {
    width: 100%;
    padding: 0 6%;
    align-items: center;
  }
}

