.contacto-section {
  font-family: 'Poppins', sans-serif;
  width: 100%;
  max-width: 1920px;
  padding: 30px 120px 30px 120px;
  margin: 0 auto;
  box-sizing: border-box;
  gap: 60px;
  display:flex;
  flex-direction: column;
}

/* Body */
.contacto-body {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 30px;
  box-sizing: border-box;
  background-color: #FFFFFF;
  /*overflow: hidden;*/
}

.contacto-form{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 60px 40px;      
  border: 1px solid rgba(22, 76, 107, 0.3);
  border-radius: 8px;
  box-sizing: border-box;
}

.form-title{
  font-size: 32px;
  font-weight: 700;
  line-height: 130%;
  color: #164C6B;
  margin: 0;
}

/* Formulario  */
.contacto-form .hs-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* labels */
.contacto-form .hs-form-field label{
  font-family: 'Poppins', sans-serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #164C6B !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.contacto-form .hs-form-required {
  color: #E53935 !important;
  font-size: 14px !important;
}

/* Todos los wrappers de HubSpot que limitan el ancho */
.contacto-form .hs_cos_wrapper,
.contacto-form .hs-form-private,
.contacto-form form,
.contacto-form fieldset,
.contacto-form .hs-form-field,
.contacto-form .input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Campos */
.contacto-form .hs-input{
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 5px 10px !important;
  border: 2px solid rgba(22,76,107,0.8) !important;
  border-radius: 4px !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  color: #164C6B !important;
  background-color: rgba(22,76,107,0.05) !important;
  box-sizing: border-box !important;
  display: block !important;
}
.contacto-form .hs-form .hs-form-field:has(.hs-error-msgs),
.contacto-form .hs-form .hs_error_rollup:has(.hs-error-msgs) {
  margin-bottom: -20px;
}

fieldset:has(.hs_utm_medium, .hs_utm_campaign, .hs_utm_content, .hs_utm_source) {
    display: none;
}


.hs_utm_source.hs-utm_source.hs-fieldtype-text.field.hs-form-field,
.hs_utm_medium.hs-utm_medium.hs-fieldtype-text.field.hs-form-field,
.hs_utm_content.hs-utm_content.hs-fieldtype-text.field.hs-form-field,
.hs_utm_campaign.hs-utm_campaign.hs-fieldtype-text.field.hs-form-field{
  display: none !important;
  margin-top: -20px !important;
  margin-bottom: -20px !important;
}
.hs_recaptcha.hs-recaptcha.field.hs-form-field{
  margin-top: 20px;
  margin-bottom: -25px;
}

.contacto-form .hs-submit .hs-button{
  margin-top: clamp(20px, 5vh, 40px);
}
.contacto-form .hs-error-msgs li{
  font-family: 'Poppins', sans-serif;
}

/* labels */
.contacto-form .hs-form-field label{
  font-family: 'Poppins', sans-serif;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #164C6B !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.contacto-form .hs-form-required {
  font-family: 'Poppins', sans-serif;
  color: #E53935 !important;
  font-size: 14px !important;
}


.contacto-form .hs-input::placeholder {
  color: rgba(22, 76, 107, 0.8) !important; 
}

/* textarea */
.contacto-form textarea.hs-input{
  min-height: 100px !important;
  resize: vertical !important;
}

.contacto-form .form-columns-2 {
  display: flex !important;
  gap: 12px !important;
  width: 100% !important;
}
.contacto-form .form-columns-2 .hs-form-field {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-width: 0 !important;
}

/* Quita el bullet del ul */
.contacto-form .hs-error-msgs {
  list-style: none !important;
  padding: 0 !important;
  margin: 4px 0 0 0 !important;
}

/* Quita el li::marker */
.contacto-form .hs-error-msgs li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.contacto-form .hs-error-msgs li::before,
.contacto-form .hs-error-msgs li::marker {
  content: '' !important;
  display: none !important;
}

/* Texto del error — sobreescribe hs-main-font-element */
.contacto-form label.hs-error-msg,
.contacto-form label.hs-error-msg.hs-main-font-element {
  font-family: 'Poppins', sans-serif !important;
  font-size: 12px !important;      /* <- sobreescribe los 20px de HubSpot */
  font-weight: 400 !important;
  color: #E53935 !important;
  margin: 0 !important;
  display: block !important;
  line-height: 1.4 !important;
}
/* ===== FIX CAMPOS UTM OCULTOS ===== */

/* Colapsa los fieldsets que contienen solo campos ocultos */
.contacto-form fieldset:has(> .hs-form-field > input[type="hidden"]),
.contacto-form fieldset:has(.hs_utm_source),
.contacto-form fieldset:has(.hs_utm_medium),
.contacto-form fieldset:has(.hs_utm_campaign),
.contacto-form fieldset:has(.hs_utm_content){
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Por si HubSpot los agrupa en un fieldset compartido */
.contacto-form .hs_utm_source,
.contacto-form .hs_utm_medium,
.contacto-form .hs_utm_campaign,
.contacto-form .hs_utm_content{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Input con error: borde rojo 
.contacto-form .hs-input.invalid.error {
  border-color: #E53935 !important;
  background-color: rgba(229, 57, 53, 0.1) !important;
}*/


/* boton */
.contacto-form .hs-submit {
  display: flex !important;
  justify-content: center !important;
}
.hs_error_rollup {
    display: none;
}

.contacto-form .hs-submit .hs-button {
  width: fit-content !important;
  min-width: 220px !important;
  padding: 15px 64px !important;
  background: #164C6B !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
}
.contacto-form .hs-submit .hs-button:hover{
  background: #0056D0 !important;
}
/* privacidad */
.form-privacidad {
  font-weight: 400;
  font-size: 14px;
  color: #164C6B;
  text-align: center;
  display: block;
  max-width: 400px;
  margin: 0 auto;

}


/* Reset del wrapper de checkbox */
.contacto-form .hs-form-booleancheckbox,
.contacto-form .hs-form-booleancheckbox-display {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
 
.contacto-form .hs-form-booleancheckbox-display {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
}
 
/* Eliminar marcadores del checkbox */
.contacto-form .hs-form-booleancheckbox::before,
.contacto-form .hs-form-booleancheckbox-display::before {
  content: none !important;
  display: none !important;
}
 
/* Input checkbox */
.contacto-form .hs-form-booleancheckbox-display input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  flex-shrink: 0 !important;
  margin: 4px 10px 0 0 !important;
  padding: 0 !important;
  position: relative !important;
}
 
/* Contenedor legal y richtext */
.contacto-form .legal-consent-container,
.contacto-form .hs-richtext {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
 
/* Enlace de política de privacidad — generado por JS */
.contacto-form .legal-consent-container a,
.contacto-form .hs-form-booleancheckbox-display a,
.contacto-form a.privacy-policy-link {
  color: #164C6B !important;
  text-decoration: underline !important;
}



/* Columna derecha */
.contacto-derecha {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* lista */
.contacto-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}

.fondo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #E8A675;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.contacto-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacto-icon svg {
  width: 24px;
  height: 24px;
  fill:  #164C6B;
}

.contacto-item-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 130%;
  color: #E8A675;
  display: block;
  margin-bottom: 4px;
}

.contacto-item-richtext {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  color: #164C6B; 
  word-break: break-word;       
  overflow-wrap: break-word; 
}
 
.contacto-item-richtext p { margin: 0; }

/* Columna derecha */
.contacto-images {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;    
  flex-shrink: 0;
  overflow: visible;
  display: flex;
  margin-top: auto; 
}

.contacto-img-fondo {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 90%;
  height: 55%;              
  object-fit: cover;
  border-radius: 12px;
  z-index: 0;
}

.contacto-img-sobre {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 58%;
  height: 110%;            
  object-fit: fill;
  object-position: top;
  border-radius: 12px;
  z-index: 1;
}

/* Mapa */
.contacto-mapa {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Contenedor del iframe: borde y border-radius */
.contacto-mapa-inner {
  width: 100%;
  max-width: 1500px;
  height: 500px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(22, 76, 107, 0.2);
}

.contacto-mapa-inner iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .contacto-section{
    padding: 30px 80px 20px 80px;
  }
  .contacto-body {
    gap: 30px;
  }

  .contacto-mapa-inner {
    height: 300px;
  }
  
@media (max-width: 768px) {

  .contacto-section{
    padding: 30px 20px 30px 20px;
  }
  /* Grid pasa a 1 columna */
  .contacto-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contacto-form {
    padding: 24px 20px;
  }
  .contacto-form .form-columns-2 {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .contacto-form .hs-submit .hs-button {
    padding: 15px 32px !important;
  }
  .contacto-derecha {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 50px !important;
  }

  .contacto-info {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 20px !important;
    padding-top: 30px;
  }

  .contacto-images {
    display: flex !important;
    height: 220px !important;
    width: 100% !important;
  }

  .contacto-img-fondo {
    width: 75%;
    height: 70%;
  }

  .contacto-img-sobre {
    right: -5px !important;
    width: 50% !important;
    height: 120% !important;
  }

  .contacto-mapa-inner {
    height: 300px;
  }
  
}
/* Botón 100% solo en móvil pequeño */
@media (max-width: 400px) {

  .form-title {
    font-size: 32px;
  }
  .contacto-form .hs-submit .hs-button {
    padding: 15px 16px !important;
  }

  .contacto-images {
    height: 180px !important;
  }
}
