@import url("./global.css");

/* =========================
   Página: Envía tu propuesta
========================= */
.section{
  padding: 44px 0 64px;
}

.propuesta-wrap{
  width: min(720px, 100%);
  margin: 0 auto;
}

/* Cabecera de página */
.propuesta-head{
  margin-bottom: 32px;
}

.propuesta-back{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  margin-bottom: 20px;
  border-radius: 999px;
  padding: .35rem .6rem .35rem .35rem;
  border: 1px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.propuesta-back:hover{
  color: var(--text);
  background: rgba(114,58,37,.06);
  border-color: rgba(114,58,37,.12);
}

.propuesta-head h1{
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.propuesta-lead{
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =========================
   Formulario
========================= */
.contact-form{
  display: grid;
  gap: 14px;
  background: rgba(236,216,194,.96);
  border: 1px solid rgba(114,58,37,.14);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(23,18,16,.10);
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label{
  display: block;
  font-weight: 800;
  font-size: .92rem;
  margin: 0 0 6px;
  color: var(--brand-chocolate);
}

.field input,
.field textarea,
.field select{
  width: 100%;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(114,58,37,.18);
  background: rgba(236,216,194,.76);
  color: var(--brand-chocolate);
  font-family: inherit;
  font-size: .95rem;
  box-shadow: 0 10px 28px rgba(23,18,16,.08);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea{
  resize: vertical;
  min-height: 160px;
}

.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color: rgba(157,100,91,.55);
  box-shadow: 0 0 0 4px rgba(157,100,91,.14), 0 12px 32px rgba(23,18,16,.10);
}

/* Adjuntar PDF */
.file-row{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#cf-pdf{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-file{
  flex-shrink: 0;
}

.file-name{
  color: rgba(75,67,60,.82);
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Acciones finales */
.contact-actions{
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.contact-buttons{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Mensajes de estado */
.contact-form-status{
  min-height: 18px;
  color: rgba(75,67,60,.86);
  font-size: .92rem;
}
.contact-form-status.is-error{
  color: #7a2e2e;
  font-weight: 800;
}
.contact-form-status.is-ok{
  color: #2f6b3b;
  font-weight: 800;
}

/* Mensaje de éxito en página (tras envío correcto) */
.propuesta-success{
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 48px 28px;
  background: rgba(236,216,194,.96);
  border: 1px solid rgba(114,58,37,.14);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(23,18,16,.10);
}
.propuesta-success.is-visible{
  display: flex;
}
.propuesta-success-icon{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(47,107,59,.12);
  border: 1.5px solid rgba(47,107,59,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2f6b3b;
}
.propuesta-success h2{
  margin: 0;
  font-size: 1.5rem;
  color: var(--brand-chocolate);
}
.propuesta-success p{
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* =========================
   Responsive
========================= */
@media (max-width: 720px){
  .contact-form{
    padding: 20px;
  }
  .contact-grid{
    grid-template-columns: 1fr;
  }
  .contact-buttons{
    justify-content: stretch;
  }
  .contact-buttons .btn{
    flex: 1;
    justify-content: center;
  }
  .file-name{
    width: 100%;
  }
}

@media (max-width: 480px){
  .propuesta-head h1{
    font-size: 1.7rem;
  }
}
