/* ========================================
   DENDRIA CONTATTI — MATCH PRIVACY/TERMINI
======================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body{
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color:#1a1a1a;
  background:#ffffff;
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   PAGE LAYOUT (come Privacy/Termini)
======================================== */

.legal-page{
  margin-top: 40px;
  padding: 0;
  background:#ffffff;
  min-height:100vh;
}

.legal-container{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

/* ========================================
   HERO (come Privacy)
======================================== */

.contact-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:60px;
  padding:80px 0 60px;
  min-height:600px;
}

.contact-hero__text{
  flex:1;
  max-width:550px;
}

.contact-hero__text h1{
  font-size:48px;
  font-weight:700;
  margin-bottom:24px;
  color:#1a1a1a;
  line-height:1.2;
  letter-spacing:-0.5px;
}

.contact-hero__subtitle{
  font-size:18px;
  color:#666666;
  line-height:1.7;
  margin-bottom:32px;
}

.contact-hero__actions{
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:flex-start;
}

.contact-hero__btn{
  padding:16px 40px;
  background:#000000;
  color:#ffffff;
  border:none;
  border-radius:50px;
  cursor:pointer;
  font-weight:600;
  font-size:16px;
  transition:all .3s ease;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.contact-hero__btn:hover{
  background:#333333;
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.2);
}

.contact-hero__btn:active{ transform:translateY(0); }

.legal-update{
  color:#999999;
  font-size:14px;
  font-style:italic;
}

/* ========================================
   HERO ART — UNIFORME (come Privacy/Termini)
======================================== */

.contact-hero__art{
  width:420px;
  height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 420px;
}

.contact-hero__art img{
  width:650px;
  height:650px;
  object-fit:contain;
  display:block;
}

/* ========================================
   CONTENT SECTION (come Privacy)
======================================== */

.contact-content{
  padding:40px 0 80px;
  animation: fadeIn .5s ease-in-out;
}

@keyframes fadeIn{
  from{ opacity:0; transform:translateY(20px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ========================================
   LEGAL CARDS (boxed come Privacy/Termini)
======================================== */

.legal-card{
  background:#ffffff;
  padding:40px;
  border-radius:12px;
  margin-bottom:24px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}

.legal-card h2{
  font-size:28px;
  font-weight:600;
  margin-bottom:20px;
  color:#1a1a1a;
}

.legal-card p{
  line-height:1.8;
  color:#333333;
  margin-bottom:16px;
  font-size:16px;
}

.legal-card p:last-child{ margin-bottom:0; }

.section-intro{
  color:#666666;
  margin-bottom:24px;
}

/* ========================================
   INFO LIST (come Privacy)
======================================== */

.info-list{
  margin-top:20px;
  display:grid;
  gap:12px;
}

.info-item{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:16px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}

.info-item:last-child{ border-bottom:none; }

.info-label{
  font-size:12px;
  color:#999999;
  text-transform:uppercase;
  letter-spacing:.8px;
  font-weight:600;
}

.info-value{
  font-size:16px;
  color:#1a1a1a;
  font-weight:500;
}

/* ========================================
   CONTACT INFO (come Privacy/Termini)
======================================== */

.contact-info{ margin-bottom:24px; }

.contact-item{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:16px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}

.contact-item:last-child{ border-bottom:none; }

.contact-label{
  font-size:12px;
  color:#999999;
  text-transform:uppercase;
  letter-spacing:.8px;
  font-weight:600;
}

.contact-link{
  font-size:18px;
  color:#1a1a1a;
  font-weight:600;
  text-decoration:none;
  transition:color .2s ease;
}

.contact-link:hover{ color:#666666; }

/* ========================================
   FORM MODULE
======================================== */

.contact-form-section{
  margin-bottom:24px;
}

.form-card{
  background:#ffffff;
  padding:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 2px 8px rgba(0,0,0,.04);
  margin-bottom:24px;
}

.form-card h2{
  font-size:28px;
  font-weight:600;
  margin-bottom:20px;
  color:#1a1a1a;
}

.contact-form{
  margin-top:24px;
}

.form-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:20px;
}

.form-group{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:20px;
}

.form-group label{
  font-size:13px;
  font-weight:600;
  color:#1a1a1a;
  letter-spacing:.3px;
}

.form-group input,
.form-group select,
.form-group textarea{
  padding:14px 16px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:8px;
  font-size:15px;
  font-family:inherit;
  color:#1a1a1a;
  background:#ffffff;
  transition:all .2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  outline:none;
  border-color:#000000;
  box-shadow:0 0 0 3px rgba(0,0,0,.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder{
  color:#aaaaaa;
}

.form-group textarea{
  resize:vertical;
  min-height:160px;
  line-height:1.6;
}

.form-group select{
  cursor:pointer;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
  padding-right:40px;
}

.form-checkbox{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin: 6px 0 24px;
}

.form-checkbox input[type="checkbox"]{
  margin-top:3px;
  width:18px;
  height:18px;
  cursor:pointer;
  accent-color:#000000;
}

.form-checkbox label{
  font-size:13px;
  color:#666666;
  line-height:1.6;
  cursor:pointer;
}

.contact-submit-btn{
  padding:16px 48px;
  background:#000000;
  color:#ffffff;
  border:none;
  border-radius:50px;
  cursor:pointer;
  font-weight:600;
  font-size:16px;
  transition:all .3s ease;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.contact-submit-btn:hover{
  background:#333333;
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.2);
}

.contact-submit-btn:active{ transform:translateY(0); }

/* ========================================
   FORM STATUS MESSAGE
======================================== */

.form-status{
  display:none;
  align-items:center;
  gap:14px;
  margin-top:20px;
  padding:16px 20px;
  border-radius:10px;
  font-size:15px;
  font-weight:500;
  line-height:1.5;
  animation: fadeIn .3s ease-in-out;
}

.form-status.is-visible{
  display:flex;
}

.form-status__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:50%;
  font-size:14px;
  font-weight:700;
  flex-shrink:0;
  line-height:1;
}

/* Successo */
.form-status.is-success{
  background:#f0faf4;
  color:#1a7a45;
  border:1px solid #b6e8ce;
}

.form-status.is-success .form-status__icon{
  background:#1a7a45;
  color:#ffffff;
}

/* Errore */
.form-status.is-error{
  background:#fff4f4;
  color:#c0392b;
  border:1px solid #f5c0bb;
}

.form-status.is-error .form-status__icon{
  background:#c0392b;
  color:#ffffff;
}

/* Loading */
.form-status.is-loading{
  background:#f5f5f5;
  color:#555555;
  border:1px solid #e0e0e0;
}

.form-status.is-loading .form-status__icon{
  background:#dddddd;
  color:#555555;
  animation: spin .8s linear infinite;
}

@keyframes spin{
  from{ transform:rotate(0deg); }
  to{   transform:rotate(360deg); }
}

/* ========================================
   RESPONSIVE — TABLET
======================================== */

@media (max-width: 1024px){
  .contact-hero{
    gap:40px;
    padding:60px 0 40px;
    min-height:auto;
  }

  .contact-hero__text h1{ font-size:40px; }
  .contact-hero__subtitle{ font-size:17px; }

  .contact-hero__art{
    width:320px;
    height:320px;
    flex:0 0 320px;
  }

  .contact-hero__art img{
    width:130%;
    height:130%;
  }
}

/* ========================================
   RESPONSIVE — MOBILE
======================================== */

@media (max-width: 768px){
  .legal-container{ padding:0 20px; }

  .contact-hero{
    flex-direction:column;
    text-align:left;
    gap:40px;
    padding:40px 0 30px;
  }

  .contact-hero__art{
    order:-1;
    width:300px;
    height:300px;
    flex:none;
    margin:0;
  }

  .contact-hero__text{ max-width:100%; }
  .contact-hero__text h1{ font-size:32px; }
  .contact-hero__subtitle{ font-size:16px; margin-bottom:24px; }

  .contact-hero__btn{ padding:14px 32px; font-size:15px; }

  .contact-content{ padding:30px 0 60px; }

  .legal-card,
  .form-card{
    padding:28px 20px;
  }

  .legal-card h2,
  .form-card h2{
    font-size:24px;
  }

  .legal-card p{ font-size:15px; }

  .form-row{ grid-template-columns: 1fr; }
  .contact-submit-btn{ width:100%; }

  .form-status{ font-size:14px; }
}

/* ========================================
   RESPONSIVE — SMALL MOBILE
======================================== */

@media (max-width: 520px){
  .legal-container{ padding:0 16px; }

  .contact-hero{ padding:30px 0 20px; }

  .contact-hero__art{
    width:260px;
    height:260px;
  }

  .contact-hero__text h1{ font-size:28px; }
  .contact-hero__subtitle{ font-size:15px; }

  .contact-hero__btn{ padding:12px 28px; font-size:14px; }

  .legal-card,
  .form-card{
    padding:24px 16px;
  }

  .legal-card h2,
  .form-card h2{
    font-size:22px;
  }

  .legal-card p{ font-size:14px; }

  .form-group input,
  .form-group select,
  .form-group textarea{
    font-size:14px;
  }
}